[infinispan-issues] [JBoss JIRA] (ISPN-5530) AtomicObjectFactoryTest.distributedCacheTest random failures

Sebastian Łaskawiec (JIRA) issues at jboss.org
Wed Mar 23 06:55:00 EDT 2016


    [ https://issues.jboss.org/browse/ISPN-5530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13181109#comment-13181109 ] 

Sebastian Łaskawiec commented on ISPN-5530:
-------------------------------------------

This test is still unstable: http://ci.infinispan.org/project.html?projectId=Infinispan&testNameId=-3377042310761932441&tab=testDetails

The easiest way to reproduce it is to increase the number of runs:
{code}
@Test(enabled = true, *invocationCount = 10_000*)
public void distributedCacheTest() throws Exception {
...
}
{code}

I analyzed the test and it seems fine, so I would try to find the cause in AtomicFactory itself or some cache configuration. The problem seems to appear in [this line|https://github.com/infinispan/infinispan/blob/375c1f6426cd66706c3e943134eb52398e562635/atomic-factory/src/test/java/org/infinispan/atomic/AtomicObjectFactoryTest.java#L162]. A race condition with {{Set#put}} could explain why it is possible to successfully add 2 (or more) equal elements using 2 different {{CacheManagers}}.

> AtomicObjectFactoryTest.distributedCacheTest random failures
> ------------------------------------------------------------
>
>                 Key: ISPN-5530
>                 URL: https://issues.jboss.org/browse/ISPN-5530
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Test Suite - Core
>    Affects Versions: 7.2.2.Final, 8.0.0.Alpha1
>            Reporter: Dan Berindei
>            Assignee: Tristan Tarrant
>            Priority: Blocker
>              Labels: testsuite_stability
>             Fix For: 9.0.0.Alpha1
>
>
> {noformat}
> java.lang.AssertionError: obtained = 999; espected = 1000 expected:<1000> but was:<999>
>     at org.testng.AssertJUnit.fail(AssertJUnit.java:59)
>     at org.testng.AssertJUnit.failNotEquals(AssertJUnit.java:364)
>     at org.testng.AssertJUnit.assertEquals(AssertJUnit.java:80)
>     at org.infinispan.atomic.AtomicObjectFactoryTest.distributedCacheTest(AtomicObjectFactoryTest.java:114)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:483)
>     at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
>     at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
>     at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
>     at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
>     at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
>     at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
>     at org.testng.TestRunner.privateRun(TestRunner.java:767)
>     at org.testng.TestRunner.run(TestRunner.java:617)
>     at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
>     at org.testng.SuiteRunner.access$000(SuiteRunner.java:38)
>     at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:382)
>     at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
>     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>     at java.lang.Thread.run(Thread.java:745)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)



More information about the infinispan-issues mailing list