HBASE-6827. [WINDOWS] TestScannerTimeout fails expecting a timeout
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1407290 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
227dfa8bd4
commit
b28150763d
|
@ -51,6 +51,7 @@ public class TestScannerTimeout {
|
||||||
private final static int NB_ROWS = 10;
|
private final static int NB_ROWS = 10;
|
||||||
// Be careful w/ what you set this timer to... it can get in the way of
|
// Be careful w/ what you set this timer to... it can get in the way of
|
||||||
// the mini cluster coming up -- the verification in particular.
|
// the mini cluster coming up -- the verification in particular.
|
||||||
|
private final static int THREAD_WAKE_FREQUENCY = 1000;
|
||||||
private final static int SCANNER_TIMEOUT = 10000;
|
private final static int SCANNER_TIMEOUT = 10000;
|
||||||
private final static int SCANNER_CACHING = 5;
|
private final static int SCANNER_CACHING = 5;
|
||||||
|
|
||||||
|
@ -61,6 +62,7 @@ public class TestScannerTimeout {
|
||||||
public static void setUpBeforeClass() throws Exception {
|
public static void setUpBeforeClass() throws Exception {
|
||||||
Configuration c = TEST_UTIL.getConfiguration();
|
Configuration c = TEST_UTIL.getConfiguration();
|
||||||
c.setInt(HConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD, SCANNER_TIMEOUT);
|
c.setInt(HConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD, SCANNER_TIMEOUT);
|
||||||
|
c.setInt(HConstants.THREAD_WAKE_FREQUENCY, THREAD_WAKE_FREQUENCY);
|
||||||
// We need more than one region server for this test
|
// We need more than one region server for this test
|
||||||
TEST_UTIL.startMiniCluster(2);
|
TEST_UTIL.startMiniCluster(2);
|
||||||
HTable table = TEST_UTIL.createTable(TABLE_NAME, SOME_BYTES);
|
HTable table = TEST_UTIL.createTable(TABLE_NAME, SOME_BYTES);
|
||||||
|
@ -106,7 +108,7 @@ public class TestScannerTimeout {
|
||||||
count++;
|
count++;
|
||||||
if (count == 5) {
|
if (count == 5) {
|
||||||
// Sleep just a bit more to be sure
|
// Sleep just a bit more to be sure
|
||||||
Thread.sleep(SCANNER_TIMEOUT+100);
|
Thread.sleep(SCANNER_TIMEOUT + THREAD_WAKE_FREQUENCY + 100);
|
||||||
}
|
}
|
||||||
res = r.next();
|
res = r.next();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue