HBASE-7560 TestCompactionState failures

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1434045 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
mbertozzi 2013-01-16 17:13:25 +00:00
parent 9723ea9cdf
commit 5bc5ee613f
1 changed files with 2 additions and 6 deletions

View File

@ -167,14 +167,11 @@ public class TestCompactionState {
assertEquals(CompactionState.NONE, state); assertEquals(CompactionState.NONE, state);
} }
} else { } else {
curt = System.currentTimeMillis(); // Wait until the compaction is done
waitTime = 20000;
endt = curt + waitTime;
state = admin.getCompactionState(table); state = admin.getCompactionState(table);
while (state != CompactionState.NONE && curt < endt) { while (state != CompactionState.NONE && curt < endt) {
Thread.sleep(10); Thread.sleep(10);
state = admin.getCompactionState(table); state = admin.getCompactionState(table);
curt = System.currentTimeMillis();
} }
// Now, compaction should be done. // Now, compaction should be done.
assertEquals(CompactionState.NONE, state); assertEquals(CompactionState.NONE, state);
@ -233,6 +230,5 @@ public class TestCompactionState {
TEST_UTIL.flush(); TEST_UTIL.flush();
puts.clear(); puts.clear();
} }
} }
} }