@@ -38,7 +38,7 @@ public async Task Free_text_search_index_should_be_used_by_default()
3838 [ Test ]
3939 public async Task Free_text_search_index_can_be_opted_out_from ( )
4040 {
41- await DatabaseSetup . CreateIndexes ( configuration . DocumentStore , false , CancellationToken . None ) ;
41+ await DatabaseSetup . CreateIndexes ( configuration . DocumentStore , false , TestTimeoutCancellationToken ) ;
4242
4343 var freeTextIndex = await configuration . DocumentStore . Maintenance . SendAsync ( new GetIndexOperation ( DatabaseSetup . MessagesViewIndexWithFulltextSearchName ) ) ;
4444 var nonFreeTextIndex = await configuration . DocumentStore . Maintenance . SendAsync ( new GetIndexOperation ( DatabaseSetup . MessagesViewIndexName ) ) ;
@@ -56,7 +56,7 @@ public async Task Indexes_should_be_reset_on_setup()
5656
5757 Assert . That ( indexWithCustomConfigStats . SearchEngineType , Is . EqualTo ( SearchEngineType . Lucene ) ) ;
5858
59- await DatabaseSetup . CreateIndexes ( configuration . DocumentStore , true , CancellationToken . None ) ;
59+ await DatabaseSetup . CreateIndexes ( configuration . DocumentStore , true , TestTimeoutCancellationToken ) ;
6060
6161 await WaitForIndexDefinitionUpdate ( indexWithCustomConfigStats ) ;
6262
@@ -78,7 +78,7 @@ public async Task Indexes_should_not_be_reset_on_setup_when_locked_as_ignore()
7878
7979 Assert . That ( indexStatsBefore . SearchEngineType , Is . EqualTo ( SearchEngineType . Lucene ) ) ;
8080
81- await DatabaseSetup . CreateIndexes ( configuration . DocumentStore , true , CancellationToken . None ) ;
81+ await DatabaseSetup . CreateIndexes ( configuration . DocumentStore , true , TestTimeoutCancellationToken ) ;
8282
8383 // raven will ignore the update since index was locked, so best we can do is wait a bit and check that settings hasn't changed
8484 await Task . Delay ( 1000 ) ;
@@ -98,25 +98,25 @@ public async Task Indexes_should_not_be_reset_on_setup_when_locked_as_error()
9898
9999 await UpdateIndex ( index ) ;
100100
101- Assert . ThrowsAsync < IndexCreationException > ( async ( ) => await DatabaseSetup . CreateIndexes ( configuration . DocumentStore , true , CancellationToken . None ) ) ;
101+ Assert . ThrowsAsync < IndexCreationException > ( async ( ) => await DatabaseSetup . CreateIndexes ( configuration . DocumentStore , true , TestTimeoutCancellationToken ) ) ;
102102 }
103103
104- async Task < IndexStats > UpdateIndex ( IAbstractIndexCreationTask index , CancellationToken cancellationToken = default )
104+ async Task < IndexStats > UpdateIndex ( IAbstractIndexCreationTask index )
105105 {
106- var statsBefore = await configuration . DocumentStore . Maintenance . SendAsync ( new GetIndexStatisticsOperation ( index . IndexName ) , cancellationToken ) ;
106+ var statsBefore = await configuration . DocumentStore . Maintenance . SendAsync ( new GetIndexStatisticsOperation ( index . IndexName ) , TestTimeoutCancellationToken ) ;
107107
108- await IndexCreation . CreateIndexesAsync ( [ index ] , configuration . DocumentStore , null , null , cancellationToken ) ;
108+ await IndexCreation . CreateIndexesAsync ( [ index ] , configuration . DocumentStore , null , null , TestTimeoutCancellationToken ) ;
109109
110- return await WaitForIndexDefinitionUpdate ( statsBefore , cancellationToken ) ;
110+ return await WaitForIndexDefinitionUpdate ( statsBefore ) ;
111111 }
112112
113- async Task < IndexStats > WaitForIndexDefinitionUpdate ( IndexStats oldStats , CancellationToken cancellationToken = default )
113+ async Task < IndexStats > WaitForIndexDefinitionUpdate ( IndexStats oldStats )
114114 {
115115 while ( true )
116116 {
117117 try
118118 {
119- var newStats = await configuration . DocumentStore . Maintenance . SendAsync ( new GetIndexStatisticsOperation ( oldStats . Name ) , cancellationToken ) ;
119+ var newStats = await configuration . DocumentStore . Maintenance . SendAsync ( new GetIndexStatisticsOperation ( oldStats . Name ) , TestTimeoutCancellationToken ) ;
120120
121121 if ( newStats . CreatedTimestamp > oldStats . CreatedTimestamp )
122122 {
@@ -128,7 +128,7 @@ async Task<IndexStats> WaitForIndexDefinitionUpdate(IndexStats oldStats, Cancell
128128 // keep going since we can get this if we query right when the update happens
129129 }
130130
131- await Task . Delay ( TimeSpan . FromMilliseconds ( 100 ) , cancellationToken ) ;
131+ await Task . Delay ( TimeSpan . FromMilliseconds ( 100 ) , TestTimeoutCancellationToken ) ;
132132 }
133133 }
134134}
0 commit comments