|
24 | 24 | import java.util.UUID; |
25 | 25 | import java.util.concurrent.TimeUnit; |
26 | 26 | import java.util.function.Supplier; |
| 27 | + |
| 28 | +import org.apache.hadoop.test.AbstractHadoopTestBase; |
27 | 29 | import org.apache.hadoop.test.GenericTestUtils; |
28 | 30 | import org.apache.hadoop.util.concurrent.SubjectInheritingThread; |
29 | 31 | import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode; |
|
34 | 36 | import static org.junit.jupiter.api.Assertions.assertNotNull; |
35 | 37 | import static org.junit.jupiter.api.Assertions.assertTrue; |
36 | 38 | import static org.junit.jupiter.api.Assertions.fail; |
37 | | -import static org.junit.jupiter.api.Timeout.ThreadMode.SEPARATE_THREAD; |
38 | 39 |
|
39 | 40 | import java.io.IOException; |
40 | 41 | import java.net.InetSocketAddress; |
|
81 | 82 |
|
82 | 83 | import org.glassfish.jersey.jettison.internal.entity.JettisonObjectProvider; |
83 | 84 |
|
84 | | -public class TestRMHA { |
| 85 | +public class TestRMHA extends AbstractHadoopTestBase { |
85 | 86 | private static final Logger LOG = LoggerFactory.getLogger(TestRMHA.class); |
86 | 87 | private Configuration configuration; |
87 | 88 | private MockRM rm = null; |
@@ -477,7 +478,6 @@ public synchronized void startInternal() throws Exception { |
477 | 478 | } |
478 | 479 |
|
479 | 480 | @Test |
480 | | - @Timeout(value=60, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD) |
481 | 481 | public void testTransitionedToStandbyShouldNotHang() throws Exception { |
482 | 482 | configuration.setBoolean(YarnConfiguration.AUTO_FAILOVER_ENABLED, false); |
483 | 483 | Configuration conf = new YarnConfiguration(configuration); |
@@ -614,7 +614,7 @@ protected void serviceStart() throws Exception { |
614 | 614 | } |
615 | 615 |
|
616 | 616 | @Test |
617 | | - @Timeout(value = 9000) // FIXME that's more than two hours |
| 617 | + @Timeout(value = 10, unit = TimeUnit.MINUTES) |
618 | 618 | public void testTransitionedToActiveRefreshFail() throws Exception { |
619 | 619 | configuration.setBoolean(YarnConfiguration.AUTO_FAILOVER_ENABLED, false); |
620 | 620 | rm = new MockRM(configuration) { |
|
0 commit comments