Skip to content

Commit e2631d2

Browse files
author
Ashutosh Gupta
committed
Addressing comments
1 parent 1b7fa27 commit e2631d2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/test/java/org/apache/hadoop/yarn/server/webproxy/TestAppReportFetcher.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import org.apache.hadoop.yarn.exceptions.ApplicationNotFoundException;
3535
import org.apache.hadoop.yarn.exceptions.YarnException;
3636

37+
import static org.junit.jupiter.api.Assertions.assertEquals;
3738
import static org.junit.jupiter.api.Assertions.assertTrue;
3839
import static org.junit.jupiter.api.Assertions.fail;
3940

@@ -79,7 +80,7 @@ void testFetchReportAHSDisabled() throws YarnException, IOException {
7980
try {
8081
testHelper(false);
8182
} catch (ApplicationNotFoundException e) {
82-
assertTrue(e.getMessage() == appNotFoundExceptionMsg);
83+
assertEquals(appNotFoundExceptionMsg, e.getMessage());
8384
/* RM will not know of the app and Application History Service is disabled
8485
* So we will not try to get the report from AHS and RM will throw
8586
* ApplicationNotFoundException

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/test/java/org/apache/hadoop/yarn/server/webproxy/amfilter/TestSecureAmFilter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import static org.assertj.core.api.Assertions.assertThat;
4545
import static org.junit.jupiter.api.Assertions.assertFalse;
4646
import static org.junit.jupiter.api.Assertions.assertTrue;
47+
import static org.junit.jupiter.api.Assertions.fail;
4748

4849
/**
4950
* Test AmIpFilter. Requests to a no declared hosts should has way through
@@ -89,7 +90,7 @@ public static void setUp() {
8990
testMiniKDC = new MiniKdc(MiniKdc.createConf(), TEST_ROOT_DIR);
9091
setupKDC();
9192
} catch (Exception e) {
92-
assertTrue(false, "Couldn't create MiniKDC");
93+
fail("Couldn't create MiniKDC");
9394
}
9495
}
9596

0 commit comments

Comments
 (0)