HHH-11271 Disable testContestedPutFromLoad because of short timeout

This commit is contained in:
Radim Vansa 2016-11-29 17:38:09 +01:00 committed by Vlad Mihalcea
parent 5f8db1066d
commit f4f50aa5c8
1 changed files with 10 additions and 1 deletions

View File

@ -19,6 +19,7 @@ import org.hibernate.test.cache.infinispan.AbstractRegionAccessStrategyTest;
import org.hibernate.test.cache.infinispan.NodeEnvironment; import org.hibernate.test.cache.infinispan.NodeEnvironment;
import org.hibernate.test.cache.infinispan.util.TestSynchronization; import org.hibernate.test.cache.infinispan.util.TestSynchronization;
import org.hibernate.test.cache.infinispan.util.TestingKeyFactory; import org.hibernate.test.cache.infinispan.util.TestingKeyFactory;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import junit.framework.AssertionFailedError; import junit.framework.AssertionFailedError;
@ -359,6 +360,14 @@ public class EntityRegionAccessStrategyTest extends
new TestSynchronization.AfterUpdate(strategy, session, key, value, version, softLock)); new TestSynchronization.AfterUpdate(strategy, session, key, value, version, softLock));
} }
/**
* This test fails in CI too often because it depends on very short timeout. The behaviour is basically
* non-testable as we want to make sure that the "Putter" is always progressing; however, it is sometimes
* progressing in different thread (on different node), and sometimes even in system, sending a message
* over network. Therefore even checking that some OOB/remote thread is in RUNNABLE/RUNNING state is prone
* to spurious failure (and we can't grab the state of all threads atomically).
*/
@Ignore
@Test @Test
public void testContestedPutFromLoad() throws Exception { public void testContestedPutFromLoad() throws Exception {
if (accessType == AccessType.READ_ONLY) { if (accessType == AccessType.READ_ONLY) {
@ -423,7 +432,7 @@ public class EntityRegionAccessStrategyTest extends
blocker.start(); blocker.start();
assertTrue("Active tx has done an update", pferLatch.await(1, TimeUnit.SECONDS)); assertTrue("Active tx has done an update", pferLatch.await(1, TimeUnit.SECONDS));
putter.start(); putter.start();
assertTrue("putFromLoadreturns promtly", pferCompletionLatch.await(10, TimeUnit.MILLISECONDS)); assertTrue("putFromLoad returns promptly", pferCompletionLatch.await(10, TimeUnit.MILLISECONDS));
commitLatch.countDown(); commitLatch.countDown();