Skip to content

Commit e1c8e96

Browse files
committed
extend from AbstractHadoopTestBase
1 parent 3b4eef2 commit e1c8e96

File tree

1 file changed

+4
-4
lines changed
  • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager

1 file changed

+4
-4
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestRMHA.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
import java.util.UUID;
2525
import java.util.concurrent.TimeUnit;
2626
import java.util.function.Supplier;
27+
28+
import org.apache.hadoop.test.AbstractHadoopTestBase;
2729
import org.apache.hadoop.test.GenericTestUtils;
2830
import org.apache.hadoop.util.concurrent.SubjectInheritingThread;
2931
import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode;
@@ -34,7 +36,6 @@
3436
import static org.junit.jupiter.api.Assertions.assertNotNull;
3537
import static org.junit.jupiter.api.Assertions.assertTrue;
3638
import static org.junit.jupiter.api.Assertions.fail;
37-
import static org.junit.jupiter.api.Timeout.ThreadMode.SEPARATE_THREAD;
3839

3940
import java.io.IOException;
4041
import java.net.InetSocketAddress;
@@ -81,7 +82,7 @@
8182

8283
import org.glassfish.jersey.jettison.internal.entity.JettisonObjectProvider;
8384

84-
public class TestRMHA {
85+
public class TestRMHA extends AbstractHadoopTestBase {
8586
private static final Logger LOG = LoggerFactory.getLogger(TestRMHA.class);
8687
private Configuration configuration;
8788
private MockRM rm = null;
@@ -477,7 +478,6 @@ public synchronized void startInternal() throws Exception {
477478
}
478479

479480
@Test
480-
@Timeout(value=60, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)
481481
public void testTransitionedToStandbyShouldNotHang() throws Exception {
482482
configuration.setBoolean(YarnConfiguration.AUTO_FAILOVER_ENABLED, false);
483483
Configuration conf = new YarnConfiguration(configuration);
@@ -614,7 +614,7 @@ protected void serviceStart() throws Exception {
614614
}
615615

616616
@Test
617-
@Timeout(value = 9000) // FIXME that's more than two hours
617+
@Timeout(value = 10, unit = TimeUnit.MINUTES)
618618
public void testTransitionedToActiveRefreshFail() throws Exception {
619619
configuration.setBoolean(YarnConfiguration.AUTO_FAILOVER_ENABLED, false);
620620
rm = new MockRM(configuration) {

0 commit comments

Comments
 (0)