hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: Update sample unit test; the categorybasedtimer section was stale
Date Fri, 03 Mar 2017 06:34:31 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 5645684ec -> 678ad0ea7


Update sample unit test; the categorybasedtimer section was stale


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/678ad0ea
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/678ad0ea
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/678ad0ea

Branch: refs/heads/master
Commit: 678ad0ea73812a7b2d4f48d2569f8736fd827200
Parents: 5645684
Author: Michael Stack <stack@apache.org>
Authored: Thu Mar 2 22:34:24 2017 -0800
Committer: Michael Stack <stack@apache.org>
Committed: Thu Mar 2 22:34:24 2017 -0800

----------------------------------------------------------------------
 src/main/asciidoc/_chapters/developer.adoc | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/678ad0ea/src/main/asciidoc/_chapters/developer.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/_chapters/developer.adoc b/src/main/asciidoc/_chapters/developer.adoc
index 8765600..5f72a6d 100644
--- a/src/main/asciidoc/_chapters/developer.adoc
+++ b/src/main/asciidoc/_chapters/developer.adoc
@@ -1110,11 +1110,13 @@ public class TestExample {
   // down in 'testExampleFoo()' where we use it to log current test's name.
   @Rule public TestName testName = new TestName();
 
-  // CategoryBasedTimeout.forClass(<testcase>) decides the timeout based on the category
-  // (small/medium/large) of the testcase. @ClassRule requires that the full testcase runs
within
-  // this timeout irrespective of individual test methods' times.
-  @ClassRule
-  public static TestRule timeout = CategoryBasedTimeout.forClass(TestExample.class);
+  // The below rule does two things. It decides the timeout based on the category
+  // (small/medium/large) of the testcase. This @Rule requires that the full testcase runs
+  // within this timeout irrespective of individual test methods' times. The second
+  // feature is we'll dump in the log when the test is done a count of threads still
+  // running.
+  @Rule public static TestRule timeout = CategoryBasedTimeout.builder().
+    withTimeout(this.getClass()).withLookingForStuckThread(true).build();
 
   @Before
   public void setUp() throws Exception {


Mime
View raw message