SOLR-10067: use one datanode for this test to reduce resource usage a bit.

This commit is contained in:
markrmiller 2017-02-01 11:40:28 -05:00
parent bc02b0f70d
commit bbc455de19
2 changed files with 3 additions and 1 deletions

View File

@ -39,12 +39,14 @@ public class HdfsBasicDistributedZkTest extends BasicDistributedZkTest {
@BeforeClass @BeforeClass
public static void setupClass() throws Exception { public static void setupClass() throws Exception {
System.setProperty("tests.hdfs.numdatanodes", "1");
dfsCluster = HdfsTestUtil.setupClass(createTempDir().toFile().getAbsolutePath()); dfsCluster = HdfsTestUtil.setupClass(createTempDir().toFile().getAbsolutePath());
} }
@AfterClass @AfterClass
public static void teardownClass() throws Exception { public static void teardownClass() throws Exception {
HdfsTestUtil.teardownClass(dfsCluster); HdfsTestUtil.teardownClass(dfsCluster);
System.clearProperty("tests.hdfs.numdatanodes");
dfsCluster = null; dfsCluster = null;
} }

View File

@ -75,7 +75,7 @@ public class HdfsTestUtil {
if (!HA_TESTING_ENABLED) haTesting = false; if (!HA_TESTING_ENABLED) haTesting = false;
int dataNodes = 2; int dataNodes = Integer.getInteger("tests.hdfs.numdatanodes", 2);
Configuration conf = new Configuration(); Configuration conf = new Configuration();
conf.set("dfs.block.access.token.enable", "false"); conf.set("dfs.block.access.token.enable", "false");