You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2016/03/22 01:20:15 UTC
incubator-geode git commit: GEODE-1016: Annotate time sensitive test
with RetryRule
Repository: incubator-geode
Updated Branches:
refs/heads/develop 167abe1a4 -> 822bdc116
GEODE-1016: Annotate time sensitive test with RetryRule
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/822bdc11
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/822bdc11
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/822bdc11
Branch: refs/heads/develop
Commit: 822bdc11622296d976f951532ce461bc83b1fc0d
Parents: 167abe1
Author: Kirk Lund <kl...@apache.org>
Authored: Mon Mar 21 17:04:24 2016 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Mon Mar 21 17:04:24 2016 -0700
----------------------------------------------------------------------
.../gemstone/gemfire/internal/lang/ThreadUtilsJUnitTest.java | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/822bdc11/geode-core/src/test/java/com/gemstone/gemfire/internal/lang/ThreadUtilsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/lang/ThreadUtilsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/lang/ThreadUtilsJUnitTest.java
index 4102786..470ec36 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/lang/ThreadUtilsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/lang/ThreadUtilsJUnitTest.java
@@ -22,6 +22,8 @@ import static org.assertj.core.api.Assertions.*;
import java.lang.Thread.State;
import java.util.concurrent.atomic.AtomicBoolean;
+import com.gemstone.gemfire.test.junit.Retry;
+import com.gemstone.gemfire.test.junit.rules.RetryRule;
import edu.umd.cs.mtc.MultithreadedTestCase;
import edu.umd.cs.mtc.TestFramework;
@@ -31,6 +33,7 @@ import org.jmock.lib.concurrent.Synchroniser;
import org.jmock.lib.legacy.ClassImposteriser;
import org.junit.After;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -66,6 +69,9 @@ public class ThreadUtilsJUnitTest {
mockContext.assertIsSatisfied();
}
+ @Rule
+ public RetryRule retryRule = new RetryRule();
+
@Test
public void testGetThreadNameWithNull() {
assertNull(ThreadUtils.getThreadName(null));
@@ -168,6 +174,7 @@ public class ThreadUtilsJUnitTest {
}
@Test
+ @Retry(3)
public void testSleepWithInterrupt() throws Throwable {
TestFramework.runOnce(new SleepInterruptedMultithreadedTestCase(10 * 1000));
}