You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by David Bosschaert <da...@gmail.com> on 2012/10/19 11:38:54 UTC

Intermittent test issues with obtaining MBeans after upgrading itests to Eclipse 3.8

Hi all,

I've started to put some final changes into the jmx-next project
(which implements the Enterprise OSGi R5 JMX chapter) and as part of
this I needed to upgrade the itests to use Equinox 3.8.
Having done this I'm starting to see some intermittent failures in the
itests cropping up. They always happen when the test attempts to
obtain the MBean in the setUp() method. For example in the test run
below you can see that it worked 7 out of 8 times.

I think it might be some timing issue because when I run this through
the debugger it never happens. However increasing the wait period from
10 seconds up doesn't make a difference. I also tried putting in
sleeps at the beginning of the setUp() (before calling
MBeanServerFactory.createMBeanServer()) to give the system some time
to clean up from a previous test but that also doesn't seem to have an
effect. I also set the surefire threadCount to 1, but that didn't make
a difference either.

Anyone know what the issue could be or how to get past this?

Many thanks,

David

-------------------------------------------------------------------------------
Test set: org.apache.aries.jmx.framework.ServiceStateMBeanTest
-------------------------------------------------------------------------------
Tests run: 8, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 32.415
sec <<< FAILURE!
testObjectName [equinox/3.8.0.V20120529-1548](org.apache.aries.jmx.framework.ServiceStateMBeanTest)
 Time elapsed: 12.638 sec  <<< ERROR!
java.lang.Exception: osgi.core:type=serviceState,version=1.7 mbean is
not available after waiting 10 seconds
	at org.apache.aries.jmx.AbstractIntegrationTest.waitForMBean(AbstractIntegrationTest.java:90)
	at org.apache.aries.jmx.AbstractIntegrationTest.waitForMBean(AbstractIntegrationTest.java:78)
	at org.apache.aries.jmx.framework.ServiceStateMBeanTest.doSetUp(ServiceStateMBeanTest.java:132)
	at org.apache.aries.jmx.AbstractIntegrationTest.setUp(AbstractIntegrationTest.java:61)
        ...