HBASE-11031 Some HTable's are not closed in TestLogRolling
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1588587 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b1afd6e117
commit
25c7577573
|
@ -172,7 +172,8 @@ public class TestLogRolling {
|
||||||
|
|
||||||
private void startAndWriteData() throws IOException, InterruptedException {
|
private void startAndWriteData() throws IOException, InterruptedException {
|
||||||
// When the hbase:meta table can be opened, the region servers are running
|
// When the hbase:meta table can be opened, the region servers are running
|
||||||
new HTable(TEST_UTIL.getConfiguration(), TableName.META_TABLE_NAME);
|
HTable ht = new HTable(TEST_UTIL.getConfiguration(), TableName.META_TABLE_NAME);
|
||||||
|
ht.close();
|
||||||
this.server = cluster.getRegionServerThreads().get(0).getRegionServer();
|
this.server = cluster.getRegionServerThreads().get(0).getRegionServer();
|
||||||
this.log = server.getWAL();
|
this.log = server.getWAL();
|
||||||
|
|
||||||
|
@ -207,6 +208,7 @@ public class TestLogRolling {
|
||||||
newLog.rollWriter(true);
|
newLog.rollWriter(true);
|
||||||
} finally {
|
} finally {
|
||||||
newLog.closeAndDelete();
|
newLog.closeAndDelete();
|
||||||
|
fs.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -427,7 +429,8 @@ public class TestLogRolling {
|
||||||
fs.getDefaultReplication() > 1);
|
fs.getDefaultReplication() > 1);
|
||||||
LOG.info("Replication=" + fs.getDefaultReplication());
|
LOG.info("Replication=" + fs.getDefaultReplication());
|
||||||
// When the hbase:meta table can be opened, the region servers are running
|
// When the hbase:meta table can be opened, the region servers are running
|
||||||
new HTable(TEST_UTIL.getConfiguration(), TableName.META_TABLE_NAME);
|
HTable ht = new HTable(TEST_UTIL.getConfiguration(), TableName.META_TABLE_NAME);
|
||||||
|
ht.close();
|
||||||
|
|
||||||
this.server = cluster.getRegionServer(0);
|
this.server = cluster.getRegionServer(0);
|
||||||
this.log = server.getWAL();
|
this.log = server.getWAL();
|
||||||
|
@ -584,7 +587,8 @@ public class TestLogRolling {
|
||||||
@Test
|
@Test
|
||||||
public void testCompactionRecordDoesntBlockRolling() throws Exception {
|
public void testCompactionRecordDoesntBlockRolling() throws Exception {
|
||||||
// When the hbase:meta table can be opened, the region servers are running
|
// When the hbase:meta table can be opened, the region servers are running
|
||||||
new HTable(TEST_UTIL.getConfiguration(), TableName.META_TABLE_NAME);
|
HTable ht = new HTable(TEST_UTIL.getConfiguration(), TableName.META_TABLE_NAME);
|
||||||
|
ht.close();
|
||||||
|
|
||||||
String tableName = getName();
|
String tableName = getName();
|
||||||
HTable table = createTestTable(tableName);
|
HTable table = createTestTable(tableName);
|
||||||
|
|
Loading…
Reference in New Issue