Fix testPendingTasks (#42922)
Fixes a race in the test which can be reliably reproduced by adding Thread.sleep(100) to the end of IndicesService.processPendingDeletes Closes #18747
This commit is contained in:
parent
72735be673
commit
9f7be70f7a
|
@ -330,8 +330,10 @@ public class IndicesServiceTests extends ESSingleNodeTestCase {
|
|||
fail(e.getMessage());
|
||||
}
|
||||
});
|
||||
assertBusy(() -> {
|
||||
assertThat(indicesService.hasUncompletedPendingDeletes(), equalTo(hasBogus)); // "bogus" index has not been removed
|
||||
assertFalse(shardPath.exists());
|
||||
});
|
||||
}
|
||||
|
||||
public void testVerifyIfIndexContentDeleted() throws Exception {
|
||||
|
|
Loading…
Reference in New Issue