나는 다음과 같은 테스트 클래스가 있습니다java.lang.IllegalMonitorStateException 테스트 할 때 스칼라 미래
test("Any should return the first future") {
val p = Promise[Int]()
p completeWith Future.any(List(Future{wait(2000); 1}, Future{wait(1); 2}))
whenReady(p.future) {x =>
assert(true)
}
}
(I : 그것은 내
@RunWith(classOf[JUnitRunner])
class NodeScalaSuite extends FunSuite with ScalaFutures {
, 나는 미래를 반환하는 방법을 확인하려면이 테스트를 추가 더 간단하게 디버깅하기 위해 assert를 true
으로 만들었습니다.)
테스트 스위트를 실행할 때 다음 오류가 발생합니다.
[info] The future returned an exception of type: java.lang.IllegalMonitorStateException.
어떻게 될 수 있습니까?