petersomogyi commented on a change in pull request #289: HBASE-13798
TestFromClientSide* don't close the Table (branch-2)
URL: https://github.com/apache/hbase/pull/289#discussion_r291252526
##########
File path:
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
##########
@@ -4210,21 +4258,21 @@ public void testListTables() throws IOException,
InterruptedException {
for (int i = 0; i < tables.length; i++) {
TEST_UTIL.createTable(tables[i], FAMILY);
}
- Admin admin = TEST_UTIL.getAdmin();
- HTableDescriptor[] ts = admin.listTables();
- HashSet<HTableDescriptor> result = new
HashSet<HTableDescriptor>(ts.length);
- Collections.addAll(result, ts);
- int size = result.size();
- assertTrue(size >= tables.length);
- for (int i = 0; i < tables.length && i < size; i++) {
- boolean found = false;
- for (int j = 0; j < ts.length; j++) {
- if (ts[j].getTableName().equals(tables[i])) {
- found = true;
- break;
+ try (Admin admin = TEST_UTIL.getAdmin()) {
Review comment:
Same here, however, it wasn't closed previously.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services