Ver Fonte

YARN-491. TestContainerLogsPage fails on Windows. Contributed by Chris Nauroth.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1459526 13f79535-47bb-0310-9956-ffa450edef68
Hitesh Shah há 12 anos atrás
pai
commit
0cda8267d5

+ 2 - 0
hadoop-yarn-project/CHANGES.txt

@@ -23,6 +23,8 @@ Trunk - Unreleased
 
     YARN-490. TestDistributedShell fails on Windows. (Chris Nauroth via hitesh)
 
+    YARN-491. TestContainerLogsPage fails on Windows. (Chris Nauroth via hitesh)
+
   BREAKDOWN OF HADOOP-8562 SUBTASKS
 
     YARN-158. Yarn creating package-info.java must not depend on sh.

+ 4 - 4
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/webapp/TestContainerLogsPage.java

@@ -41,11 +41,11 @@ import org.junit.Test;
 
 public class TestContainerLogsPage {
 
-  @Test
+  @Test(timeout=30000)
   public void testContainerLogDirs() throws IOException {
-    String absLogDir = new File("target",
-        TestNMWebServer.class.getSimpleName() + "LogDir").getAbsolutePath();
-    String logdirwithFile = "file://" + absLogDir;
+    File absLogDir = new File("target",
+      TestNMWebServer.class.getSimpleName() + "LogDir").getAbsoluteFile();
+    String logdirwithFile = absLogDir.toURI().toString();
     Configuration conf = new Configuration();
     conf.set(YarnConfiguration.NM_LOG_DIRS, logdirwithFile);
     NodeHealthCheckerService healthChecker = new NodeHealthCheckerService();