Renaming Block to Await, renaming sync to result, renaming on to ready, Await.ready and Await.result looks and reads well
This commit is contained in:
parent
d8fe6a5509
commit
b32cbbc764
66 changed files with 404 additions and 409 deletions
|
|
@ -19,7 +19,7 @@ abstract class MailboxSpec extends AkkaSpec with BeforeAndAfterAll with BeforeAn
|
|||
|
||||
val f = spawn { q.dequeue }
|
||||
|
||||
Block.sync(f, 1 second) must be(null)
|
||||
Await.result(f, 1 second) must be(null)
|
||||
}
|
||||
|
||||
"create a bounded mailbox with 10 capacity and with push timeout" in {
|
||||
|
|
@ -115,8 +115,8 @@ abstract class MailboxSpec extends AkkaSpec with BeforeAndAfterAll with BeforeAn
|
|||
|
||||
val consumers = for (i ← (1 to 4).toList) yield createConsumer
|
||||
|
||||
val ps = producers.map(Block.sync(_, within))
|
||||
val cs = consumers.map(Block.sync(_, within))
|
||||
val ps = producers.map(Await.result(_, within))
|
||||
val cs = consumers.map(Await.result(_, within))
|
||||
|
||||
ps.map(_.size).sum must be === totalMessages //Must have produced 1000 messages
|
||||
cs.map(_.size).sum must be === totalMessages //Must have consumed all produced messages
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue