1+ #pragma warning disable CS0618 , CS0612 // allow testing obsolete methods
12using Xunit ;
23using StackExchange . Redis ;
34using NRedisStack . RedisStackCommands ;
@@ -2807,7 +2808,7 @@ public void TestProfileSearch(string endpointId)
28072808
28082809 var profile = ft . ProfileOnSearch ( index , new Query ( "foo" ) ) ;
28092810 // Iterators profile={Type=TEXT, Time=0.0, Term=foo, Counter=1, Size=1}
2810- var info = ( RedisResult [ ] ) profile . Item2 . Info ;
2811+ var info = ( RedisResult [ ] ) profile . Item2 . Info ! ;
28112812 int shardsIndex = Array . FindIndex ( info , item => item . ToString ( ) == "Shards" ) ;
28122813 int coordinatorIndex = Array . FindIndex ( info , item => item . ToString ( ) == "Coordinator" ) ;
28132814 CustomAssertions . GreaterThan ( shardsIndex , - 1 ) ;
@@ -2829,7 +2830,7 @@ public async Task TestProfileSearchAsync(string endpointId)
28292830 new HashEntry ( "t2" , "bar" ) } ) ;
28302831
28312832 var profile = await ft . ProfileOnSearchAsync ( index , new Query ( "foo" ) ) ;
2832- var info = ( RedisResult [ ] ) profile . Item2 . Info ;
2833+ var info = ( RedisResult [ ] ) profile . Item2 . Info ! ;
28332834 int shardsIndex = Array . FindIndex ( info , item => item . ToString ( ) == "Shards" ) ;
28342835 int coordinatorIndex = Array . FindIndex ( info , item => item . ToString ( ) == "Coordinator" ) ;
28352836 CustomAssertions . GreaterThan ( shardsIndex , - 1 ) ;
@@ -2889,7 +2890,7 @@ public void TestProfile(string endpointId)
28892890 var q = new Query ( "hello|world" ) . SetNoContent ( ) ;
28902891 var profileSearch = ft . ProfileOnSearch ( index , q ) ;
28912892 var searchRes = profileSearch . Item1 ;
2892- var searchDet = ( RedisResult [ ] ) profileSearch . Item2 . Info ;
2893+ var searchDet = ( RedisResult [ ] ) profileSearch . Item2 . Info ! ;
28932894
28942895 Assert . Equal ( 2 , searchRes . Documents . Count ) ;
28952896 int shardsIndex = Array . FindIndex ( searchDet , item => item . ToString ( ) == "Shards" ) ;
@@ -2901,7 +2902,7 @@ public void TestProfile(string endpointId)
29012902 var aggReq = new AggregationRequest ( "*" ) . Load ( FieldName . Of ( "t" ) ) . Apply ( "startswith(@t, 'hel')" , "prefix" ) ;
29022903 var profileAggregate = ft . ProfileOnAggregate ( index , aggReq ) ;
29032904 var aggregateRes = profileAggregate . Item1 ;
2904- var aggregateDet = ( RedisResult [ ] ) profileAggregate . Item2 . Info ;
2905+ var aggregateDet = ( RedisResult [ ] ) profileAggregate . Item2 . Info ! ;
29052906
29062907 Assert . Equal ( 2 , aggregateRes . TotalResults ) ;
29072908 shardsIndex = Array . FindIndex ( aggregateDet , item => item . ToString ( ) == "Shards" ) ;
@@ -2925,7 +2926,7 @@ public async Task TestProfileAsync(string endpointId)
29252926 var q = new Query ( "hello|world" ) . SetNoContent ( ) ;
29262927 var profileSearch = await ft . ProfileOnSearchAsync ( index , q ) ;
29272928 var searchRes = profileSearch . Item1 ;
2928- var searchDet = ( RedisResult [ ] ) profileSearch . Item2 . Info ;
2929+ var searchDet = ( RedisResult [ ] ) profileSearch . Item2 . Info ! ;
29292930
29302931 Assert . Equal ( 2 , searchRes . Documents . Count ) ;
29312932 int shardsIndex = Array . FindIndex ( searchDet , item => item . ToString ( ) == "Shards" ) ;
@@ -2937,7 +2938,7 @@ public async Task TestProfileAsync(string endpointId)
29372938 var aggReq = new AggregationRequest ( "*" ) . Load ( FieldName . Of ( "t" ) ) . Apply ( "startswith(@t, 'hel')" , "prefix" ) ;
29382939 var profileAggregate = await ft . ProfileOnAggregateAsync ( index , aggReq ) ;
29392940 var aggregateRes = profileAggregate . Item1 ;
2940- var aggregateDet = ( RedisResult [ ] ) profileAggregate . Item2 . Info ;
2941+ var aggregateDet = ( RedisResult [ ] ) profileAggregate . Item2 . Info ! ;
29412942
29422943 Assert . Equal ( 2 , aggregateRes . TotalResults ) ;
29432944 shardsIndex = Array . FindIndex ( aggregateDet , item => item . ToString ( ) == "Shards" ) ;
@@ -3021,7 +3022,7 @@ public void TestProfileIssue306(string endpointId)
30213022 var q = new Query ( "hello|world" ) . SetNoContent ( ) ;
30223023 var profileSearch = ft . ProfileOnSearch ( index , q ) ;
30233024 var searchRes = profileSearch . Item1 ;
3024- var searchDet = ( RedisResult [ ] ) profileSearch . Item2 . Info ;
3025+ var searchDet = ( RedisResult [ ] ) profileSearch . Item2 . Info ! ;
30253026
30263027 CustomAssertions . GreaterThan ( searchDet . Length , 3 ) ;
30273028 Assert . Equal ( 2 , searchRes . Documents . Count ) ;
@@ -3031,7 +3032,7 @@ public void TestProfileIssue306(string endpointId)
30313032 var aggReq = new AggregationRequest ( "*" ) . Load ( FieldName . Of ( "t" ) ) . Apply ( "startswith(@t, 'hel')" , "prefix" ) ;
30323033 var profileAggregate = ft . ProfileOnAggregate ( index , aggReq ) ;
30333034 var aggregateRes = profileAggregate . Item1 ;
3034- var aggregateDet = ( RedisResult [ ] ) profileAggregate . Item2 . Info ;
3035+ var aggregateDet = ( RedisResult [ ] ) profileAggregate . Item2 . Info ! ;
30353036 CustomAssertions . GreaterThan ( aggregateDet . Length , 3 ) ;
30363037 Assert . Equal ( 2 , aggregateRes . TotalResults ) ;
30373038 }
@@ -3051,7 +3052,7 @@ public async Task TestProfileAsyncIssue306(string endpointId)
30513052 var q = new Query ( "hello|world" ) . SetNoContent ( ) ;
30523053 var profileSearch = await ft . ProfileOnSearchAsync ( index , q ) ;
30533054 var searchRes = profileSearch . Item1 ;
3054- var searchDet = ( RedisResult [ ] ) profileSearch . Item2 . Info ;
3055+ var searchDet = ( RedisResult [ ] ) profileSearch . Item2 . Info ! ;
30553056
30563057 CustomAssertions . GreaterThan ( searchDet . Length , 3 ) ;
30573058 Assert . Equal ( 2 , searchRes . Documents . Count ) ;
@@ -3060,7 +3061,7 @@ public async Task TestProfileAsyncIssue306(string endpointId)
30603061 var aggReq = new AggregationRequest ( "*" ) . Load ( FieldName . Of ( "t" ) ) . Apply ( "startswith(@t, 'hel')" , "prefix" ) ;
30613062 var profileAggregate = await ft . ProfileOnAggregateAsync ( index , aggReq ) ;
30623063 var aggregateRes = profileAggregate . Item1 ;
3063- var aggregateDet = ( RedisResult [ ] ) profileAggregate . Item2 . Info ;
3064+ var aggregateDet = ( RedisResult [ ] ) profileAggregate . Item2 . Info ! ;
30643065 CustomAssertions . GreaterThan ( aggregateDet . Length , 3 ) ;
30653066 Assert . Equal ( 2 , aggregateRes . TotalResults ) ;
30663067 }
@@ -3438,15 +3439,15 @@ public void TestDocumentLoad_Issue352()
34383439 /// </summary>
34393440 [ SkippableTheory ]
34403441 [ MemberData ( nameof ( EndpointsFixture . Env . StandaloneOnly ) , MemberType = typeof ( EndpointsFixture . Env ) ) ]
3441- public async void TestDocumentLoadWithDB_Issue352 ( string endpointId )
3442+ public async Task TestDocumentLoadWithDB_Issue352 ( string endpointId )
34423443 {
34433444 IDatabase db = GetCleanDatabase ( endpointId ) ;
34443445 var ft = db . FT ( ) ;
34453446
34463447 Schema sc = new Schema ( ) . AddTextField ( "firstText" , 1.0 ) . AddTextField ( "lastText" , 1.0 ) . AddNumericField ( "ageNumeric" ) ;
34473448 Assert . True ( ft . Create ( index , FTCreateParams . CreateParams ( ) , sc ) ) ;
34483449
3449- Document droppedDocument = null ;
3450+ Document ? droppedDocument = null ;
34503451 int numberOfAttempts = 0 ;
34513452 do
34523453 {
0 commit comments