[ https://issues.apache.org/jira/browse/YARN-1855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940625#comment-13940625 ]
Ted Yu commented on YARN-1855: ------------------------------ I tried this: {code} Index: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/TestRMFailover.java =================================================================== --- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/TestRMFailover.java (revision 1579270) +++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/TestRMFailover.java (working copy) @@ -286,7 +286,8 @@ try { Map<String, List<String>> map = new URL(url).openConnection().getHeaderFields(); - fieldHeader = map.get(field).get(0); + List<String> lst = map.get(field); + if (lst != null) fieldHeader = lst.get(0); } catch (Exception e) { // throw new RuntimeException(e); } {code} However, the next assertion fails: {code} header = getHeader("Refresh", rm2Url + "/ws/v1/cluster/apps"); assertTrue(header.contains("; url=" + rm1Url)); {code} header was null. > TestRMFailover#testRMWebAppRedirect fails in trunk > -------------------------------------------------- > > Key: YARN-1855 > URL: https://issues.apache.org/jira/browse/YARN-1855 > Project: Hadoop YARN > Issue Type: Test > Reporter: Ted Yu > > From https://builds.apache.org/job/Hadoop-Yarn-trunk/514/console : > {code} > testRMWebAppRedirect(org.apache.hadoop.yarn.client.TestRMFailover) Time > elapsed: 5.39 sec <<< ERROR! > java.lang.NullPointerException: null > at > org.apache.hadoop.yarn.client.TestRMFailover.testRMWebAppRedirect(TestRMFailover.java:269) > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)