Fix race in OptionalSnapshotStoreSpec (#24323)
Subscribe to log events before creating the actor otherwise it might miss the log message it is testing for Refs #24144
This commit is contained in:
parent
2360de583d
commit
accfa21731
1 changed files with 1 additions and 2 deletions
|
|
@ -47,8 +47,8 @@ class OptionalSnapshotStoreSpec extends PersistenceSpec(ConfigFactory.parseStrin
|
|||
|
||||
"Persistence extension" must {
|
||||
"initialize properly even in absence of configured snapshot store" in {
|
||||
system.actorOf(Props(classOf[AnyPersistentActor], name))
|
||||
system.eventStream.subscribe(testActor, classOf[Logging.Warning])
|
||||
system.actorOf(Props(classOf[AnyPersistentActor], name))
|
||||
val message = expectMsgType[Warning].message.toString
|
||||
message should include("No default snapshot store configured")
|
||||
}
|
||||
|
|
@ -64,7 +64,6 @@ class OptionalSnapshotStoreSpec extends PersistenceSpec(ConfigFactory.parseStrin
|
|||
persistentActor ! "snap"
|
||||
expectMsgType[SaveSnapshotSuccess]
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue