From 38453f85896d04d2c6c8a84a3add74c7b4200106 Mon Sep 17 00:00:00 2001 From: Ashutosh Gupta Date: Mon, 16 Jan 2023 09:19:28 +0000 Subject: [PATCH] MAPREDUCE-7413. Upgrade Junit 4 to 5 in hadoop-mapreduce-client-hs-plugins (#5023) Co-authored-by: Ashutosh Gupta Signed-off-by: Akira Ajisaka --- .../hadoop-mapreduce-client-hs-plugins/pom.xml | 15 +++++++++++++++ .../hs/webapp/TestMapReduceTrackingUriPlugin.java | 8 ++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs-plugins/pom.xml b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs-plugins/pom.xml index bedfc1fc1af..37d4464cd76 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs-plugins/pom.xml +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs-plugins/pom.xml @@ -36,6 +36,21 @@ org.apache.hadoop hadoop-yarn-common + + org.junit.jupiter + junit-jupiter-api + test + + + org.junit.jupiter + junit-jupiter-engine + test + + + org.junit.platform + junit-platform-launcher + test + org.apache.hadoop hadoop-mapreduce-client-common diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs-plugins/src/test/java/org/apache/hadoop/mapreduce/v2/hs/webapp/TestMapReduceTrackingUriPlugin.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs-plugins/src/test/java/org/apache/hadoop/mapreduce/v2/hs/webapp/TestMapReduceTrackingUriPlugin.java index 9291097cbf4..55346d9f459 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs-plugins/src/test/java/org/apache/hadoop/mapreduce/v2/hs/webapp/TestMapReduceTrackingUriPlugin.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs-plugins/src/test/java/org/apache/hadoop/mapreduce/v2/hs/webapp/TestMapReduceTrackingUriPlugin.java @@ -18,7 +18,7 @@ package org.apache.hadoop.mapreduce.v2.hs.webapp; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import java.net.URI; import java.net.URISyntaxException; @@ -27,11 +27,11 @@ import org.apache.hadoop.http.HttpConfig; import org.apache.hadoop.mapreduce.v2.jobhistory.JHAdminConfig; import org.apache.hadoop.yarn.api.records.ApplicationId; import org.apache.hadoop.yarn.conf.YarnConfiguration; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class TestMapReduceTrackingUriPlugin { @Test - public void testProducesHistoryServerUriForAppId() + void testProducesHistoryServerUriForAppId() throws URISyntaxException { final String historyAddress = "example.net:424242"; YarnConfiguration conf = new YarnConfiguration(); @@ -49,7 +49,7 @@ public class TestMapReduceTrackingUriPlugin { } @Test - public void testProducesHistoryServerUriWithHTTPS() + void testProducesHistoryServerUriWithHTTPS() throws URISyntaxException { final String historyAddress = "example.net:404040"; YarnConfiguration conf = new YarnConfiguration();