# No output for exceptions in code executed by EventSourcedBehaviorTestKit.runCommand

**URL:** <https://discuss.akka.io/t/no-output-for-exceptions-in-code-executed-by-eventsourcedbehaviortestkit-runcommand/7784>\
**Category:** Persistence / Event Sourcing\
**Tags:** akka-typed, java\
**Created:** [January 28, 2021, 5:11pm UTC](https://discuss.akka.io/t/no-output-for-exceptions-in-code-executed-by-eventsourcedbehaviortestkit-runcommand/7784 "2021-01-28T17:11:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eso](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/eso/32/2070_2.png) [@eso](https://discuss.akka.io/u/eso)\
**Post date:** [January 28, 2021, 5:11pm UTC](https://discuss.akka.io/t/no-output-for-exceptions-in-code-executed-by-eventsourcedbehaviortestkit-runcommand/7784/1 "2021-01-28T17:11:53Z")

</div>

In my tests of event sourced actors with `EventSourcedBehaviorTestKit.runCommand` I noticed that if the code under test produces an error, the causing exception is not displayed. Instead the test kit only produces a timeout exception with an internal Akka stack trace and an error message like

> java.lang.AssertionError: Timeout (1 second) during receiveMessage while waiting for message

There is no hint to the actual cause of the timeout. That makes it very difficult to localize the problem during the implementation of tests. Is it possible to enable such output?

Somewhat related is the case of commands that have the side effect of stopping the actor under test (with `EffectBuilder.thenStop`). This also only causes the timeout described above, without a hint to the actual problem. Furthermore it makes it impossible to test commands that cause the target actor to stop. Is there another way to test “stopping” commands?
