hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1172178 - in /hbase/trunk/src/test/java/org/apache/hadoop/hbase: MultithreadedTestUtil.java io/hfile/CacheTestUtils.java
Date Sun, 18 Sep 2011 03:08:00 GMT
Author: tedyu
Date: Sun Sep 18 03:08:00 2011
New Revision: 1172178

URL: http://svn.apache.org/viewvc?rev=1172178&view=rev
Log:
HBASE-4428 addendum, call ctx.stop at the end of testCacheMultiThreaded(), not in doAnAction()

Modified:
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/MultithreadedTestUtil.java
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/io/hfile/CacheTestUtils.java

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/MultithreadedTestUtil.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/MultithreadedTestUtil.java?rev=1172178&r1=1172177&r2=1172178&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/MultithreadedTestUtil.java (original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/MultithreadedTestUtil.java Sun Sep 18
03:08:00 2011
@@ -87,6 +87,12 @@ public abstract class MultithreadedTestU
       threadDoneCount++;
     }
 
+    public void setStopFlag(boolean s) throws Exception {
+      synchronized (this) {
+        stopped = s;
+      }
+    }
+    
     public void stop() throws Exception {
       synchronized (this) {
         stopped = true;

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/io/hfile/CacheTestUtils.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/io/hfile/CacheTestUtils.java?rev=1172178&r1=1172177&r2=1172178&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/io/hfile/CacheTestUtils.java (original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/io/hfile/CacheTestUtils.java Sun Sep
18 03:08:00 2011
@@ -76,7 +76,7 @@ public class CacheTestUtils {
             HFileBlockPair ourBlock = blocksToTest.poll();
             // if we run out of blocks to test, then we should stop the tests.
             if (ourBlock == null) {
-              ctx.stop();
+              ctx.setStopFlag(true);
               return;
             }
             toBeTested.cacheBlock(ourBlock.blockName, ourBlock.block);



Mime
View raw message