Fix tests

This commit is contained in:
pivovarit 2017-05-06 20:57:40 +02:00
parent 934fc3ff39
commit 6bda038a28
1 changed files with 3 additions and 1 deletions

View File

@ -8,6 +8,7 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.LongAdder;
import java.util.stream.IntStream;
import static com.jayway.awaitility.Awaitility.await;
import static junit.framework.TestCase.assertEquals;
public class LongAdderTest {
@ -60,6 +61,7 @@ public class LongAdderTest {
executorService.shutdown();
assertEquals(counter.sumThenReset(), numberOfIncrements * numberOfThreads);
assertEquals(counter.sum(), 0);
await().until(() -> assertEquals(counter.sum(), 0));
}
}