HDFS-11411. Avoid OutOfMemoryError in TestMaintenanceState test runs. (Manoj Govindassamy via mingma)
(cherry picked from commit cfcd527323
)
This commit is contained in:
parent
171b18693a
commit
0add328c8c
|
@ -333,6 +333,7 @@ public class TestMaintenanceState extends AdminStatesBaseTest {
|
||||||
|
|
||||||
private void testExpectedReplication(int replicationFactor,
|
private void testExpectedReplication(int replicationFactor,
|
||||||
int expectedReplicasInRead) throws IOException {
|
int expectedReplicasInRead) throws IOException {
|
||||||
|
setup();
|
||||||
startCluster(1, 5);
|
startCluster(1, 5);
|
||||||
|
|
||||||
final Path file = new Path("/testExpectedReplication.dat");
|
final Path file = new Path("/testExpectedReplication.dat");
|
||||||
|
@ -352,6 +353,7 @@ public class TestMaintenanceState extends AdminStatesBaseTest {
|
||||||
nodeOutofService));
|
nodeOutofService));
|
||||||
|
|
||||||
cleanupFile(fileSys, file);
|
cleanupFile(fileSys, file);
|
||||||
|
teardown();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -492,6 +494,7 @@ public class TestMaintenanceState extends AdminStatesBaseTest {
|
||||||
|
|
||||||
private void testDecommissionDifferentNodeAfterMaintenance(int repl)
|
private void testDecommissionDifferentNodeAfterMaintenance(int repl)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
setup();
|
||||||
startCluster(1, 5);
|
startCluster(1, 5);
|
||||||
|
|
||||||
final Path file =
|
final Path file =
|
||||||
|
@ -519,6 +522,7 @@ public class TestMaintenanceState extends AdminStatesBaseTest {
|
||||||
assertNull(checkWithRetry(ns, fileSys, file, repl + 1, null));
|
assertNull(checkWithRetry(ns, fileSys, file, repl + 1, null));
|
||||||
|
|
||||||
cleanupFile(fileSys, file);
|
cleanupFile(fileSys, file);
|
||||||
|
teardown();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -583,6 +587,7 @@ public class TestMaintenanceState extends AdminStatesBaseTest {
|
||||||
*/
|
*/
|
||||||
private void testChangeReplicationFactor(int oldFactor, int newFactor,
|
private void testChangeReplicationFactor(int oldFactor, int newFactor,
|
||||||
int expectedLiveReplicas) throws IOException {
|
int expectedLiveReplicas) throws IOException {
|
||||||
|
setup();
|
||||||
LOG.info("Starting testChangeReplicationFactor {} {} {}",
|
LOG.info("Starting testChangeReplicationFactor {} {} {}",
|
||||||
oldFactor, newFactor, expectedLiveReplicas);
|
oldFactor, newFactor, expectedLiveReplicas);
|
||||||
startCluster(1, 5);
|
startCluster(1, 5);
|
||||||
|
@ -615,6 +620,7 @@ public class TestMaintenanceState extends AdminStatesBaseTest {
|
||||||
assertNull(checkWithRetry(ns, fileSys, file, newFactor, null));
|
assertNull(checkWithRetry(ns, fileSys, file, newFactor, null));
|
||||||
|
|
||||||
cleanupFile(fileSys, file);
|
cleanupFile(fileSys, file);
|
||||||
|
teardown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue