revert changes to java api
This commit is contained in:
parent
c62e6096d3
commit
e18cc7bac6
3 changed files with 17 additions and 6 deletions
|
|
@ -62,8 +62,8 @@ class FutureSpec extends JUnitSuite {
|
|||
def shouldFutureCompose {
|
||||
val actor1 = actorOf[TestActor].start()
|
||||
val actor2 = actorOf(new Actor { def receive = { case s: String ⇒ self reply s.toUpperCase } }).start()
|
||||
val future1 = actor1 ? "Hello" flatMap { case s: String ⇒ actor2 ? s }
|
||||
val future2 = actor1 ? "Hello" flatMap { case i: Int ⇒ actor2 ? i }
|
||||
val future1 = actor1 ? "Hello" flatMap { _ match { case s: String ⇒ actor2 ? s } }
|
||||
val future2 = actor1 ? "Hello" flatMap { _ match { case i: Int ⇒ actor2 ? i } }
|
||||
assert((future1.get: Any) === "WORLD")
|
||||
intercept[MatchError] { future2.get }
|
||||
actor1.stop()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue