On Jan 11, 2012, at 11:25 PM, David Blevins wrote:

> 
> On Jan 10, 2012, at 3:26 PM, Jonathan Gallimore wrote:
> 
>> I added a system property: openejb.server.debug=true to
>> RemoteTomEEContainer, and I was then able to hook up a remote debugger to
>> the server. Stopping in
>> org.jboss.arquillian.container.test.spi.util.ServiceLoader, it appear that
>> the JUnitTestRunning is being picked up from 2 jars - one in the TomEE temp
>> directory, and the other straight from the WEB-INF/lib folder of the
>> test.war file being tested.
>> 
>> jar:file:/D:/tmp/arquillian-apache-tomee/apache-tomee-plus-1.0.0-beta-2/temp/arquillian-junit-4211441189472437588.jar!/META-INF/services/org.jboss.arquillian.container.test.spi.TestRunner
>> 
>> jar:file:/C:/cygwin/tmp/2/test/WEB-INF/lib/arquillian-junit.jar!/META-INF/services/org.jboss.arquillian.container.test.spi.TestRunner
> 
> Looks like with the latest fix we are now getting zero TestRunner resource 
> files on the classpath:
> 
> http://ci.apache.org/builders/openejb-trunk-ubuntu/builds/1679/steps/test-results/logs/stdio
>   (see bottom)
> 
> The NoSuchElementException is throw...
> 
>   public static TestRunner getTestRunner(ClassLoader classLoader)
>   {
>      ServiceLoader<TestRunner> serviceLoader = 
> ServiceLoader.load(TestRunner.class, classLoader);
> 
>      if (serviceLoader.getProviders().size() > 1)
>         throw new IllegalStateException("Multiple TestRunners found, only one 
> allowed. Check your classpath");
> 
>      return serviceLoader.iterator().next();
>      // HERE ^^^
>   }
> 
> ... as there are no TestRunner impls returned from ServiceLoader.load().
> 
> Have a TCK running and there seem to be a handful of failures there as well.  
> They also look related getResource() not returning specific entries.
> 
> Seems we trimmed out a bit too much.

The culprit seemed to be the TomEEWebappLoader.clear() method which didn't 
handle the else case if there were no URLs in the URL cache.  The URLs returned 
from the app and webapp classloader would then get ignored.

Not sure if this will cause problems in windows, but it seems to be working 
better in the arquillian-tomee-remote module.


-David

Reply via email to