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:
parent
aa6d6c7a9e
commit
4402b04c3c
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue