mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 18:35:25 +00:00
[TEST] wait for threads to finish writing before checking
we need to make sure we wait for all threads to finish executing, since there might still be a thread around even post await (i.e. just starting) performing updates
This commit is contained in:
parent
7ca296987d
commit
8d793391da
@ -125,6 +125,10 @@ public class UpdateInPlaceMapTests extends ElasticsearchTestCase {
|
|||||||
|
|
||||||
numberOfMutations.await();
|
numberOfMutations.await();
|
||||||
|
|
||||||
|
for (Thread thread : threads) {
|
||||||
|
thread.join();
|
||||||
|
}
|
||||||
|
|
||||||
// verify the 2 maps are the same
|
// verify the 2 maps are the same
|
||||||
assertThat(Iterables.toArray(map.values(), String.class), arrayContainingInAnyOrder(Iterables.toArray(verifier.values(), String.class)));
|
assertThat(Iterables.toArray(map.values(), String.class), arrayContainingInAnyOrder(Iterables.toArray(verifier.values(), String.class)));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user