Skip to content

Bump Redis 8.0 version(8.0-RC2-pre) in pipeline #415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
max-parallel: 15
fail-fast: false
matrix:
redis-version: [ '8.0-RC1-pre', '${{ needs.redis_version.outputs.CURRENT }}', '7.2.6', '6.2.16']
redis-version: [ '8.0-RC2-pre', '${{ needs.redis_version.outputs.CURRENT }}', '7.2.6', '6.2.16']
dotnet-version: ['6.0', '7.0', '8.0']
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public TestInformation(NRedisStack.Tests.EndpointsFixture endpointsFixture) : ba
{
}

[Fact]
[Obsolete]
[SkipIfRedis(Comparison.GreaterThanOrEqual, "7.9.240")]
[InlineData]
public void TestInformationSync()
{
string key = CreateKeyName();
Expand All @@ -40,8 +40,8 @@ public void TestInformationSync()
Assert.Single(infoDebug.Chunks!);
}

[Fact]
[Obsolete]
[SkipIfRedis(Comparison.GreaterThanOrEqual, "7.9.240")]
[InlineData]
public async Task TestInformationAsync()
{
string key = CreateKeyName();
Expand All @@ -65,5 +65,57 @@ public async Task TestInformationAsync()
Assert.Equal(infoDebug.KeySelfName, key);
Assert.Single(infoDebug.Chunks!);
}

[SkipIfRedis(Comparison.LessThan, "7.9.240")]
[InlineData]
public void TestInformationSync_CE80()
{
string key = CreateKeyName();
IDatabase db = GetCleanDatabase();
var ts = db.TS();
ts.Add(key, "*", 1.1);
ts.Add(key, "*", 1.3, duplicatePolicy: TsDuplicatePolicy.LAST);

TimeSeriesInformation info = ts.Info(key);
TimeSeriesInformation infoDebug = ts.Info(key, debug: true);

Assert.Equal(0, info.RetentionTime);
Assert.Equal(1, info.ChunkCount);
Assert.Equal(TsDuplicatePolicy.BLOCK, info.DuplicatePolicy);
Assert.Null(info.KeySelfName);
Assert.Null(info.Chunks);

Assert.Equal(0, infoDebug.RetentionTime);
Assert.Equal(1, infoDebug.ChunkCount);
Assert.Equal(TsDuplicatePolicy.BLOCK, infoDebug.DuplicatePolicy);
Assert.Equal(infoDebug.KeySelfName, key);
Assert.Single(infoDebug.Chunks!);
}

[SkipIfRedis(Comparison.LessThan, "7.9.240")]
[InlineData]
public async Task TestInformationAsync_CE80()
{
string key = CreateKeyName();
IDatabase db = GetCleanDatabase();
var ts = db.TS();
await ts.AddAsync(key, "*", 1.1);
await ts.AddAsync(key, "*", 1.3, duplicatePolicy: TsDuplicatePolicy.LAST);

TimeSeriesInformation info = await ts.InfoAsync(key);
TimeSeriesInformation infoDebug = await ts.InfoAsync(key, debug: true);

Assert.Equal(0, info.RetentionTime);
Assert.Equal(1, info.ChunkCount);
Assert.Equal(TsDuplicatePolicy.BLOCK, info.DuplicatePolicy);
Assert.Null(info.KeySelfName);
Assert.Null(info.Chunks);

Assert.Equal(0, infoDebug.RetentionTime);
Assert.Equal(1, infoDebug.ChunkCount);
Assert.Equal(TsDuplicatePolicy.BLOCK, infoDebug.DuplicatePolicy);
Assert.Equal(infoDebug.KeySelfName, key);
Assert.Single(infoDebug.Chunks!);
}
}
}
Loading