diff options
author | Viktor Klang <viktor.klang@gmail.com> | 2012-07-19 15:27:28 +0200 |
---|---|---|
committer | phaller <hallerp@gmail.com> | 2012-07-19 16:56:39 +0200 |
commit | faf0f3de05e79af3fd7b5cf3bc3f97331e25042e (patch) | |
tree | 6b380cb7721af12c8290d56e248752649e766b7b /test/files/jvm/future-spec/PromiseTests.scala | |
parent | e75e862006b78d1a159c4ffb6194340492bd2de5 (diff) | |
download | scala-faf0f3de05e79af3fd7b5cf3bc3f97331e25042e.tar.gz scala-faf0f3de05e79af3fd7b5cf3bc3f97331e25042e.tar.bz2 scala-faf0f3de05e79af3fd7b5cf3bc3f97331e25042e.zip |
Critical bugfixes/leak fixes/API corrections + ScalaDoc for SIP-14
Diffstat (limited to 'test/files/jvm/future-spec/PromiseTests.scala')
-rw-r--r-- | test/files/jvm/future-spec/PromiseTests.scala | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/test/files/jvm/future-spec/PromiseTests.scala b/test/files/jvm/future-spec/PromiseTests.scala index 49bc642b57..d15bb31f36 100644 --- a/test/files/jvm/future-spec/PromiseTests.scala +++ b/test/files/jvm/future-spec/PromiseTests.scala @@ -78,7 +78,7 @@ object PromiseTests extends MinimalScalaTest { "contain a value" in { f((future, result) => future.value mustBe (Some(Right(result)))) } - "return result with 'blocking'" in { f((future, result) => blocking(future, defaultTimeout) mustBe (result)) } + "return when ready with 'Await.ready'" in { f((future, result) => Await.ready(future, defaultTimeout).isCompleted mustBe (true)) } "return result with 'Await.result'" in { f((future, result) => Await.result(future, defaultTimeout) mustBe (result)) } @@ -163,12 +163,9 @@ object PromiseTests extends MinimalScalaTest { }) } - "throw exception with 'blocking'" in { + "throw not throw exception with 'Await.ready'" in { f { - (future, message) => - intercept[E] { - blocking(future, defaultTimeout) - }.getMessage mustBe (message) + (future, message) => Await.ready(future, defaultTimeout).isCompleted mustBe (true) } } |