-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Fixing tests which attempted to restart the Surefire booter JVM #3804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Well build 1 passed indeed, but wound up running |
https://ci.jenkins.io/job/Core/job/jenkins/job/master/1179/execution/node/38/log/?consoleFull [WARNING] Corrupted stdin stream in forked JVM 2. See the dump file /home/jenkins/workspace/Core_jenkins_master-CZB5BLBJFXZE2BKR63DSXQKXRZJAOWBX73QP55GU5KMX7AHAF6CQ/test/target/surefire-reports/2018-12-12T10-57-04_077-jvmRun2.dumpstream
|
#3772 suggests that tests calling |
| stage("${buildType} Publishing") { | ||
| if (runTests) { | ||
| junit healthScaleFactor: 20.0, testResults: '*/target/surefire-reports/*.xml' | ||
| archiveArtifacts allowEmptyArchive: true, artifacts: '**/target/surefire-reports/*.dumpstream' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting, wasn''t aware of this feature. NIT then reading https://maven.apache.org/surefire/maven-surefire-plugin/faq.html#dumpfiles don't we actually want .dump in case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure what *.dump is exactly, but anyway an actual *.dumpstream file led me to a source code issue. Can always improve as needed.
Hmm, my idea was |
|
I cannot reproduce the error noted in #3772 running that single test, but weird behavior appears once you start running other tests too: mvn -f test surefire:test -Dtest=DisablePluginCommandTest,JenkinsBuildsAndWorkspacesDirectoriesTest,NodesTest,TransientActionFactoryTest -Pall-tests |
|
I think the problem is that the test JVM is getting a |
|
As an aside, I just noticed that a59814e puts the burden of calling |
MRamonLeon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean use RestartableJenkinsRule in the DisablePluginCommandTest and remove the Ignores @jglick? I didn't use it because EnablePluginCommandTest was so and I didn't need to do things on Jenkins after the restart.
No, because |
…ducible locally). Amends code added in jenkinsci#2082. java.lang.RuntimeException: Unexpected issues encountered during cleanUp: offset 0, count -1, length 5 at jenkins.model.Jenkins.cleanUp(Jenkins.java:3319) at org.jvnet.hudson.test.JenkinsRule.after(JenkinsRule.java:495) at org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:565) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: java.lang.StringIndexOutOfBoundsException: offset 0, count -1, length 5 at java.base/java.lang.String.checkBoundsOffCount(String.java:3304) at java.base/java.lang.String.<init>(String.java:465) at hudson.TcpSlaveAgentListener$PingAgentProtocol.connect(TcpSlaveAgentListener.java:416) at hudson.TcpSlaveAgentListener.shutdown(TcpSlaveAgentListener.java:196) at jenkins.model.Jenkins._cleanUpShutdownTcpSlaveAgent(Jenkins.java:3548) at jenkins.model.Jenkins.cleanUp(Jenkins.java:3294) ... 6 more
batmat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, let's merge once we get a green build.
I'll see to be if we can analyze all these through https://issues.jenkins-ci.org/browse/JENKINS-55122 once we get the situation back in control.
| stage("${buildType} Publishing") { | ||
| if (runTests) { | ||
| junit healthScaleFactor: 20.0, testResults: '*/target/surefire-reports/*.xml' | ||
| archiveArtifacts allowEmptyArchive: true, artifacts: '**/target/surefire-reports/*.dumpstream' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting, wasn''t aware of this feature. NIT then reading https://maven.apache.org/surefire/maven-surefire-plugin/faq.html#dumpfiles don't we actually want .dump in case?
| socket.getRemoteSocketAddress(), | ||
| new String(ping, "UTF-8"), | ||
| new String(response, 0, responseLength, "UTF-8") | ||
| responseLength > 0 && responseLength <= response.length ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@LinuxSuRen in short, if you need that very fix, there's none. |
|
During test junit test of all my plugins. I wonder that shall we should fix this in the older LTS? @batmat |
|
You mean when running your plugin's builds using Java 11? Sorry I am trying to make sure I get it. Anyway if you have a case for backporting this, this will need a JIRA labelled 'lts-candidate' and explanarions as to why it would be backported. Cheers |
|
I run my junit test from the IDEA. Java version is 8. |
|
Does it also fail on the command line using `mvn test` then? It will help
know if it's a general issue or specific to IntelliJ.
Le dim. 30 déc. 2018 à 05:25, Zhao Xiaojie <notifications@github.com> a
écrit :
… I run my junit test from the IDEA. Java version is 8.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3804 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AANqbSYQqGkL7i9G-4J0owv7Y-n9pB1zks5u-EBGgaJpZM4ZOqmv>
.
|
|
They're the same results. You can test it by using my repo. The link is here https://github.com/LinuxSuRen/alauda-devops-pipeline-plugin/tree/add-test-case. |
|
@LinuxSuRen the failure I see locally seems totally unrelated, just the typical issue with a wrong version of a plugin that prevents Jenkins from starting up. I would recommend the following:
Thanks |

Recent builds seem to be running this test over and over, finally timing out. I want to know if there is something about this test, or if there is some infrastructure change, etc. (I have not been able to track the issue down to a specific source commit.)