reproduce issue where stackoverflow happens in unstash
see #1327
This doesn't cause the test to fail or abort - for some reason testkit/scalatest logs the stackoverflow but then claims no tests were run.
Uncaught error from thread [EventSourcedStashOverflowSpec-pekko.actor.default-dispatcher-9]: null, shutting down JVM since 'pekko.jvm-exit-on-fatal-error' is enabled for ActorSystem[EventSourcedStashOverflowSpec]
java.lang.StackOverflowError
at org.apache.pekko.actor.typed.internal.StashBufferImpl.unstash(StashBufferImpl.scala:206)
[info] Run completed in 3 seconds, 635 milliseconds.
[info] Total number of tests run: 0
[info] Suites: completed 0, aborted 0
[info] Tests: succeeded 0, failed 0, canceled 0, ignored 0, pending 0
[info] No tests were executed.
[info] No tests to run for persistence-typed-tests / Test / testOnly
Without this PR change, the test runs and succeeded: 1 is logged.
I have a possible solution but it is breaking quite a few tests so it needs more debugging. It is only one approach but by passing back a behavior wrapping the unstash instead of running the unstash in place - this avoids stack overflow issues. The broken tests show that it is not quite this simple and it may prove to be a dead end.
I have a possible solution but it is breaking quite a few tests so it needs more debugging. It is only one approach but by passing back a behavior wrapping the unstash instead of running the unstash in place - this avoids stack overflow issues. The broken tests show that it is not quite this simple and it may prove to be a dead end.
This 'solution' isn't working out.