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

Upgrading blueocean to plugin-pom:2.8+ breaks unit tests

XMLWordPrintable

      Vivek and I have been able to reliably reproduce test failures in blueocean-plugin when using the plugin-pom:2.28. I also saw these errors using a 2.27 snapshot deployed in support of JENKINS-43411

      The tests pass when run in CI, or when individual tests are run locally. But when running a full build locally (mvn clean install) the tests fail 100% of the time. Vivek believes it's related to jenkins-test-harness:2.22.

      blueocean-pipeline-api-impl has the following broken tests:

      Failed tests:
      BranchContainerImplTest.testBranchOrdering:57 expected:<200> but was:<403>
      MultiBranchTest.createUserFavouriteMultibranchBranchTest:666 expected:<200> but was:<403>
      MultiBranchTest.createUserFavouriteMultibranchTopLevelTest:591 expected:<200> but was:<403>
      Tests in error:
      CredentialApiTest.createSshCredentialUsingDefaultSshOnMasterInUserStore:250 » Runtime
      CredentialApiTest.createSshCredentialUsingDirectSshInUserStore:213 » Runtime c...
      CredentialApiTest.createUsingUsernamePasswordInUserStore:186 » Runtime com.mas...
      MultiBranchTest.favoritedFromClassicTest:741 » Runtime com.mashape.unirest.htt...

      And here's one of the more interesting error details:

      {
        "message" : "This user 'anonymous' cannot access resource owned by 'alice'",
        "code" : 403,
        "errors" : [ ]
      }; line: 1, column: 1]
      	at io.jenkins.blueocean.rest.impl.pipeline.PipelineBaseTest$RequestBuilder.build(PipelineBaseTest.java:542)
      	at io.jenkins.blueocean.rest.impl.pipeline.MultiBranchTest.favoritedFromClassicTest(MultiBranchTest.java:741)
      	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.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
      	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
      	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
      	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
      	at org.jvnet.hudson.test.JenkinsRule$2.evaluate(JenkinsRule.java:547)
      	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.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	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)
      

            Unassigned Unassigned
            cliffmeyers Cliff Meyers
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: