@@ -175,6 +175,7 @@ public static SearchResources CreateWithNoIndexes(SearchTestBase fixture)
175
175
/// <returns>A new TestResources context.</returns>
176
176
public static async Task < SearchResources > CreateWithEmptyIndexAsync < T > ( SearchTestBase fixture , bool isSample = false )
177
177
{
178
+ // TODO: consider setting up RequiresCleanup so the index is deleted at the end of the test run.
178
179
var resources = new SearchResources ( fixture ) ;
179
180
await resources . CreateSearchServiceAndIndexAsync ( isSample , name =>
180
181
new SearchIndex ( name )
@@ -195,6 +196,7 @@ await resources.CreateSearchServiceAndIndexAsync(isSample, name =>
195
196
/// <returns>A new TestResources context.</returns>
196
197
public static async Task < SearchResources > CreateWithEmptyHotelsIndexAsync ( SearchTestBase fixture , bool isSample = false )
197
198
{
199
+ // TODO: consider setting up RequiresCleanup so the index is deleted at the end of the test run.
198
200
var resources = new SearchResources ( fixture ) ;
199
201
await resources . CreateSearchServiceAndIndexAsync ( isSample ) ;
200
202
return resources ;
@@ -211,6 +213,7 @@ public static async Task<SearchResources> CreateWithEmptyHotelsIndexAsync(Search
211
213
/// <returns>A new TestResources context.</returns>
212
214
public static async Task < SearchResources > CreateWithHotelsIndexAsync ( SearchTestBase fixture , bool isSample = false )
213
215
{
216
+ // TODO: consider setting up RequiresCleanup so the index is deleted at the end of the test run.
214
217
var resources = new SearchResources ( fixture ) ;
215
218
await resources . CreateSearchServiceIndexAndDocumentsAsync ( isSample ) ;
216
219
return resources ;
@@ -230,6 +233,7 @@ public static async Task<SearchResources> CreateWithHotelsIndexAsync(SearchTestB
230
233
/// <returns>A new <see cref="SearchResources"/> context.</returns>
231
234
public static async Task < SearchResources > CreateWithBlobStorageAsync ( SearchTestBase fixture , bool populate = false , bool isSample = false )
232
235
{
236
+ // TODO: consider setting up RequiresCleanup so the index is deleted at the end of the test run.
233
237
var resources = new SearchResources ( fixture ) ;
234
238
await resources . CreateHotelsBlobContainerAsync ( populate , isSample ) ;
235
239
return resources ;
@@ -249,6 +253,7 @@ public static async Task<SearchResources> CreateWithBlobStorageAsync(SearchTestB
249
253
/// <returns>A new <see cref="SearchResources"/> context.</returns>
250
254
public static async Task < SearchResources > CreateWithBlobStorageAndIndexAsync ( SearchTestBase fixture , bool populate = false , bool isSample = false )
251
255
{
256
+ // TODO: consider setting up RequiresCleanup so the index is deleted at the end of the test run.
252
257
var resources = new SearchResources ( fixture ) ;
253
258
254
259
// Keep them ordered or records may not match seeded random names.
@@ -271,6 +276,8 @@ public static async Task<SearchResources> CreateWithBlobStorageAndIndexAsync(Sea
271
276
/// <returns>The shared TestResources context.</returns>
272
277
public static async Task < SearchResources > GetSharedHotelsIndexAsync ( SearchTestBase fixture , bool isSample = false )
273
278
{
279
+ // TODO: consider whether we should delete the index at the end of the test run here.
280
+ // SharedSearchResources seems to purposely cache the index.
274
281
await SharedSearchResources . EnsureInitialized ( async ( ) => await CreateWithHotelsIndexAsync ( fixture , isSample ) , isSample ) ;
275
282
276
283
// Clone it for the current fixture (note that setting these values
0 commit comments