Skip to content

Commit

Permalink
HBASE-26919 Rewrite the counting rows part in TestFromClientSide4 (ap…
Browse files Browse the repository at this point in the history
…ache#4314)

Signed-off-by: Xiaolin Ha <haxiaolin@apache.org>
(cherry picked from commit 4e12eee)
  • Loading branch information
Apache9 committed Apr 3, 2022
1 parent 9273474 commit a7f8e2a
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.apache.hbase.thirdparty.com.google.common.collect.Iterables;

/**
* Run tests that use the HBase clients; {@link Table}.
* Sets up the HBase mini cluster once at start and runs through all client tests.
Expand Down Expand Up @@ -1041,10 +1043,7 @@ public void testDuplicateVersions() throws Exception {
Scan scan = new Scan();
scan.addFamily(CONTENTS_FAMILY);
try (ResultScanner scanner = table.getScanner(scan)) {
int nbRows = 0;
for (@SuppressWarnings("unused") Result row : scanner) {
nbRows++;
}
int nbRows = Iterables.size(scanner);
assertEquals(NB_BATCH_ROWS, nbRows);
}
}
Expand All @@ -1070,10 +1069,7 @@ public void testDuplicateVersions() throws Exception {
Scan scan = new Scan();
scan.addFamily(CONTENTS_FAMILY);
try (ResultScanner scanner = table.getScanner(scan)) {
int nbRows = 0;
for (@SuppressWarnings("unused") Result row : scanner) {
nbRows++;
}
int nbRows = Iterables.size(scanner);
assertEquals(NB_BATCH_ROWS * 10, nbRows);
}
}
Expand Down

0 comments on commit a7f8e2a

Please sign in to comment.