HBASE-23999 [flakey test] TestTableOutputFormatConnectionExhaust (#1302)
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
This commit is contained in:
parent
c8d6ee31b8
commit
5e764f57a8
|
@ -19,9 +19,6 @@ package org.apache.hadoop.hbase.regionserver;
|
|||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.fs.FileStatus;
|
||||
import org.apache.hadoop.fs.FileSystem;
|
||||
|
@ -60,12 +57,6 @@ public class TestCompactionTool {
|
|||
public void setUp() throws Exception {
|
||||
this.testUtil.startMiniCluster();
|
||||
testUtil.createTable(tableName, HBaseTestingUtility.fam1);
|
||||
String defaultFS = testUtil.getMiniHBaseCluster().getConfiguration().get("fs.defaultFS");
|
||||
Configuration config = HBaseConfiguration.create();
|
||||
config.set("fs.defaultFS", defaultFS);
|
||||
String configPath = this.getClass().getClassLoader()
|
||||
.getResource("hbase-site.xml").getFile();
|
||||
config.writeXml(new FileOutputStream(new File(configPath)));
|
||||
rootDir = testUtil.getDefaultRootDirPath();
|
||||
this.region = testUtil.getMiniHBaseCluster().getRegions(tableName).get(0);
|
||||
}
|
||||
|
@ -89,7 +80,10 @@ public class TestCompactionTool {
|
|||
+ Bytes.toString(HBaseTestingUtility.fam1);
|
||||
FileStatus[] regionDirFiles = fs.listStatus(new Path(storePath));
|
||||
assertEquals(10, regionDirFiles.length);
|
||||
int result = ToolRunner.run(HBaseConfiguration.create(), new CompactionTool(),
|
||||
String defaultFS = testUtil.getMiniHBaseCluster().getConfiguration().get("fs.defaultFS");
|
||||
Configuration config = HBaseConfiguration.create();
|
||||
config.set("fs.defaultFS", defaultFS);
|
||||
int result = ToolRunner.run(config, new CompactionTool(),
|
||||
new String[]{"-compactOnce", "-major", storePath});
|
||||
assertEquals(0,result);
|
||||
regionDirFiles = fs.listStatus(new Path(storePath));
|
||||
|
|
Loading…
Reference in New Issue