Class java.util.concurrent.Executors was not found

411 Views Asked by At

I'm trying to use Awaitility in JUnit test, but getting this error

Class java.util.concurrent.Executors was not found
    at org.awaitility.core.InternalExecutorServiceFactory.create(InternalExecutorServiceFactory.java:47)
    at org.awaitility.core.ConditionFactory$12.get(ConditionFactory.java:885)
    at org.awaitility.core.ConditionFactory$12.get(ConditionFactory.java:882)
    at org.awaitility.core.ExecutorLifecycle.supplyExecutorService(ExecutorLifecycle.java:57)
    at org.awaitility.core.ConditionAwaiter.<init>(ConditionAwaiter.java:53)
    at org.awaitility.core.CallableCondition$1.<init>(CallableCondition.java:42)
    at org.awaitility.core.CallableCondition.<init>(CallableCondition.java:42)
    at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:860)

Anyone have experienced and know a fix for this?

1

There are 1 best solutions below

1
quarks On

The answer to this question is that I am running the JUnit test in TeaVM environment and this is not supported by the emulated JVM platform.