mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
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());
|
fail(e.getMessage());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
assertThat(indicesService.hasUncompletedPendingDeletes(), equalTo(hasBogus)); // "bogus" index has not been removed
|
assertBusy(() -> {
|
||||||
assertFalse(shardPath.exists());
|
assertThat(indicesService.hasUncompletedPendingDeletes(), equalTo(hasBogus)); // "bogus" index has not been removed
|
||||||
|
assertFalse(shardPath.exists());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testVerifyIfIndexContentDeleted() throws Exception {
|
public void testVerifyIfIndexContentDeleted() throws Exception {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user