#2729 - Removing uses of Future.either in favor of firstCompletedOf

This commit is contained in:
Viktor Klang 2012-11-21 20:33:54 +01:00
parent 6a348e3c76
commit f386c4136f
2 changed files with 3 additions and 3 deletions

View file

@ -417,7 +417,7 @@ class FutureDocSpec extends AkkaSpec {
val delayed = after(200 millis, using = system.scheduler)(Future.failed(
new IllegalStateException("OHNOES")))
val future = Future { Thread.sleep(1000); "foo" }
val result = future either delayed
val result = Future firstCompletedOf Seq(future, delayed)
//#after
intercept[IllegalStateException] { Await.result(result, 2 second) }
}