karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: Jenkins + Maven + Pax-exam-karaf problem
Date Wed, 04 Oct 2017 05:09:48 GMT
Surefire >= 2.19 ?

I also depends what you do in the itest. What's your failing tests ?

Regards
JB

On 10/03/2017 04:55 PM, Giuseppe Gerla wrote:
> I don't understand....
> I try to build activemq project on my jenkins machine and integration tests
> work fine...
> I use same version of pax-exam, same version of surefire plugin, same
> version of karaf... why my tests don't work?
> 
> 
> 
> 
> 2017-10-02 14:32 GMT+02:00 Giuseppe Gerla <giuseppe.gerla@gmail.com>:
> 
>> Hi JB
>> I have a big doubt...
>> If the problem is the surefire plugin vesion, what is the version used by
>> pax-exam?
>> 2.19....
>> So although I specify in my pom that version is 2.20.1, what is the
>> version really used by pax-exam?
>>
>>
>>
>> Regards
>> Giuseppe
>>
>>
>>
>>
>>
>> 2017-10-02 12:28 GMT+02:00 Giuseppe Gerla <giuseppe.gerla@gmail.com>:
>>
>>> Hi JB
>>> Unfortunately I tryed on jenkins machine and I have always the same
>>> problem.
>>> In the surfire dumpstream file I have this error
>>>
>>> # Created on 2017-10-02T10:03:04.024
>>> [SUREFIRE] std/in stream corrupted
>>> java.io.IOException: Command NOOP unexpectedly read Void data with length
>>> 4.
>>> at org.apache.maven.surefire.booter.MasterProcessCommand.decode
>>> (MasterProcessCommand.java:130)
>>> at org.apache.maven.surefire.booter.CommandReader$CommandRunnab
>>> le.run(CommandReader.java:391)
>>> at java.lang.Thread.run(Thread.java:745)
>>>
>>> The problem is always randomic and occurs if I run with jenkins but also
>>> if I run command by bash.
>>>
>>>
>>>
>>>
>>> Regards
>>> Giuseppe
>>>
>>>
>>>
>>> 2017-10-01 21:41 GMT+02:00 Jean-Baptiste Onofré <jb@nanthrax.net>:
>>>
>>>> Hi Giuseppe,
>>>>
>>>> just tried to upgrade to surefire 2.20.1 on Karaf, and the itests seem
>>>> overall OK (just an issue with BundleTest that I'm checking now).
>>>>
>>>> Regards
>>>> JB
>>>>
>>>>
>>>> On 10/01/2017 08:12 PM, Giuseppe Gerla wrote:
>>>>
>>>>> Hi JB
>>>>> thanks for your support. Today I do some progress...
>>>>> In cxf pom (https://github.com/apache/cxf/blob/master/pom.xml) I found
>>>>> a
>>>>> comment about an issue of surefire plugin (SUREFIRE-1302). Because this
>>>>> issue was solved in 2.20.1 I configure correctly this version (before
I
>>>>> have a wrong configuration) and in this way I have success with itests
>>>>> on
>>>>> my pc.
>>>>> Tomorrow I will try in office and I will inform you about results.
>>>>>
>>>>>
>>>>>
>>>>> Thanks
>>>>> Regards
>>>>> Giuseppe
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> 2017-10-01 18:27 GMT+02:00 Jean-Baptiste Onofré <jb@nanthrax.net>:
>>>>>
>>>>> Hi Giuseppe,
>>>>>>
>>>>>> I remember that I got Pax Exam failure with maven-surefire-plugin
>>>>>> updated
>>>>>> to 2.19.1. That's why we still use surefire 2.18.1 in Karaf itself
(for
>>>>>> itests using Pax Exam).
>>>>>>
>>>>>> It seems to be caused to a change in surefire. I didn't investigate
>>>>>> that
>>>>>> much as it's not heavily blocker for us.
>>>>>>
>>>>>> I would advice you to stay with surefire 2.18.1, it should work (it's
>>>>>> what
>>>>>> we have in Karaf).
>>>>>>
>>>>>> If it's important to you, I can investigate a bit.
>>>>>>
>>>>>> Regards
>>>>>> JB
>>>>>>
>>>>>>
>>>>>> On 10/01/2017 11:00 AM, Giuseppe Gerla wrote:
>>>>>>
>>>>>> Hi JB,
>>>>>>> I have done several tests and combination to try to understand
better
>>>>>>> the
>>>>>>> problem.
>>>>>>> It seems related to version and configuration of
>>>>>>> maven-surefire-plugin.
>>>>>>> If I don't specify anithing in my pom about surefire plugin,
tests
>>>>>>> are ok
>>>>>>> on my pc but I have randomic problem on jenkins build.
>>>>>>> If I use the same configuration of activemq-karaf-itest with
2.18.1 or
>>>>>>> 2.20.1 version I have sistematic failure also on my PC.
>>>>>>>
>>>>>>> Please can you share your pom configuration about surefire plugin?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Thanks
>>>>>>> Giuseppe
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2017-09-08 9:25 GMT+02:00 Giuseppe Gerla <giuseppe.gerla@gmail.com>:
>>>>>>>
>>>>>>> Hi JB
>>>>>>>
>>>>>>>> yes I mean my Jenkins.
>>>>>>>> My itest is created with following code
>>>>>>>>
>>>>>>>>
>>>>>>>>            MavenArtifactUrlReference karafUrl =
>>>>>>>> maven().groupId("org.apache.
>>>>>>>> karaf").artifactId("apache-karaf")
>>>>>>>>                .versionAsInProject().type("tar.gz");
>>>>>>>>
>>>>>>>>            customOptions.add(karafDistributionConfiguration
>>>>>>>> ().frameworkUrl(karafUrl)
>>>>>>>>                .karafVersion(getKarafVersion()).unpackDirectory(new
>>>>>>>> File("target/exam")).useDeployFolder(false));
>>>>>>>>
>>>>>>>>            customOptions.add(keepRuntimeFolder());
>>>>>>>>            customOptions.add(junitBundles());
>>>>>>>>            customOptions.add(KarafDistributionOption
>>>>>>>>                .editConfigurationFilePut("etc/
>>>>>>>> org.apache.karaf.features.cf
>>>>>>>> g",
>>>>>>>> "featuresBoot",
>>>>>>>>                                          "(aries-blueprint,
bundle,
>>>>>>>> config,
>>>>>>>> deployer, diagnostic, feature, instance, jaas, kar, log,
management,
>>>>>>>> package, service, shell, shell-compat, ssh, system, wrap)"));
>>>>>>>>            MavenUrlReference karafStandardRepo =
>>>>>>>> maven().groupId("org.apache.
>>>>>>>> karaf.features")
>>>>>>>>                .artifactId("standard").classifier("features").type("
>>>>>>>> xml").versionAsInProject();
>>>>>>>>            MavenUrlReference activemqStandardRepo =
>>>>>>>> maven().groupId("org.apache.activemq")
>>>>>>>>                .artifactId("activemq-karaf").
>>>>>>>> classifier("features").type("
>>>>>>>> xml").versionAsInProject();
>>>>>>>>
>>>>>>>>            customOptions.add(KarafDistributionOption.features(
>>>>>>>> karafStandardRepo,
>>>>>>>> "scr"));
>>>>>>>>            customOptions.add(KarafDistributionOption.features(
>>>>>>>> activemqStandardRepo,
>>>>>>>> "activemq-broker-noweb"));
>>>>>>>>
>>>>>>>> In the /data/log/karaf.log file there are no errors. But
on the
>>>>>>>> console i
>>>>>>>> receive following exception
>>>>>>>>
>>>>>>>>
>>>>>>>> java.rmi.NotBoundException: 459dd019-b343-45a2-825c-4cc630909d16
>>>>>>>>           at sun.rmi.registry.RegistryImpl.
>>>>>>>> lookup(RegistryImpl.java:166)
>>>>>>>>           at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown
>>>>>>>> Source)
>>>>>>>>           at sun.rmi.server.UnicastServerRe
>>>>>>>> f.oldDispatch(UnicastServerRef
>>>>>>>> .java:411)
>>>>>>>>           at sun.rmi.server.UnicastServerRe
>>>>>>>> f.dispatch(UnicastServerRef.
>>>>>>>> java:272)
>>>>>>>>           at sun.rmi.transport.Transport$1.run(Transport.java:200)
>>>>>>>>           at sun.rmi.transport.Transport$1.run(Transport.java:197)
>>>>>>>>           at java.security.AccessController.doPrivileged(Native
>>>>>>>> Method)
>>>>>>>>           at sun.rmi.transport.Transport.se
>>>>>>>> rviceCall(Transport.java:196)
>>>>>>>>           at sun.rmi.transport.tcp.TCPTrans
>>>>>>>> port.handleMessages(TCPTranspo
>>>>>>>> rt.java:568)
>>>>>>>>           at sun.rmi.transport.tcp.TCPTrans
>>>>>>>> port$ConnectionHandler.run0(TC
>>>>>>>> PTransport.java:826)
>>>>>>>>           at sun.rmi.transport.tcp.TCPTrans
>>>>>>>> port$ConnectionHandler.lambda$
>>>>>>>> run$0(TCPTransport.java:683)
>>>>>>>>           at java.security.AccessController.doPrivileged(Native
>>>>>>>> Method)
>>>>>>>>           at sun.rmi.transport.tcp.TCPTrans
>>>>>>>> port$ConnectionHandler.run(TCP
>>>>>>>> Transport.java:682)
>>>>>>>>           at java.util.concurrent.ThreadPoo
>>>>>>>> lExecutor.runWorker(ThreadPool
>>>>>>>> Executor.java:1142)
>>>>>>>>           at java.util.concurrent.ThreadPoo
>>>>>>>> lExecutor$Worker.run(ThreadPoo
>>>>>>>> lExecutor.java:617)
>>>>>>>>           at java.lang.Thread.run(Thread.java:745)
>>>>>>>>           at sun.rmi.transport.StreamRemote
>>>>>>>> Call.exceptionReceivedFromServ
>>>>>>>> er(StreamRemoteCall.java:276)
>>>>>>>>           at sun.rmi.transport.StreamRemote
>>>>>>>> Call.executeCall(StreamRemoteC
>>>>>>>> all.java:253)
>>>>>>>>           at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:379)
>>>>>>>>           at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown
>>>>>>>> Source)
>>>>>>>>           at org.ops4j.pax.exam.rbc.client.
>>>>>>>> intern.RemoteBundleContextClie
>>>>>>>> ntImpl.getRemoteBundleContext(RemoteBundleContextClientImpl.
>>>>>>>> java:242)
>>>>>>>>           at org.ops4j.pax.exam.rbc.client.
>>>>>>>> intern.RemoteBundleContextClie
>>>>>>>> ntImpl.waitForState(RemoteBundleContextClientImpl.java:211)
>>>>>>>>           at org.ops4j.pax.exam.karaf.conta
>>>>>>>> iner.internal.KarafTestContain
>>>>>>>> er.waitForState(KarafTestContainer.java:580)
>>>>>>>>           at org.ops4j.pax.exam.karaf.conta
>>>>>>>> iner.internal.KarafTestContain
>>>>>>>> er.startKaraf(KarafTestContainer.java:230)
>>>>>>>>           at org.ops4j.pax.exam.karaf.conta
>>>>>>>> iner.internal.KarafTestContain
>>>>>>>> er.start(KarafTestContainer.java:180)
>>>>>>>>           at org.ops4j.pax.exam.spi.reactor
>>>>>>>> s.AllConfinedStagedReactor.inv
>>>>>>>> oke(AllConfinedStagedReactor.java:79)
>>>>>>>>           at org.ops4j.pax.exam.junit.impl.
>>>>>>>> ProbeRunner$2.evaluate(ProbeRu
>>>>>>>> nner.java:267)
>>>>>>>>           at org.junit.runners.ParentRunner
>>>>>>>> .runLeaf(ParentRunner.java:325)
>>>>>>>>           at org.junit.runners.BlockJUnit4C
>>>>>>>> lassRunner.runChild(BlockJUnit
>>>>>>>> 4ClassRunner.java:78)
>>>>>>>>           at org.junit.runners.BlockJUnit4C
>>>>>>>> lassRunner.runChild(BlockJUnit
>>>>>>>> 4ClassRunner.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.runners.ParentRunner
>>>>>>>> .run(ParentRunner.java:363)
>>>>>>>>           at org.ops4j.pax.exam.junit.impl.
>>>>>>>> ProbeRunner.run(ProbeRunner.ja
>>>>>>>> va:98)
>>>>>>>>           at org.ops4j.pax.exam.junit.PaxExam.run(PaxExam.java:93)
>>>>>>>>           at org.apache.maven.surefire.juni
>>>>>>>> t4.JUnit4Provider.execute(JUni
>>>>>>>> t4Provider.java:283)
>>>>>>>>           at org.apache.maven.surefire.juni
>>>>>>>> t4.JUnit4Provider.executeWithR
>>>>>>>> erun(JUnit4Provider.java:173)
>>>>>>>>           at org.apache.maven.surefire.juni
>>>>>>>> t4.JUnit4Provider.executeTestS
>>>>>>>> et(JUnit4Provider.java:153)
>>>>>>>>           at org.apache.maven.surefire.juni
>>>>>>>> t4.JUnit4Provider.invoke(JUnit
>>>>>>>> 4Provider.java:128)
>>>>>>>>           at org.apache.maven.surefire.boot
>>>>>>>> er.ForkedBooter.invokeProvider
>>>>>>>> InSameClassLoader(ForkedBooter.java:203)
>>>>>>>>           at org.apache.maven.surefire.boot
>>>>>>>> er.ForkedBooter.runSuitesInPro
>>>>>>>> cess(ForkedBooter.java:155)
>>>>>>>>           at org.apache.maven.surefire.boot
>>>>>>>> er.ForkedBooter.main(ForkedBoo
>>>>>>>> ter.java:103)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> if you share your jenkins configuration, it will be great
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Regards
>>>>>>>>
>>>>>>>> Giuseppe
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> 2017-09-08 7:27 GMT+02:00 Jean-Baptiste Onofré <jb@nanthrax.net>:
>>>>>>>>
>>>>>>>> Hi Giuseppe,
>>>>>>>>
>>>>>>>>>
>>>>>>>>> I guess you mean your own Jenkins ?
>>>>>>>>>
>>>>>>>>> The NoBoundException is cause by itests using RMI right
?
>>>>>>>>>
>>>>>>>>> For Jenkins, I can share with you the configuration I
did on our
>>>>>>>>> job in
>>>>>>>>> the Apache Jenkins.
>>>>>>>>>
>>>>>>>>> Regards
>>>>>>>>> JB
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 09/07/2017 10:51 PM, Giuseppe Gerla wrote:
>>>>>>>>>
>>>>>>>>> Hi all
>>>>>>>>>
>>>>>>>>>> I'm experimenting 2 strange behaviours with integration
tests under
>>>>>>>>>> jenkins.
>>>>>>>>>> The first problem is that often integration tests
fail with a
>>>>>>>>>> java.rmi.NoBoundException. This is a randomic behaviour.
The same
>>>>>>>>>> tests
>>>>>>>>>> works fine on my pc.
>>>>>>>>>> The second problem is that when a test fails jenkins
doesn't kill
>>>>>>>>>> the
>>>>>>>>>> test
>>>>>>>>>> process and in this way I have several ghost process.
>>>>>>>>>>
>>>>>>>>>> Do you have some idea?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Following some additional information:
>>>>>>>>>> O.S. ubuntu 64bit
>>>>>>>>>> Jenkins -> 2.60.3
>>>>>>>>>> Karaf -> 4.0.9
>>>>>>>>>> pax-exam -> 4.9.1
>>>>>>>>>> maven 3.5.0
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Regards
>>>>>>>>>> Giuseppe
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>>
>>>>>>>>> Jean-Baptiste Onofré
>>>>>>>>> jbonofre@apache.org
>>>>>>>>> http://blog.nanthrax.net
>>>>>>>>> Talend - http://www.talend.com
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> --
>>>>>> Jean-Baptiste Onofré
>>>>>> jbonofre@apache.org
>>>>>> http://blog.nanthrax.net
>>>>>> Talend - http://www.talend.com
>>>>>>
>>>>>>
>>>>>
>>>> --
>>>> Jean-Baptiste Onofré
>>>> jbonofre@apache.org
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>>>>
>>>
>>>
>>
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message