I tried to use standard CLI connection from test and it works fine with Describables that comes from core. Custom (plugin) Describable initialised in Callable through channel missing Descriptor because this object doesn't match by java link (more specifically `type` from clazz) for Describable loaded on remote side (master jvm). Looks like RemoteClassloader vs WebApp classloader works differently for different Describables. Can't standard CLI.channel() works with plugin Describable or i must implemented custom hole with Agent+uberclassloader?
On Monday, September 14, 2015 at 7:19:23 PM UTC+3, Jesse Glick wrote: > > On Sun, Sep 13, 2015 at 11:50 AM, Kanstantsin Shautsou > <kanstan...@gmail.com <javascript:>> wrote: > > Seems that existed ATH code can be extended for creating channel, that > can > > support automatic classloading and tests execution on remote side. > > The idea is to programmatically prepare complex environment (my test > code) > > I guess you mean you want Java test code (`src/test/java/`) which > links against core/plugin types, but which ought to be loaded not by > the Java application class loader, but by a loader inside the remote > Jenkins JVM. > > > http://hg.netbeans.org/main-silver/file/a976d656a742/nbjunit/src/org/netbeans/junit/NbModuleSuite.java#l819 > > > is an example (in the NetBeans functional test system), though it > would be more applicable to adding this feature to `JenkinsRule` (if > we wanted it to use a more realistic class loading scheme). > > > run remote JenkinsController (existed ATH), get channel connection to it > > (add such feature in ATH), call Junit test execution on channel > > I suspect you would need to add a custom support plugin to the Jenkins > server (see, e.g., `LocalController` and `RemoteJenkinsProvider` which > add `form-element-path`) which would add a `AgentProtocol` that would > use `ChannelBuilder` to set up a remoting channel (see > `JnlpSlaveAgentProtocol` for an example) that trusts the client to > send class files (your test code) to the master, loading them in a new > `ClassLoader` based on `uberClassLoader` (cf. `GroovyshCommand`). > > All should be possible, but difficult code to write—you will need to > know Remoting pretty intimately. > -- 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 jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/e6f29068-f0e4-4937-9549-28fb555f753b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.