HBASE-4428 addendum, call ctx.stop at the end of testCacheMultiThreaded(), not in doAnAction()

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1172178 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2011-09-18 03:08:00 +00:00
parent aa6d6c7a9e
commit 4402b04c3c
2 changed files with 7 additions and 1 deletions

View File

@ -87,6 +87,12 @@ public abstract class MultithreadedTestUtil {
threadDoneCount++;
}
public void setStopFlag(boolean s) throws Exception {
synchronized (this) {
stopped = s;
}
}
public void stop() throws Exception {
synchronized (this) {
stopped = true;

View File

@ -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);