diff --git a/tests/src/test/java/org/teavm/vm/VMTest.java b/tests/src/test/java/org/teavm/vm/VMTest.java index ca8d233ca..30d4cf37e 100644 --- a/tests/src/test/java/org/teavm/vm/VMTest.java +++ b/tests/src/test/java/org/teavm/vm/VMTest.java @@ -270,7 +270,9 @@ public class VMTest { try { Thread.sleep(1); - wait(); + synchronized (AsyncClinitClass.this) { + wait(); + } } catch (InterruptedException ie) { instanceState = "error"; throw new RuntimeException(ie);