How to increase default timeout for ScalaTestWithActorTestKit

柔情痞子 提交于 2021-01-07 02:41:11

问题


I have a test which constructs another event sourcing actor from inside message handler and this construction is taking more than 3 seconds. Below is current configuration, how can I increase default timeout?

  extends ScalaTestWithActorTestKit(
    ConfigFactory.parseString("""
    akka.persistence.testkit.events.serialize = off
    akka.actor.allow-java-serialization = on
    akka.test.single-expect-default = 999s
    """).withFallback(PersistenceTestKitPlugin.config).withFallback(ManualTime.config)

Here is the error message:

Timeout (3 seconds) during receiveMessage while waiting for message.
java.lang.AssertionError: Timeout (3 seconds) during receiveMessage while waiting for message.

来源:https://stackoverflow.com/questions/65133027/how-to-increase-default-timeout-for-scalatestwithactortestkit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!