1

我正在尝试在 JUnit 测试中使用Awaitility,但收到此错误

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)

任何人都经历过并知道解决此问题的方法吗?

4

1 回答 1

1

这个问题的答案是我在TeaVM环境中运行 JUnit 测试,而模拟的JVM 平台不支持。

于 2018-08-27T12:13:37.573 回答