Adding a more robust test for the SchedulerSpec
This commit is contained in:
parent
2a370520fd
commit
c7ca6af927
1 changed files with 6 additions and 1 deletions
|
|
@ -18,7 +18,12 @@ class SchedulerSpec extends AkkaSpec with BeforeAndAfterEach with DefaultTimeout
|
|||
}
|
||||
|
||||
override def afterEach {
|
||||
while (cancellables.peek() ne null) { Option(cancellables.poll()).foreach(_.cancel()) }
|
||||
while (cancellables.peek() ne null) {
|
||||
for (c ← Option(cancellables.poll())) {
|
||||
c.cancel()
|
||||
c.isCancelled must be === true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
"A Scheduler" must {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue