Finally i got it working with standard CLI, but:
1)  commit 
<https://github.com/jenkinsci/jenkins/commit/653fbdb65024b1b528e21f682172885f7111bba9#commitcomment-15107058>
 
in master was related to my issue with absent Descriptor for plugin objects 
created from CLI callables. I defined slaveAgentPort in config.xml but it 
wasn't returned in headers for CLI after jenkins become available. CLI 
fallbacks to http connection, that
2) httpCli connection with -Dhudson.diyChunking=false 
https://issues.jenkins-ci.org/browse/JENKINS-23232 
has different classloading?

On Monday, December 21, 2015 at 10:31:50 PM UTC+3, Kanstantsin Shautsou 
wrote:
>
> 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 
>> <[email protected]> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/39d07e38-ff40-43c8-8269-d7e588c3df45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to