=pro #3753 Override dependency versions from command line
This commit is contained in:
parent
4d05253391
commit
00a268b6b3
9 changed files with 78 additions and 45 deletions
|
|
@ -52,14 +52,16 @@ class PatternSpec extends AkkaSpec("akka.actor.serialize-messages = off") {
|
|||
|
||||
"pattern.after" must {
|
||||
"be completed successfully eventually" in {
|
||||
val f = after(1 second, using = system.scheduler)(Promise.successful(5).future)
|
||||
// TODO after is unfortunately shadowed by ScalaTest, fix as part of #3759
|
||||
val f = akka.pattern.after(1 second, using = system.scheduler)(Promise.successful(5).future)
|
||||
|
||||
val r = Future.firstCompletedOf(Seq(Promise[Int]().future, f))
|
||||
Await.result(r, remaining) must be(5)
|
||||
}
|
||||
|
||||
"be completed abnormally eventually" in {
|
||||
val f = after(1 second, using = system.scheduler)(Promise.failed(new IllegalStateException("Mexico")).future)
|
||||
// TODO after is unfortunately shadowed by ScalaTest, fix as part of #3759
|
||||
val f = akka.pattern.after(1 second, using = system.scheduler)(Promise.failed(new IllegalStateException("Mexico")).future)
|
||||
|
||||
val r = Future.firstCompletedOf(Seq(Promise[Int]().future, f))
|
||||
intercept[IllegalStateException] { Await.result(r, remaining) }.getMessage must be("Mexico")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue