Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-44444

Matrix-project is failing the PCT

    Details

    • Similar Issues:

      Description

      Description

      matrix-project is failing when executing on the PCT against cores >= 1.653, the failling test is MatrixRunTest

      MatrixRunTest fails due to a this change in the CauseAction added in 1.653, as result of this change the OldDataMonitor is triggered and a NPE is thrown due to the lack of  parent

       

      unmarshalRunMatrix(hudson.matrix.MatrixRunTest) Time elapsed: 7.629 sec <<< ERROR!
      com.thoughtworks.xstream.converters.ConversionException: 
      null : null
      ---- Debugging information ----
      cause-exception : java.lang.NullPointerException
      cause-message : null
      class : hudson.matrix.MatrixRun
      required-type : hudson.matrix.MatrixRun
      converter-type : hudson.util.RobustReflectionConverter
      path : /matrix-run
      line number : 39
      version : not available
      -------------------------------
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
      at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1189)
      at hudson.util.XStream2.unmarshal(XStream2.java:114)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1173)
      at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1053)
      at hudson.matrix.MatrixRunTest.unmarshalRunMatrix(MatrixRunTest.java:50)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.jvnet.hudson.test.JenkinsRule$2.evaluate(JenkinsRule.java:534)
      at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
      at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
      at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
      at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
      at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
      at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
      at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
      Caused by: java.lang.NullPointerException
      at hudson.diagnosis.OldDataMonitor.referTo(OldDataMonitor.java:388)
      at hudson.diagnosis.OldDataMonitor.report(OldDataMonitor.java:161)
      at hudson.diagnosis.OldDataMonitor.report(OldDataMonitor.java:202)
      at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:371)
      at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:270)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
      ... 36 more
      

       

      To Reproduce

      mvn clean compile test-compile && mvn surefire:test -Djenkins.version=2.46.2 -Dtest=MatrixRun* -Djava.level=7
      

      The jenkins.version property can be any higher or equal to 1.653

      Extra comments

      The tests are fine against the baseline and someone could argue that there is no point in running the PCT or that this is not an issue, however I believe that being able to test a plugin against versions of the core newer than the one defined in the baseline is useful if the fix to make this possible does not imply a baseline bump or breaks existing behaviour

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            OldDataMonitor is indeed getting notified because of CauseAction.causes. But the NPE in referTo is not a bug in Jenkins core—it is a bug in the test, which is deserializing a Run incorrectly.

            Show
            jglick Jesse Glick added a comment - OldDataMonitor is indeed getting notified because of CauseAction.causes . But the NPE in referTo is not a bug in Jenkins core—it is a bug in the test, which is deserializing a Run incorrectly.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/test/java/hudson/matrix/MatrixRunTest.java
            src/test/resources/hudson/matrix/MatrixRunTest/unmarshalRunMatrix/jobs/p/builds/1/build.xml
            src/test/resources/hudson/matrix/MatrixRunTest/unmarshalRunMatrix/jobs/p/config.xml
            src/test/resources/hudson/matrix/MatrixRunTest/unmarshalRunMatrix/jobs/p/configurations/axis-x/1/builds/1/build.xml
            src/test/resources/hudson/matrix/MatrixRunTest/unmarshalRunMatrix/jobs/p/configurations/axis-x/1/config.xml
            src/test/resources/hudson/matrix/MatrixRunTest/unmarshalRunMatrix/jobs/p/nextBuildNumber
            src/test/resources/hudson/matrix/runMatrix.xml
            http://jenkins-ci.org/commit/matrix-project-plugin/ac364d6557ca1e763924e822e7fda7a20dde53e0
            Log:
            [FIXED JENKINS-44444] Corrected test to not send an orphaned Run to OldDataMonitor.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/test/java/hudson/matrix/MatrixRunTest.java src/test/resources/hudson/matrix/MatrixRunTest/unmarshalRunMatrix/jobs/p/builds/1/build.xml src/test/resources/hudson/matrix/MatrixRunTest/unmarshalRunMatrix/jobs/p/config.xml src/test/resources/hudson/matrix/MatrixRunTest/unmarshalRunMatrix/jobs/p/configurations/axis-x/1/builds/1/build.xml src/test/resources/hudson/matrix/MatrixRunTest/unmarshalRunMatrix/jobs/p/configurations/axis-x/1/config.xml src/test/resources/hudson/matrix/MatrixRunTest/unmarshalRunMatrix/jobs/p/nextBuildNumber src/test/resources/hudson/matrix/runMatrix.xml http://jenkins-ci.org/commit/matrix-project-plugin/ac364d6557ca1e763924e822e7fda7a20dde53e0 Log: [FIXED JENKINS-44444] Corrected test to not send an orphaned Run to OldDataMonitor.

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                rarabaolaza Raul Arabaolaza
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: