TestEventFilter overhaul

- make normal filters available for all four log levels
- allow filtering for
  + exact and complete message
  + start of message
  + regular expression
- keep count of occurrences if requested and verify correct count at end
  of filterEvents/filterExceptions block
- remove akka.testkit.Testing (sleepFor replaced by Duration.dilated.sleep)
- remove Duration.timeFactor (needs config -> AkkaApplication)
- TestLatch needs config -> AkkaApplication (was forgotten because used
  directly System.getProperty)
- lots of scaladoc for TestEventListener infrastructure
This commit is contained in:
Roland 2011-11-07 22:10:17 +01:00
parent 6559511bce
commit c1a9475015
23 changed files with 508 additions and 182 deletions

View file

@ -452,12 +452,6 @@ class TestKit(_app: AkkaApplication) {
lastWasNoMsg = true
}
/**
* Same as `receiveWhile(remaining)(f)`, but correctly treating the timeFactor.
*/
@deprecated("insert empty first parameter list", "1.2")
def receiveWhile[T](f: PartialFunction[AnyRef, T]): Seq[T] = receiveWhile(remaining / Duration.timeFactor)(f)
/**
* Receive a series of messages until one does not match the given partial
* function or the idle timeout is met (disabled by default) or the overall