@@ -24,7 +24,7 @@ public class GithubIssue2751: IClusterFixture<ReadOnlyCluster>
2424 * the response from /project/project/_search to 5 seconds. See this issue's accompanying PR.
2525 */
2626
27- // [I]
27+ [ I ]
2828 public async Task TimeoutOfRequestReturnsResponse ( )
2929 {
3030 var client = TestClient . GetClient ( modifySettings : c => c . RequestTimeout ( TimeSpan . FromSeconds ( 2 ) ) ) ;
@@ -52,7 +52,7 @@ public async Task TimeoutOfRequestReturnsResponse()
5252 //cancelling an async request should behave differently
5353 stopwatch . Restart ( ) ;
5454 var ctx = new CancellationTokenSource ( ) ;
55- var task = client . SearchAsync < Project > ( s=> s , ctx . Token ) ;
55+ var task = client . SearchAsync < Project > ( s=> s . RequestConfiguration ( r => r . CancellationToken ( ctx . Token ) ) ) ;
5656 await Task . Delay ( 100 ) ;
5757 ctx . Cancel ( ) ;
5858 response = await task ;
@@ -67,7 +67,7 @@ public async Task TimeoutOfRequestReturnsResponse()
6767 response . ApiCall . AuditTrail . Should ( ) . Contain ( a=> a . Event == AuditEvent . CancellationRequested ) ;
6868 }
6969
70- // [I]
70+ [ I ]
7171 public async Task UserCancellationDoesNotCauseFailOverToNextNode ( )
7272 {
7373 //this tests assumes only a single node is running under 9200 and fiddler is set up to artificially delay results
@@ -76,7 +76,7 @@ public async Task UserCancellationDoesNotCauseFailOverToNextNode()
7676 modifySettings : c => c . RequestTimeout ( TimeSpan . FromSeconds ( 2 ) ) ) ;
7777
7878 var ctx = new CancellationTokenSource ( ) ;
79- var task = client . SearchAsync < Project > ( s=> s , ctx . Token ) ;
79+ var task = client . SearchAsync < Project > ( s=> s . RequestConfiguration ( r => r . CancellationToken ( ctx . Token ) ) ) ;
8080 await Task . Delay ( 100 ) ;
8181 ctx . Cancel ( ) ;
8282 var response = await task ;
0 commit comments