Skip to content

Commit

Permalink
[TEST] wait for threads to finish writing before checking
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kimchy committed Jul 6, 2014
1 parent bdfbb0c commit 41b81f9
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -125,6 +125,10 @@ public void run() {

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)));
}
Expand Down

0 comments on commit 41b81f9

Please sign in to comment.