@@ -14,8 +14,8 @@ public TestInformation(NRedisStack.Tests.EndpointsFixture endpointsFixture) : ba
1414 {
1515 }
1616
17- [ Fact ]
18- [ Obsolete ]
17+ [ SkipIfRedis ( Comparison . GreaterThanOrEqual , "7.9.240" ) ]
18+ [ InlineData ]
1919 public void TestInformationSync ( )
2020 {
2121 string key = CreateKeyName ( ) ;
@@ -27,6 +27,58 @@ public void TestInformationSync()
2727 TimeSeriesInformation info = ts . Info ( key ) ;
2828 TimeSeriesInformation infoDebug = ts . Info ( key , debug : true ) ;
2929
30+ Assert . Equal ( 0 , info . RetentionTime ) ;
31+ Assert . Equal ( 1 , info . ChunkCount ) ;
32+ Assert . Null ( info . DuplicatePolicy ) ;
33+ Assert . Null ( info . KeySelfName ) ;
34+ Assert . Null ( info . Chunks ) ;
35+
36+ Assert . Equal ( 0 , infoDebug . RetentionTime ) ;
37+ Assert . Equal ( 1 , infoDebug . ChunkCount ) ;
38+ Assert . Null ( infoDebug . DuplicatePolicy ) ;
39+ Assert . Equal ( infoDebug . KeySelfName , key ) ;
40+ Assert . Single ( infoDebug . Chunks ! ) ;
41+ }
42+
43+ [ SkipIfRedis ( Comparison . GreaterThanOrEqual , "7.9.240" ) ]
44+ [ InlineData ]
45+ public async Task TestInformationAsync ( )
46+ {
47+ string key = CreateKeyName ( ) ;
48+ IDatabase db = GetCleanDatabase ( ) ;
49+ var ts = db . TS ( ) ;
50+ await ts . AddAsync ( key , "*" , 1.1 ) ;
51+ await ts . AddAsync ( key , "*" , 1.3 , duplicatePolicy : TsDuplicatePolicy . LAST ) ;
52+
53+ TimeSeriesInformation info = await ts . InfoAsync ( key ) ;
54+ TimeSeriesInformation infoDebug = await ts . InfoAsync ( key , debug : true ) ;
55+
56+ Assert . Equal ( 0 , info . RetentionTime ) ;
57+ Assert . Equal ( 1 , info . ChunkCount ) ;
58+ Assert . Null ( info . DuplicatePolicy ) ;
59+ Assert . Null ( info . KeySelfName ) ;
60+ Assert . Null ( info . Chunks ) ;
61+
62+ Assert . Equal ( 0 , infoDebug . RetentionTime ) ;
63+ Assert . Equal ( 1 , infoDebug . ChunkCount ) ;
64+ Assert . Null ( infoDebug . DuplicatePolicy ) ;
65+ Assert . Equal ( infoDebug . KeySelfName , key ) ;
66+ Assert . Single ( infoDebug . Chunks ! ) ;
67+ }
68+
69+ [ SkipIfRedis ( Comparison . LessThan , "7.9.240" ) ]
70+ [ InlineData ]
71+ public void TestInformationSync_CE80 ( )
72+ {
73+ string key = CreateKeyName ( ) ;
74+ IDatabase db = GetCleanDatabase ( ) ;
75+ var ts = db . TS ( ) ;
76+ ts . Add ( key , "*" , 1.1 ) ;
77+ ts . Add ( key , "*" , 1.3 , duplicatePolicy : TsDuplicatePolicy . LAST ) ;
78+
79+ TimeSeriesInformation info = ts . Info ( key ) ;
80+ TimeSeriesInformation infoDebug = ts . Info ( key , debug : true ) ;
81+
3082 Assert . Equal ( 0 , info . RetentionTime ) ;
3183 Assert . Equal ( 1 , info . ChunkCount ) ;
3284 Assert . Equal ( TsDuplicatePolicy . BLOCK , info . DuplicatePolicy ) ;
@@ -40,9 +92,9 @@ public void TestInformationSync()
4092 Assert . Single ( infoDebug . Chunks ! ) ;
4193 }
4294
43- [ Fact ]
44- [ Obsolete ]
45- public async Task TestInformationAsync ( )
95+ [ SkipIfRedis ( Comparison . LessThan , "7.9.240" ) ]
96+ [ InlineData ]
97+ public async Task TestInformationAsync_CE80 ( )
4698 {
4799 string key = CreateKeyName ( ) ;
48100 IDatabase db = GetCleanDatabase ( ) ;
0 commit comments