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:
parent
756aa7ff16
commit
ac1657ba59
|
@ -100,7 +100,7 @@ public class TestMultipleTimestamps {
|
||||||
|
|
||||||
put(ht, FAMILY, putRows, putColumns, putTimestamps);
|
put(ht, FAMILY, putRows, putColumns, putTimestamps);
|
||||||
|
|
||||||
flush(TABLE);
|
TEST_UTIL.flush(TABLE);
|
||||||
|
|
||||||
ResultScanner scanner = scan(ht, FAMILY, scanRows, scanColumns,
|
ResultScanner scanner = scan(ht, FAMILY, scanRows, scanColumns,
|
||||||
scanTimestamps, scanMaxVersions);
|
scanTimestamps, scanMaxVersions);
|
||||||
|
@ -139,7 +139,7 @@ public class TestMultipleTimestamps {
|
||||||
|
|
||||||
put(ht, FAMILY, putRows, putColumns, putTimestamps);
|
put(ht, FAMILY, putRows, putColumns, putTimestamps);
|
||||||
|
|
||||||
flush(TABLE);
|
TEST_UTIL.flush(TABLE);
|
||||||
|
|
||||||
ResultScanner scanner = scan(ht, FAMILY, scanRows, scanColumns,
|
ResultScanner scanner = scan(ht, FAMILY, scanRows, scanColumns,
|
||||||
scanTimestamps, scanMaxVersions);
|
scanTimestamps, scanMaxVersions);
|
||||||
|
@ -178,7 +178,7 @@ public class TestMultipleTimestamps {
|
||||||
|
|
||||||
put(ht, FAMILY, putRows, putColumns, putTimestamps);
|
put(ht, FAMILY, putRows, putColumns, putTimestamps);
|
||||||
|
|
||||||
flush(TABLE);
|
TEST_UTIL.flush(TABLE);
|
||||||
|
|
||||||
ResultScanner scanner = scan(ht, FAMILY, scanRows, scanColumns,
|
ResultScanner scanner = scan(ht, FAMILY, scanRows, scanColumns,
|
||||||
scanTimestamps, scanMaxVersions);
|
scanTimestamps, scanMaxVersions);
|
||||||
|
@ -228,9 +228,9 @@ public class TestMultipleTimestamps {
|
||||||
int scanMaxVersions = 5;
|
int scanMaxVersions = 5;
|
||||||
|
|
||||||
put(ht, FAMILY, putRows1, putColumns1, putTimestamps1);
|
put(ht, FAMILY, putRows1, putColumns1, putTimestamps1);
|
||||||
flush(TABLE);
|
TEST_UTIL.flush(TABLE);
|
||||||
put(ht, FAMILY, putRows2, putColumns2, putTimestamps2);
|
put(ht, FAMILY, putRows2, putColumns2, putTimestamps2);
|
||||||
flush(TABLE);
|
TEST_UTIL.flush(TABLE);
|
||||||
put(ht, FAMILY, putRows3, putColumns3, putTimestamps3);
|
put(ht, FAMILY, putRows3, putColumns3, putTimestamps3);
|
||||||
|
|
||||||
ResultScanner scanner = scan(ht, FAMILY, scanRows, scanColumns,
|
ResultScanner scanner = scan(ht, FAMILY, scanRows, scanColumns,
|
||||||
|
@ -283,7 +283,7 @@ public class TestMultipleTimestamps {
|
||||||
putNVersions(ht, FAMILY, 0, 0, 1, 5);
|
putNVersions(ht, FAMILY, 0, 0, 1, 5);
|
||||||
|
|
||||||
if (flushTables) {
|
if (flushTables) {
|
||||||
flush(TABLE);
|
TEST_UTIL.flush(TABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete version 4.
|
// delete version 4.
|
||||||
|
@ -313,7 +313,7 @@ public class TestMultipleTimestamps {
|
||||||
// For row:0, col:0: insert versions 1 through 5.
|
// For row:0, col:0: insert versions 1 through 5.
|
||||||
putNVersions(ht, FAMILY, 0, 0, 1, 5);
|
putNVersions(ht, FAMILY, 0, 0, 1, 5);
|
||||||
|
|
||||||
flush(TABLE);
|
TEST_UTIL.flush(TABLE);
|
||||||
|
|
||||||
// delete all versions before 4.
|
// delete all versions before 4.
|
||||||
deleteAllVersionsBefore(ht, FAMILY, 0, 0, 4);
|
deleteAllVersionsBefore(ht, FAMILY, 0, 0, 4);
|
||||||
|
@ -336,7 +336,7 @@ public class TestMultipleTimestamps {
|
||||||
// For row:0, col:0: insert versions 1 through 5.
|
// For row:0, col:0: insert versions 1 through 5.
|
||||||
putNVersions(ht, FAMILY, 0, 0, 1, 5);
|
putNVersions(ht, FAMILY, 0, 0, 1, 5);
|
||||||
|
|
||||||
flush(TABLE);
|
TEST_UTIL.flush(TABLE);
|
||||||
|
|
||||||
// delete all versions before 4.
|
// delete all versions before 4.
|
||||||
deleteColumn(ht, FAMILY, 0, 0);
|
deleteColumn(ht, FAMILY, 0, 0);
|
||||||
|
@ -359,7 +359,7 @@ public class TestMultipleTimestamps {
|
||||||
// For row:0, col:0: insert versions 1 through 5.
|
// For row:0, col:0: insert versions 1 through 5.
|
||||||
putNVersions(ht, FAMILY, 0, 0, 1, 5);
|
putNVersions(ht, FAMILY, 0, 0, 1, 5);
|
||||||
|
|
||||||
flush(TABLE);
|
TEST_UTIL.flush(TABLE);
|
||||||
|
|
||||||
// delete all versions before 4.
|
// delete all versions before 4.
|
||||||
deleteFamily(ht, FAMILY, 0);
|
deleteFamily(ht, FAMILY, 0);
|
||||||
|
@ -370,16 +370,6 @@ public class TestMultipleTimestamps {
|
||||||
assertEquals(0, kvs.length);
|
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
|
* Assert that the passed in KeyValue has expected contents for the
|
||||||
* specified row, column & timestamp.
|
* specified row, column & timestamp.
|
||||||
|
|
|
@ -111,7 +111,7 @@ public class TestTimestampsFilter {
|
||||||
// do some verification before flush
|
// do some verification before flush
|
||||||
verifyInsertedValues(ht, FAMILY);
|
verifyInsertedValues(ht, FAMILY);
|
||||||
|
|
||||||
flush();
|
TEST_UTIL.flush();
|
||||||
|
|
||||||
// do some verification after flush
|
// do some verification after flush
|
||||||
verifyInsertedValues(ht, FAMILY);
|
verifyInsertedValues(ht, FAMILY);
|
||||||
|
@ -241,7 +241,7 @@ public class TestTimestampsFilter {
|
||||||
deleteOneVersion(ht, FAMILY, 0, 0, 4);
|
deleteOneVersion(ht, FAMILY, 0, 0, 4);
|
||||||
|
|
||||||
if (flushTables) {
|
if (flushTables) {
|
||||||
flush();
|
TEST_UTIL.flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
// request a bunch of versions including the deleted version. We should
|
// 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
|
* Assert that the passed in KeyValue has expected contents for the
|
||||||
* specified row, column & timestamp.
|
* specified row, column & timestamp.
|
||||||
|
|
Loading…
Reference in New Issue