[JIRA] [plugin-compat-tester] (JENKINS-34129) Cannot release plugin due to injected tests failure

12 views
Skip to first unread message

tuicu@adobe.com (JIRA)

unread,
Apr 8, 2016, 10:51:02 AM4/8/16
to jenkinsc...@googlegroups.com
Andrei Tuicu created an issue
 
Jenkins / Bug JENKINS-34129
Cannot release plugin due to injected tests failure
Issue Type: Bug Bug
Assignee: Frédéric Camblor
Components: plugin-compat-tester
Created: 2016/Apr/08 2:50 PM
Environment: Apache Maven 3.3.9
Java versions: 1.7.0_79 or 1.8.0_73 (tested with both)
Jenkins: 1.609.1
OS El Capitan: 10.11.2
Labels: release-plugin
Priority: Critical Critical
Reporter: Andrei Tuicu

We cannot perform a plugin release, because two injected tests fail in the Jenkins job[0].
The code can be found on github here[1].

Steps to reproduce:
You can reproduce the problem, by cloning the repository and after running mvn clean install.

For the first test ( org.jvnet.hudson.test.junit.FailedTest.org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite):
We understand that there is a problem with Guava, but we have no idea how to fix it. Our plugin is indirectly dependent on it.

For the second test (org.jvnet.hudson.test.PluginAutomaticTestBuilder$CliSanityTest.testCliSanity):
We understand that there was a compatibility problem with Java 7 vs. 8. and it was resolved (see [2]), but even though we are using Jenkins 1.609.1, we are still seeing the problem, both locally with Java 7 and 8 and on the oficial Jenkins job.

Can we get some guidance for these problems?

Thank you,
Andrei Tuicu

[0] https://jenkins.ci.cloudbees.com/job/plugins/job/JiraTestResultReporter-plugin/
[1] https://github.com/jenkinsci/JiraTestResultReporter-plugin
[2] https://issues.jenkins-ci.org/browse/JENKINS-23239

Full stack trace:
Running InjectedTest
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 5.139 sec <<< FAILURE! - in InjectedTest
org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite(org.jvnet.hudson.test.junit.FailedTest) Time elapsed: 0.007 sec <<< ERROR!
java.lang.NoSuchMethodError: com.google.common.cache.CacheBuilder.build()Lcom/google/common/cache/Cache;
at hudson.model.Queue.<init>(Queue.java:216)
at jenkins.model.Jenkins.<init>(Jenkins.java:772)
at hudson.model.Hudson.<init>(Hudson.java:83)
at org.jvnet.hudson.test.HudsonTestCase.newHudson(HudsonTestCase.java:500)
at org.jvnet.hudson.test.HudsonTestCase.setUp(HudsonTestCase.java:330)
at org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite.setUp(JellyTestSuiteBuilder.java:133)
at org.jvnet.hudson.test.junit.GroupedTest.run(GroupedTest.java:49)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

testCliSanity(org.jvnet.hudson.test.PluginAutomaticTestBuilder$CliSanityTest) Time elapsed: 0.238 sec <<< ERROR!
java.lang.IllegalStateException: second instance
at jenkins.model.Jenkins.<init>(Jenkins.java:760)
at hudson.model.Hudson.<init>(Hudson.java:83)
at org.jvnet.hudson.test.HudsonTestCase.newHudson(HudsonTestCase.java:500)
at org.jvnet.hudson.test.HudsonTestCase.setUp(HudsonTestCase.java:330)
at junit.framework.TestCase.runBare(TestCase.java:139)
at org.jvnet.hudson.test.HudsonTestCase.runBare(HudsonTestCase.java:296)
at junit.framework.TestResult$1.protect(TestResult.java:122)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:129)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

tuicu@adobe.com (JIRA)

unread,
Apr 11, 2016, 7:19:02 AM4/11/16
to jenkinsc...@googlegroups.com
Andrei Tuicu updated an issue
Change By: Andrei Tuicu
Priority: Critical Blocker

luta.catalin@gmail.com (JIRA)

unread,
Apr 14, 2016, 12:45:01 PM4/14/16
to jenkinsc...@googlegroups.com
Catalin Luta updated an issue
Change By: Catalin Luta
Labels: release-plugin plugins

luta.catalin@gmail.com (JIRA)

unread,
Apr 14, 2016, 12:47:02 PM4/14/16
to jenkinsc...@googlegroups.com
Catalin Luta updated an issue
Change By: Catalin Luta
Labels: core guava plugins

luta.catalin@gmail.com (JIRA)

unread,
Apr 14, 2016, 12:47:02 PM4/14/16
to jenkinsc...@googlegroups.com
Catalin Luta updated an issue
Change By: Catalin Luta
Component/s: core
Component/s: plugin-compat-tester

luta.catalin@gmail.com (JIRA)

unread,
Apr 14, 2016, 12:47:04 PM4/14/16
to jenkinsc...@googlegroups.com
Catalin Luta updated an issue
Change By: Catalin Luta
Labels: build core guava  jdk maven  plugins

luta.catalin@gmail.com (JIRA)

unread,
Apr 14, 2016, 12:49:02 PM4/14/16
to jenkinsc...@googlegroups.com
Catalin Luta assigned an issue to Unassigned
Change By: Catalin Luta
Assignee: Frédéric Camblor

o.v.nenashev@gmail.com (JIRA)

unread,
Jun 2, 2016, 7:15:01 AM6/2/16
to jenkinsc...@googlegroups.com
Oleg Nenashev commented on Bug JENKINS-34129
 
Re: Cannot release plugin due to injected tests failure

Did you consider upgrading to the new plugin parent POM? It should align the library versions and test suites

tuicu@adobe.com (JIRA)

unread,
Jun 2, 2016, 7:23:01 AM6/2/16
to jenkinsc...@googlegroups.com

Hello, Oleg Nenashev,

I did upgrade to the new plugin POM, but that wasn't enough. I did manage to find a workaround, by excluding Guava as a indirect dependency and by adding some other dependencies manually.

The resulting POM can be found here: https://github.com/jenkinsci/JiraTestResultReporter-plugin/blob/master/pom.xml

Thank you,
Andrei

jglick@cloudbees.com (JIRA)

unread,
Jun 2, 2016, 12:34:04 PM6/2/16
to jenkinsc...@googlegroups.com
Jesse Glick resolved as Not A Defect
 

Maven’s dependency resolution algorithm gives preference to the “closest” version of a dependency, which is not always the newest, so you have to override with an <exclude>.

Change By: Jesse Glick
Status: Open Resolved
Resolution: Not A Defect

jglick@cloudbees.com (JIRA)

unread,
Jun 2, 2016, 12:38:01 PM6/2/16
to jenkinsc...@googlegroups.com
Jesse Glick commented on Bug JENKINS-34129
 
Re: Cannot release plugin due to injected tests failure

Check whether adding this enforcer rule causes your original POM to fail (and your revised one to pass). If so, we can consider adding it to the parent POM. CC Andres Rodriguez.

Reply all
Reply to author
Forward
0 new messages