HBASE-4971 Useless sleeps in TestTimestampsFilter and TestMultipleTimestamps

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1213103 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2011-12-11 23:17:09 +00:00
parent 756aa7ff16
commit ac1657ba59
2 changed files with 11 additions and 31 deletions

View File

@ -100,7 +100,7 @@ public class TestMultipleTimestamps {
put(ht, FAMILY, putRows, putColumns, putTimestamps);
flush(TABLE);
TEST_UTIL.flush(TABLE);
ResultScanner scanner = scan(ht, FAMILY, scanRows, scanColumns,
scanTimestamps, scanMaxVersions);
@ -139,7 +139,7 @@ public class TestMultipleTimestamps {
put(ht, FAMILY, putRows, putColumns, putTimestamps);
flush(TABLE);
TEST_UTIL.flush(TABLE);
ResultScanner scanner = scan(ht, FAMILY, scanRows, scanColumns,
scanTimestamps, scanMaxVersions);
@ -178,7 +178,7 @@ public class TestMultipleTimestamps {
put(ht, FAMILY, putRows, putColumns, putTimestamps);
flush(TABLE);
TEST_UTIL.flush(TABLE);
ResultScanner scanner = scan(ht, FAMILY, scanRows, scanColumns,
scanTimestamps, scanMaxVersions);
@ -228,9 +228,9 @@ public class TestMultipleTimestamps {
int scanMaxVersions = 5;
put(ht, FAMILY, putRows1, putColumns1, putTimestamps1);
flush(TABLE);
TEST_UTIL.flush(TABLE);
put(ht, FAMILY, putRows2, putColumns2, putTimestamps2);
flush(TABLE);
TEST_UTIL.flush(TABLE);
put(ht, FAMILY, putRows3, putColumns3, putTimestamps3);
ResultScanner scanner = scan(ht, FAMILY, scanRows, scanColumns,
@ -283,7 +283,7 @@ public class TestMultipleTimestamps {
putNVersions(ht, FAMILY, 0, 0, 1, 5);
if (flushTables) {
flush(TABLE);
TEST_UTIL.flush(TABLE);
}
// delete version 4.
@ -313,7 +313,7 @@ public class TestMultipleTimestamps {
// For row:0, col:0: insert versions 1 through 5.
putNVersions(ht, FAMILY, 0, 0, 1, 5);
flush(TABLE);
TEST_UTIL.flush(TABLE);
// delete all versions before 4.
deleteAllVersionsBefore(ht, FAMILY, 0, 0, 4);
@ -336,7 +336,7 @@ public class TestMultipleTimestamps {
// For row:0, col:0: insert versions 1 through 5.
putNVersions(ht, FAMILY, 0, 0, 1, 5);
flush(TABLE);
TEST_UTIL.flush(TABLE);
// delete all versions before 4.
deleteColumn(ht, FAMILY, 0, 0);
@ -359,7 +359,7 @@ public class TestMultipleTimestamps {
// For row:0, col:0: insert versions 1 through 5.
putNVersions(ht, FAMILY, 0, 0, 1, 5);
flush(TABLE);
TEST_UTIL.flush(TABLE);
// delete all versions before 4.
deleteFamily(ht, FAMILY, 0);
@ -370,16 +370,6 @@ public class TestMultipleTimestamps {
assertEquals(0, kvs.length);
}
// Flush tables. Since flushing is asynchronous, sleep for a bit.
private void flush(byte [] tableName) throws IOException {
TEST_UTIL.flush(tableName);
try {
Thread.sleep(3000);
} catch (InterruptedException i) {
// ignore
}
}
/**
* Assert that the passed in KeyValue has expected contents for the
* specified row, column & timestamp.

View File

@ -111,7 +111,7 @@ public class TestTimestampsFilter {
// do some verification before flush
verifyInsertedValues(ht, FAMILY);
flush();
TEST_UTIL.flush();
// do some verification after flush
verifyInsertedValues(ht, FAMILY);
@ -241,7 +241,7 @@ public class TestTimestampsFilter {
deleteOneVersion(ht, FAMILY, 0, 0, 4);
if (flushTables) {
flush();
TEST_UTIL.flush();
}
// request a bunch of versions including the deleted version. We should
@ -281,16 +281,6 @@ public class TestTimestampsFilter {
}
}
// Flush tables. Since flushing is asynchronous, sleep for a bit.
private void flush() throws IOException {
TEST_UTIL.flush();
try {
Thread.sleep(3000);
} catch (InterruptedException i) {
// ignore
}
}
/**
* Assert that the passed in KeyValue has expected contents for the
* specified row, column & timestamp.