我正在尝试在 JUnit 测试中使用等待性,但收到此错误
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)
有人经历过并知道解决此问题的方法吗?
这个问题的答案是我在 TeaVM 环境中运行 JUnit 测试 模拟的JVM 平台不支持这一点。