=per #3829 Set default expectation timeout to 10s

This commit is contained in:
Martin Krasser 2014-01-20 09:32:53 +01:00
parent 34f9f4cfb9
commit b4c57fc899
6 changed files with 7 additions and 14 deletions

View file

@ -189,7 +189,7 @@ abstract class ChannelSpec(config: Config) extends AkkaSpec(config) with Persist
1 to 3 foreach { i channel ! Deliver(Persistent(i), system.deadLetters.path) }
probe.expectMsgAllOf(10.seconds, 1, 2, 3)
probe.expectMsgAllOf(1, 2, 3)
system.stop(channel)
}
}

View file

@ -311,7 +311,7 @@ abstract class EventsourcedSpec(config: Config) extends AkkaSpec(config) with Pe
expectMsg("c")
expectMsg("a")
}
"support user stash operations with several stashed messages" in within(10.seconds) {
"support user stash operations with several stashed messages" in {
val processor = namedProcessor[UserStashManyProcessor]
val n = 10
val cmds = 1 to n flatMap (_ List(Cmd("a"), Cmd("b-1"), Cmd("b-2"), Cmd("c")))
@ -321,7 +321,7 @@ abstract class EventsourcedSpec(config: Config) extends AkkaSpec(config) with Pe
processor ! GetState
expectMsg((List("a-1", "a-2") ++ evts))
}
"support user stash operations under failures" in within(5.seconds) {
"support user stash operations under failures" in {
val processor = namedProcessor[UserStashFailureProcessor]
val bs = 1 to 10 map ("b-" + _)
processor ! Cmd("a")

View file

@ -55,6 +55,7 @@ object PersistenceSpec {
akka.persistence.journal.plugin = "akka.persistence.journal.${plugin}"
akka.persistence.journal.leveldb.dir = "target/journal-${test}"
akka.persistence.snapshot-store.local.dir = "target/snapshots-${test}/"
akka.test.single-expect-default = 10s
""")
}

View file

@ -147,7 +147,7 @@ abstract class ProcessorSpec(config: Config) extends AkkaSpec(config) with Persi
processor ! Persistent("a")
processor ! Persistent("b")
processor ! GetState
expectMsg(5.seconds, List("a-1", "b-2"))
expectMsg(List("a-1", "b-2"))
}
"A processor" must {

View file

@ -86,7 +86,7 @@ class SharedLeveldbJournalSpec extends AkkaSpec(SharedLeveldbJournalSpec.config)
appA ! Persistent("a1")
appB ! Persistent("b1")
processorAProbe.expectMsg(5.seconds, "a1")
processorAProbe.expectMsg("a1")
processorBProbe.expectMsg("b1")
val recoveredAppA = processorASystem.actorOf(Props(classOf[ExampleApp], processorAProbe.ref, storePath))

View file

@ -5,18 +5,13 @@
package akka.persistence.serialization
import scala.collection.immutable
import scala.concurrent._
import scala.concurrent.duration._
import scala.util._
import com.typesafe.config._
import akka.actor._
import akka.pattern.ask
import akka.persistence._
import akka.serialization._
import akka.testkit._
import akka.util.Timeout
object SerializerSpecConfigs {
val customSerializers = ConfigFactory.parseString(
@ -166,11 +161,8 @@ object MessageSerializerRemotingSpec {
system.asInstanceOf[ExtendedActorSystem].provider.getDefaultAddress
}
class MessageSerializerRemotingSpec extends AkkaSpec(remote.withFallback(customSerializers)) with ImplicitSender {
implicit val timeout = Timeout(5.seconds)
class MessageSerializerRemotingSpec extends AkkaSpec(remote.withFallback(customSerializers)) with ImplicitSender with DefaultTimeout {
import MessageSerializerRemotingSpec._
import system.dispatcher
val remoteSystem = ActorSystem("remote", remote.withFallback(customSerializers))
val localActor = system.actorOf(Props(classOf[LocalActor], port(remoteSystem)), "local")