Open hohwille opened 2 weeks ago
I assume the error will come back. We can simply reopen and remove milestone if that happens.
Issue still occurs as seen in: https://github.com/devonfw/IDEasy/actions/runs/11340850609/job/31537989280?pr=674 So we need to re-open this issue.
As a IDEasy developer, I want to have deterministic JUnit tests so that I can rely on their results and CI status.
It all started with #648 where we changed our generated start-script that delegates to the actual tool to run in background.
Since that is now processing asynchronous in the background the process may terminate for Java before the output is printed and received. As a workaround we started writing the output to a file instead of echoing it and assuming that it will be captured and logged. Therefore also the assertions all had to be refactored to assert the message not from the logs anymore but from the file where the script is writing the output to. Now in #667 we had the effect that even that failed because the file was created in background while the JUnit in the foreground ran the assertion for the file before it was actually created in the background.
Thoughts:
&
is really that important for the end-user or if we simply want to prevent all this background and async processing. Still we start the real process in BACKGROUND mode - but however in JUnits we mock the process mode inProcessContextTestImpl
so we never actually run processes directly withProcessMode.BACKGROUND
.