Flaky test com.alipay.sofa.common.boot.logging.test.DefaultLevelTest#testDefaultLevel reported by the UIUC tool nondex. The particular testcase crashes due to multiple instances of the testcase fork trying to write to the same stream (as far as I understand):
Corrupted STDOUT by directly writing to native stream in forked JVM 1. Stream 'Error occurred during initialization of VM'.
java.lang.IllegalArgumentException: Stream stdin corrupted. Expected comma after third character in command 'Error occurred during initialization of VM'.
at org.apache.maven.plugin.surefire.booterclient.output.ForkClient$OperationalData.<init>(ForkClient.java:507)
at org.apache.maven.plugin.surefire.booterclient.output.ForkClient.processLine(ForkClient.java:210)
at org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:177)
at org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:88)
This is a known issue with the surefire plugin, mentioned in this StackOverflow thread.
As per the thread, I updated the plugin version to 3.0.0-M5, and all existing testcases pass for mvn test, but the original command for nondex hangs on the second test fork, with only the first one returning an output. Please advise.
To Reproduce
Steps to reproduce the behavior:
Update version for the maven.surefire.plugin to '3.0.0-M5' from '2.22.2' in both occurences
Add the <forkNode implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"/> line at line 436 in file .../sofa-boot/sofa-boot-project/sofa-boot-parent/pom.xml
Clean and re-build project
Run nondex command
See error
Expected behavior
Testcase should always pass, and not exhibit flaky behavior. Concurrent testcases should not hang on a shared resource.
Screenshots
N/A
Environment:
Project Version [e.g. SOFA-RPC 1.0.0] : 3.17.0
Language Version (e.g. Go 1.13): OpenJDK 11
OS version (e.g. uname -a): Linux Desktop-XXX 5.15.90.1-microsoft-standard-WSL2 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Describe the bug
Flaky test
com.alipay.sofa.common.boot.logging.test.DefaultLevelTest#testDefaultLevel
reported by the UIUC tool nondex. The particular testcase crashes due to multiple instances of the testcase fork trying to write to the same stream (as far as I understand):Command:
mvn edu.illinois:nondex-maven-plugin:2.1.1:nondex -pl sofa-boot-project/sofa-boot-starters/log-sofa-boot-starter -DnondexRuns=10 -Dtest=com.alipay.sofa.common.boot.logging.test.DefaultLevelTest#testDefaultLevel
Output:
This is a known issue with the surefire plugin, mentioned in this StackOverflow thread.
As per the thread, I updated the plugin version to
3.0.0-M5
, and all existing testcases pass formvn test
, but the original command for nondex hangs on the second test fork, with only the first one returning an output. Please advise.To Reproduce
Steps to reproduce the behavior:
maven.surefire.plugin
to '3.0.0-M5' from '2.22.2' in both occurences<forkNode implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"/>
line at line 436 in file.../sofa-boot/sofa-boot-project/sofa-boot-parent/pom.xml
Expected behavior
Testcase should always pass, and not exhibit flaky behavior. Concurrent testcases should not hang on a shared resource.
Screenshots
N/A
Environment:
uname -a
): Linux Desktop-XXX 5.15.90.1-microsoft-standard-WSL2 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/LinuxAdditional context
Add any other context about the problem here.