[TEST} unmutes SearchAsyncActionTests and adds debugging info

This unmutes the testFanOutAndCollect()` method and add a check to make
sure we aren't accidentally running something twice causing a search
phase to still be running after we have counted down the latch

Relates to #29242
This commit is contained in:
Colin Goodheart-Smithe 2018-08-03 11:47:02 +01:00
parent eb17128b9c
commit d05f39de8b
No known key found for this signature in database
GPG Key ID: F975E7BDD739B3C7
1 changed files with 3 additions and 1 deletions

View File

@ -256,7 +256,6 @@ public class SearchAsyncActionTests extends ESTestCase {
assertEquals(10, numRequests.get()); assertEquals(10, numRequests.get());
} }
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/29242")
public void testFanOutAndCollect() throws InterruptedException { public void testFanOutAndCollect() throws InterruptedException {
SearchRequest request = new SearchRequest(); SearchRequest request = new SearchRequest();
request.allowPartialSearchResults(true); request.allowPartialSearchResults(true);
@ -347,6 +346,9 @@ public class SearchAsyncActionTests extends ESTestCase {
sendReleaseSearchContext(result.getRequestId(), new MockConnection(result.node), OriginalIndices.NONE); sendReleaseSearchContext(result.getRequestId(), new MockConnection(result.node), OriginalIndices.NONE);
} }
responseListener.onResponse(response); responseListener.onResponse(response);
if (latch.getCount() == 0) {
throw new AssertionError("Running a search phase after the latch has reached 0 !!!!");
}
latch.countDown(); latch.countDown();
} }
}; };