Hi Jesse, Thanks for pointing me to this ticket! It makes a good sense.
I tried acceptance-test-harness yesterday, but found it too flaky to be used. I managed to set it to detect Jenkins WAR from Maven, but test during Jenkins startup with some weird internal Guice errors. I tried both "extends AbstractJUnitTest" and @Rule, with the same result. And it opens the browser regardless of whether I want it or not. Looks like this harness is exactly for Jenkins builds' verification, and is flaky if used for other purposes. "request `remoting` 3.4.1 as a `test`-scoped dependency in your POM to override whatever that version of Jenkins shipped with." -------------- Actually that's the first option I tried in the beginning, but Jenkins 2.25 seems to be relying on some classes' existence from remoting 2.62. So if I force it to use remoting 3.4.1, it fails on startup, complaining about class missing in 3.4.1. Basically, that's the same issue when Swarm plugin client's classes get into the Jenkins's class loader - but in this case I'm pushing "bad" library forcibly. Also, I thought that dependency manipulation is not OK when it comes to integration testing. Because in this case you're not testing what you will have in the reality (like it's stressed in https://issues.jenkins-ci.org/browse/JENKINS-41827), therefore there's no much good in this test. That's why I thought of Jenkins started in a separate JVM as a better choice. Wouldn't this be easier than co-ordinating the class loaders, like in http://hg.netbeans.org/main/file/tip/nbjunit/src/org/netbeans/junit/NbModuleSuite.java ? 2017-05-02 17:32 GMT+01:00 Jesse Glick <[email protected]>: > On Sat, Apr 29, 2017 at 5:36 AM, Kirill <[email protected]> wrote: > > As the Swarm client's library is loaded > > before Jenkins (and it does, as it's one of the Maven module's > dependencies, > > so gets onto classpath right away), embedded Jenkins started by > JenkinsRule > > gets it as well, neglecting the remoting.jar in its WEB-INF. > > Cf. JENKINS-41827. For now your only options are to create an > acceptance test (realistic but slow and flaky and hard to couple with > plugin changes), or simply request `remoting` 3.4.1 as a `test`-scoped > dependency in your POM to override whatever that version of Jenkins > shipped with. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Jenkins Developers" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/jenkinsci-dev/rEk5FNjd7SU/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jenkinsci-dev/CANfRfr3WD6n4drqFqdDbELiL- > FOKQf-qcUM3CUTAgKs%2B3%3D_Uxw%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAH45hb8p2pr56Ma2Mz2xzpOinhfq_9a7hJDWjEjuYT9syRJnpg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
