Skip to content

Commit 14dd5e7

Browse files
committed
HBASE-27431 Remove TestRemoteTable.testLimitedScan (#4832)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
1 parent a860591 commit 14dd5e7

1 file changed

Lines changed: 0 additions & 41 deletions

File tree

hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteTable.java

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -574,47 +574,6 @@ public void testResponse() {
574574
assertTrue(response.hasBody());
575575
}
576576

577-
/**
578-
* Tests scanner with limitation limit the number of rows each scanner scan fetch at life time The
579-
* number of rows returned should be equal to the limit
580-
*/
581-
@Test
582-
public void testLimitedScan() throws Exception {
583-
int numTrials = 100;
584-
int limit = 60;
585-
586-
// Truncate the test table for inserting test scenarios rows keys
587-
TEST_UTIL.getAdmin().disableTable(TABLE);
588-
TEST_UTIL.getAdmin().truncateTable(TABLE, false);
589-
String row = "testrow";
590-
591-
try (Table table = TEST_UTIL.getConnection().getTable(TABLE)) {
592-
List<Put> puts = new ArrayList<>();
593-
Put put = null;
594-
for (int i = 1; i <= numTrials; i++) {
595-
put = new Put(Bytes.toBytes(row + i));
596-
put.addColumn(COLUMN_1, QUALIFIER_1, TS_2, Bytes.toBytes("testvalue" + i));
597-
puts.add(put);
598-
}
599-
table.put(puts);
600-
}
601-
602-
remoteTable =
603-
new RemoteHTable(new Client(new Cluster().add("localhost", REST_TEST_UTIL.getServletPort())),
604-
TEST_UTIL.getConfiguration(), TABLE.toBytes());
605-
606-
Scan scan = new Scan();
607-
scan.setLimit(limit);
608-
ResultScanner scanner = remoteTable.getScanner(scan);
609-
Iterator<Result> resultIterator = scanner.iterator();
610-
int counter = 0;
611-
while (resultIterator.hasNext()) {
612-
resultIterator.next();
613-
counter++;
614-
}
615-
assertEquals(limit, counter);
616-
}
617-
618577
/**
619578
* Tests keeping a HBase scanner alive for long periods of time. Each call to next() should reset
620579
* the ConnectionCache timeout for the scanner's connection.

0 commit comments

Comments
 (0)