Adding a more robust test for the SchedulerSpec

This commit is contained in:
Viktor Klang 2012-05-21 14:53:07 +02:00
parent 2a370520fd
commit c7ca6af927

View file

@ -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 {