You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by connuser1 connuser1 <co...@gmail.com> on 2014/12/18 11:17:53 UTC

Randomly Failing Unit tests

Hi

I recently synced code from slink trunk and am trying to build code with
UTs. But I have not managed to get the full build to complete without a UT
failure. There are different UTs failing at different times. So I am not
sure if they are real test failures or are failing due to external reasons.
I a building on CentoOS 7 64 bit VM with Oracle JDK 1.7.71  and have
allocated heap size of 2 GB.

Couple of examples of failing tests below:

879991 [main] INFO org.ops4j.exec.DefaultJavaRunner - Platform has been
shutdown.
879992 [main] INFO org.ops4j.pax.exam.spi.reactors.ReactorManager - suite
finished
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 43.237 sec
- in org.apache.sling.event.it.TopicMatchingTest

Results :

Failed tests:
  JobHandlingTest.testNoJobProcessor:480 Unprocessed count expected:<0> but
was:<1>

Tests run: 23, Failures: 1, Errors: 0, Skipped: 0

===============================================================================================================================

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in
org.apache.sling.discovery.impl.common.ClusterViewTest
Running org.apache.sling.discovery.impl.common.WildcardHelperTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.106 sec -
in org.apache.sling.discovery.impl.common.WildcardHelperTest

Results :

Failed tests:
  ClusterTest.testLeaderDesc:91->doTestLeader:130 expected:<2> but was:<1>

Tests run: 49, Failures: 1, Errors: 0, Skipped: 0


Regards
Satya Deep

Re: Randomly Failing Unit tests

Posted by connuser1 connuser1 <co...@gmail.com>.
Thanks Carsten!
Yes that test passes now. But there are a few others still failing. For e.g.

Tests run: 16, Failures: 0, Errors: 9, Skipped: 0, Time elapsed: 232.24 sec
<<< FAILURE! - in org.apache.sling.jcr.repository.it.OakRepositoryIT
testNodetypeObservation(org.apache.sling.jcr.repository.it.OakRepositoryIT)
 Time elapsed: 21.552 sec  <<< ERROR!
java.lang.NullPointerException: Specified service reference cannot be null.
        at
org.apache.felix.framework.BundleContextImpl.ungetService(BundleContextImpl.java:482)
        at
org.apache.sling.jcr.repository.it.CommonTests.setup(CommonTests.java:584)
        at
org.apache.sling.jcr.repository.it.OakRepositoryIT.setup(OakRepositoryIT.java:104)

testSingleValueInputStream(org.apache.sling.jcr.repository.it.OakRepositoryIT)
 Time elapsed: 21.524 sec  <<< ERROR!
java.lang.NullPointerException: Specified service reference cannot be null.
        at
org.apache.felix.framework.BundleContextImpl.ungetService(BundleContextImpl.java:482)
        at
org.apache.sling.jcr.repository.it.CommonTests.setup(CommonTests.java:584)
        at
org.apache.sling.jcr.repository.it.OakRepositoryIT.setup(OakRepositoryIT.java:104)

testAnonymousLoginA(org.apache.sling.jcr.repository.it.OakRepositoryIT)
 Time elapsed: 21.518 sec  <<< ERROR!
java.lang.NullPointerException: Specified service reference cannot be null.
        at
org.apache.felix.framework.BundleContextImpl.ungetService(BundleContextImpl.java:482)
        at
org.apache.sling.jcr.repository.it.CommonTests.setup(CommonTests.java:584)
        at
org.apache.sling.jcr.repository.it.OakRepositoryIT.setup(OakRepositoryIT.java:104)

testAnonymousLoginB(org.apache.sling.jcr.repository.it.OakRepositoryIT)
 Time elapsed: 21.521 sec  <<< ERROR!
java.lang.NullPointerException: Specified service reference cannot be null.
        at
org.apache.felix.framework.BundleContextImpl.ungetService(BundleContextImpl.java:482)
        at
org.apache.sling.jcr.repository.it.CommonTests.setup(CommonTests.java:584)
        at
org.apache.sling.jcr.repository.it.OakRepositoryIT.setup(OakRepositoryIT.java:104)

testCreateRetrieveNode(org.apache.sling.jcr.repository.it.OakRepositoryIT)
 Time elapsed: 21.52 sec  <<< ERROR!
java.lang.NullPointerException: Specified service reference cannot be null.
        at
org.apache.felix.framework.BundleContextImpl.ungetService(BundleContextImpl.java:482)
        at
org.apache.sling.jcr.repository.it.CommonTests.setup(CommonTests.java:584)
        at
org.apache.sling.jcr.repository.it.OakRepositoryIT.setup(OakRepositoryIT.java:104)

testXpathQueryWithMixin(org.apache.sling.jcr.repository.it.OakRepositoryIT)
 Time elapsed: 21.517 sec  <<< ERROR!
java.lang.NullPointerException: Specified service reference cannot be null.
        at
org.apache.felix.framework.BundleContextImpl.ungetService(BundleContextImpl.java:482)
        at
org.apache.sling.jcr.repository.it.CommonTests.setup(CommonTests.java:584)
        at
org.apache.sling.jcr.repository.it.OakRepositoryIT.setup(OakRepositoryIT.java:104)

testLoginAdministrative(org.apache.sling.jcr.repository.it.OakRepositoryIT)
 Time elapsed: 21.518 sec  <<< ERROR!
java.lang.NullPointerException: Specified service reference cannot be null.
        at
