diff --git a/test/micro/org/openjdk/bench/java/lang/ThreadOnSpinWaitProducerConsumer.java b/test/micro/org/openjdk/bench/java/lang/ThreadOnSpinWaitProducerConsumer.java index e111b77ab51..a4778838a84 100644 --- a/test/micro/org/openjdk/bench/java/lang/ThreadOnSpinWaitProducerConsumer.java +++ b/test/micro/org/openjdk/bench/java/lang/ThreadOnSpinWaitProducerConsumer.java @@ -193,6 +193,7 @@ public class ThreadOnSpinWaitProducerConsumer { } } threadConsumer.interrupt(); + threadConsumer.join(); if (producedDataCount != maxNum) { throw new RuntimeException("Produced: " + producedDataCount + ". Expected: " + maxNum);