fix: resolves and addition tests for child preStart supervise#1385
fix: resolves and addition tests for child preStart supervise#1385pjfanning merged 10 commits intoapache:mainfrom
Conversation
|
From the perspective of stack frame, the problem lies in the handling: pekko/actor/src/main/scala/org/apache/pekko/actor/dungeon/FaultHandling.scala Lines 158 to 163 in 46c5574 |
| if (_actor != null) { | ||
| clearActorFields(actor, recreate = false) | ||
| setFailedFatally() | ||
| setFailed(actor.self) |
There was a problem hiding this comment.
I am not sure if this change will break other cases or not, I will investigate later.
relate PR:
There was a problem hiding this comment.
After investigation, we can not set the fault state here... otherwise, we can not distinguish between fatal and normal fault
There was a problem hiding this comment.
(these links to Akka PRs are OK because they're old, pre-BSL PRs :) )
|
I think we can attach a test case for this, will look into this over the weekend. |
|
@sadekmunawar Hi, my unit test partly refers to your code in #1383 links. Would you like to contribute this to the Pekko community? |
@pjfanning Am I doing this correctly, may I ask? |
The test code was written by https://discuss.lightbend.com/u/nodeninja/summary @sadekmunawar can you confirm if that is you? We received your iCLA. |
@pjfanning yes, that's me. After finding the bug, I wrote that test for a solution I implemented. My solution converts the I also wrote a scala version of this test in |
|
lgtm. |
| expectMsg(42) | ||
| } | ||
|
|
||
| "not break supervisor strategy due to unhandled exception in preStart" in { |
Thanks, I have updated this PR and verified it works in locally |
|
@Roiocam should we backport this to this 1.0.x branch? |
…#1385) * chore: add unit test for child actor initial exception supervise * make assertion correct * trying to fix assertion failed * distinguish between fatal and normal fault * fix unit tests * trying to fix * fix NPE * revert isFailed condition * revert isFailed place * additional tests
…#1396) * chore: add unit test for child actor initial exception supervise * make assertion correct * trying to fix assertion failed * distinguish between fatal and normal fault * fix unit tests * trying to fix * fix NPE * revert isFailed condition * revert isFailed place * additional tests
|
It looks like the checks did not run the tests in When I ran the tests locally, two tests in
Can someone check if these two unit tests pass? |
Those tests are tagged as long-running tests. Maybe such tests are not run by default. Did those tests fail before this PR was added? |
No, they passed in my local workspace before this PR was added. Unless there's something wrong with my local setup, this PR is the likely cause of the failures. I ran into issues with these two unit tests when experimenting with my own fix. |
|
I will investigate it. :) |
|
both |
Related with #1384 and resolves #1384, some of code contributed by @sadekmunawar
if PR can reproducer this issue, the ci checks will be unable to successd: https://github.com/apache/pekko/actions/runs/9770536752/job/26971887726?pr=1385