org.apache.felix.framework.BundleContextImpl.ungetService(BundleContextImpl.java:482)
        at
org.apache.sling.jcr.repository.it.CommonTests.setup(CommonTests.java:584)
        at
org.apache.sling.jcr.repository.it.OakRepositoryIT.setup(OakRepositoryIT.java:104)

testOsgiResourceEvents(org.apache.sling.jcr.repository.it.OakRepositoryIT)
 Time elapsed: 21.519 sec  <<< ERROR!
java.lang.NullPointerException: Specified service reference cannot be null.
        at
org.apache.felix.framework.BundleContextImpl.ungetService(BundleContextImpl.java:482)
        at
org.apache.sling.jcr.repository.it.CommonTests.setup(CommonTests.java:584)
        at
org.apache.sling.jcr.repository.it.OakRepositoryIT.setup(OakRepositoryIT.java:104)

testCreateRetrieveSlingFolder(org.apache.sling.jcr.repository.it.OakRepositoryIT)
 Time elapsed: 21.52 sec  <<< ERROR!
java.lang.NullPointerException: Specified service reference cannot be null.
        at
org.apache.felix.framework.BundleContextImpl.ungetService(BundleContextImpl.java:482)
        at
org.apache.sling.jcr.repository.it.CommonTests.setup(CommonTests.java:584)
        at
org.apache.sling.jcr.repository.it.OakRepositoryIT.setup(OakRepositoryIT.java:104)


On Fri, Dec 19, 2014 at 8:14 PM, Carsten Ziegeler <cz...@apache.org>
wrote:

> Thanks for reporting these,
>
> I looked at the first one and changed the exit check for that test.
> Could you please give it a try if it solves the problem?
>
> Thanks
> Carsten
>
> Am 18.12.14 um 11:17 schrieb connuser1 connuser1:
> > Hi
> >
> > I recently synced code from slink trunk and am trying to build code with
> > UTs. But I have not managed to get the full build to complete without a
> UT
> > failure. There are different UTs failing at different times. So I am not
> > sure if they are real test failures or are failing due to external
> reasons.
> > I a building on CentoOS 7 64 bit VM with Oracle JDK 1.7.71  and have
> > allocated heap size of 2 GB.
> >
> > Couple of examples of failing tests below:
> >
> > 879991 [main] INFO org.ops4j.exec.DefaultJavaRunner - Platform has been
> > shutdown.
> > 879992 [main] INFO org.ops4j.pax.exam.spi.reactors.ReactorManager - suite
> > finished
> > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 43.237
> sec
> > - in org.apache.sling.event.it.TopicMatchingTest
> >
> > Results :
> >
> > Failed tests:
> >   JobHandlingTest.testNoJobProcessor:480 Unprocessed count expected:<0>
> but
> > was:<1>
> >
> > Tests run: 23, Failures: 1, Errors: 0, Skipped: 0
> >
> >
> ===============================================================================================================================
> >
> > Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec -
> in
> > org.apache.sling.discovery.impl.common.ClusterViewTest
> > Running org.apache.sling.discovery.impl.common.WildcardHelperTest
> > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.106
> sec -
> > in org.apache.sling.discovery.impl.common.WildcardHelperTest
> >
> > Results :
> >
> > Failed tests:
> >   ClusterTest.testLeaderDesc:91->doTestLeader:130 expected:<2> but
> was:<1>
> >
> > Tests run: 49, Failures: 1, Errors: 0, Skipped: 0
> >
> >
> > Regards
> > Satya Deep
> >
>
>
> --
> Carsten Ziegeler
> Adobe Research Switzerland
> cziegeler@apache.org
>

Re: Randomly Failing Unit tests

Posted by Carsten Ziegeler <cz...@apache.org>.
Thanks for reporting these,

I looked at the first one and changed the exit check for that test.
Could you please give it a try if it solves the problem?

Thanks
Carsten

Am 18.12.14 um 11:17 schrieb connuser1 connuser1:
> Hi
> 
> I recently synced code from slink trunk and am trying to build code with
> UTs. But I have not managed to get the full build to complete without a UT
> failure. There are different UTs failing at different times. So I am not
> sure if they are real test failures or are failing due to external reasons.
> I a building on CentoOS 7 64 bit VM with Oracle JDK 1.7.71  and have
> allocated heap size of 2 GB.
> 
> Couple of examples of failing tests below:
> 
> 879991 [main] INFO org.ops4j.exec.DefaultJavaRunner - Platform has been
> shutdown.
> 879992 [main] INFO org.ops4j.pax.exam.spi.reactors.ReactorManager - suite
> finished
> Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 43.237 sec
> - in org.apache.sling.event.it.TopicMatchingTest
> 
> Results :
> 
> Failed tests:
>   JobHandlingTest.testNoJobProcessor:480 Unprocessed count expected:<0> but
> was:<1>
> 
> Tests run: 23, Failures: 1, Errors: 0, Skipped: 0
> 
> ===============================================================================================================================
> 
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in
> org.apache.sling.discovery.impl.common.ClusterViewTest
> Running org.apache.sling.discovery.impl.common.WildcardHelperTest
> Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.106 sec -
> in org.apache.sling.discovery.impl.common.WildcardHelperTest
> 
> Results :
> 
> Failed tests:
>   ClusterTest.testLeaderDesc:91->doTestLeader:130 expected:<2> but was:<1>
> 
> Tests run: 49, Failures: 1, Errors: 0, Skipped: 0
> 
> 
> Regards
> Satya Deep
> 


-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org