From 40e62aac7bc297f70246592911262d9818698b4c Mon Sep 17 00:00:00 2001 From: Radim Vansa Date: Tue, 29 Nov 2016 17:38:09 +0100 Subject: [PATCH] HHH-11320 Disable testContestedPutFromLoad because of short timeout (cherry picked from commit f4f50aa5c80f3d5669e02c77f84c1e005c79f3c3) --- .../entity/EntityRegionAccessStrategyTest.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/entity/EntityRegionAccessStrategyTest.java b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/entity/EntityRegionAccessStrategyTest.java index 70134f783f..75810c3390 100644 --- a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/entity/EntityRegionAccessStrategyTest.java +++ b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/entity/EntityRegionAccessStrategyTest.java @@ -19,6 +19,7 @@ import org.hibernate.test.cache.infinispan.AbstractRegionAccessStrategyTest; import org.hibernate.test.cache.infinispan.NodeEnvironment; import org.hibernate.test.cache.infinispan.util.TestSynchronization; import org.hibernate.test.cache.infinispan.util.TestingKeyFactory; +import org.junit.Ignore; import org.junit.Test; import static org.junit.Assert.assertEquals; @@ -359,6 +360,14 @@ public class EntityRegionAccessStrategyTest extends 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 public void testContestedPutFromLoad() throws Exception { if (accessType == AccessType.READ_ONLY) { @@ -423,7 +432,7 @@ public class EntityRegionAccessStrategyTest extends blocker.start(); assertTrue("Active tx has done an update", pferLatch.await(1, TimeUnit.SECONDS)); putter.start(); - assertTrue("putFromLoadreturns promtly", pferCompletionLatch.await(10, TimeUnit.MILLISECONDS)); + assertTrue("putFromLoad returns promptly", pferCompletionLatch.await(10, TimeUnit.MILLISECONDS)); commitLatch.countDown();