[reindex] Wait for headers
The test was checking that we'd set the headers properly but in some cases the request had yet to come in because it was running on another thread. Now we wait for the headers to show up before failing the test. Closes #17299
This commit is contained in:
parent
baec7bc23c
commit
48aaebf23d
|
@ -178,7 +178,12 @@ public class AsyncBulkByScrollActionTests extends ESTestCase {
|
|||
* isn't counted as time that the last batch took.
|
||||
*/
|
||||
assertThat(action.getLastBatchStartTime(), greaterThanOrEqualTo(now));
|
||||
assertEquals(expectedHeaders, client.lastHeaders.get());
|
||||
|
||||
/*
|
||||
* Also while we're here check that we preserved the headers from the last request. assertBusy because no requests might have
|
||||
* come in yet.
|
||||
*/
|
||||
assertBusy(() -> assertEquals(expectedHeaders, client.lastHeaders.get()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue