You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2017/10/31 23:17:14 UTC
hbase git commit: HBASE-19135 TestWeakObjectPool time out
Repository: hbase
Updated Branches:
refs/heads/branch-2 314759652 -> 426ab1e93
HBASE-19135 TestWeakObjectPool time out
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/426ab1e9
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/426ab1e9
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/426ab1e9
Branch: refs/heads/branch-2
Commit: 426ab1e9313cab5b8afe35ba11220421c32b9902
Parents: 3147596
Author: Michael Stack <st...@apache.org>
Authored: Tue Oct 31 09:38:38 2017 -0700
Committer: Michael Stack <st...@apache.org>
Committed: Tue Oct 31 16:16:56 2017 -0700
----------------------------------------------------------------------
.../java/org/apache/hadoop/hbase/util/TestWeakObjectPool.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/426ab1e9/hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestWeakObjectPool.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestWeakObjectPool.java b/hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestWeakObjectPool.java
index 9dbbbd0..12d9877 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestWeakObjectPool.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestWeakObjectPool.java
@@ -22,15 +22,20 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
+import org.apache.hadoop.hbase.CategoryBasedTimeout;
import org.apache.hadoop.hbase.testclassification.MiscTests;
import org.apache.hadoop.hbase.testclassification.SmallTests;
import org.junit.Assert;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import org.junit.rules.TestRule;
@Category({MiscTests.class, SmallTests.class})
public class TestWeakObjectPool {
+ @Rule public final TestRule timeout = CategoryBasedTimeout.builder().withTimeout(this.getClass()).
+ withLookingForStuckThread(true).build();
ObjectPool<String, Object> pool;
@Before
@@ -89,7 +94,7 @@ public class TestWeakObjectPool {
Assert.assertNotEquals(hash1, System.identityHashCode(obj3));
}
- @Test(timeout=1000)
+ @Test
public void testCongestion() throws Exception {
final int THREAD_COUNT = 100;