You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-commits@hadoop.apache.org by su...@apache.org on 2013/05/25 00:47:19 UTC

svn commit: r1486245 - in /hadoop/common/branches/branch-2/hadoop-mapreduce-project: CHANGES.txt hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/test/java/org/apache/hadoop/mapred/TestQueue.java

Author: suresh
Date: Fri May 24 22:47:19 2013
New Revision: 1486245

URL: http://svn.apache.org/r1486245
Log:
MAPREDUCE-5191. Merge r1484575 from trunk

Modified:
    hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt
    hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/test/java/org/apache/hadoop/mapred/TestQueue.java

Modified: hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt?rev=1486245&r1=1486244&r2=1486245&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt Fri May 24 22:47:19 2013
@@ -147,6 +147,9 @@ Release 2.0.5-beta - UNRELEASED
     classpath problems and unexpected behavior of symlinks (Chris Nauroth via
     bikas)
 
+    MAPREDUCE-5191. TestQueue#testQueue fails with timeout on Windows. (Ivan
+    Mitic via hitesh)
+
   BREAKDOWN OF HADOOP-8562 SUBTASKS
 
     MAPREDUCE-4739. Some MapReduce tests fail to find winutils.

Modified: hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/test/java/org/apache/hadoop/mapred/TestQueue.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/test/java/org/apache/hadoop/mapred/TestQueue.java?rev=1486245&r1=1486244&r2=1486245&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/test/java/org/apache/hadoop/mapred/TestQueue.java (original)
+++ hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/test/java/org/apache/hadoop/mapred/TestQueue.java Fri May 24 22:47:19 2013
@@ -28,8 +28,11 @@ import java.util.Iterator;
 import java.util.Set;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileUtil;
 import org.apache.hadoop.mapreduce.MRConfig;
 import org.apache.hadoop.security.UserGroupInformation;
+import org.junit.After;
+import org.junit.Before;
 import org.junit.Test;
 
 import static junit.framework.Assert.*;
@@ -39,6 +42,18 @@ import static org.mockito.Mockito.*;
  * TestCounters checks the sanity and recoverability of Queue
  */
 public class TestQueue {
+  private static File testDir = new File(System.getProperty("test.build.data",
+      "/tmp"), TestJobConf.class.getSimpleName());
+
+  @Before
+  public void setup() {
+    testDir.mkdirs();
+  }
+
+  @After
+  public void cleanup() {
+    FileUtil.fullyDelete(testDir);
+  }
 
   /**
    * test QueueManager
@@ -217,8 +232,7 @@ public class TestQueue {
  */
   private File writeFile() throws IOException {
 
-    File f = null;
-    f = File.createTempFile("tst", "xml");
+    File f = new File(testDir, "tst.xml");
     BufferedWriter out = new BufferedWriter(new FileWriter(f));
     String properties = "<properties><property key=\"key\" value=\"value\"/><property key=\"key1\" value=\"value1\"/></properties>";
     out.write("<queues>");