[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();
|
||||
|
||||
for (Thread thread : threads) {
|
||||
thread.join();
|
||||
}
|
||||
|
||||
// verify the 2 maps are the same
|
||||
assertThat(Iterables.toArray(map.values(), String.class), arrayContainingInAnyOrder(Iterables.toArray(verifier.values(), String.class)));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue