diff --git a/test/micro/org/openjdk/bench/java/lang/ThreadOnSpinWaitProducerConsumer.java b/test/micro/org/openjdk/bench/java/lang/ThreadOnSpinWaitProducerConsumer.java
index e111b77ab5171..a4778838a8444 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 void trial(Blackhole bh) throws Exception {
             }
         }
         threadConsumer.interrupt();
+        threadConsumer.join();
 
         if (producedDataCount != maxNum) {
             throw new RuntimeException("Produced: " + producedDataCount + ". Expected: " + maxNum);