MAPREDUCE-5191. TestQueue#testQueue fails with timeout on Windows. (Contributed by Ivan Mitic)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1484575 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f9ab715880
commit
6517c3f714
@ -141,6 +141,9 @@ Trunk (Unreleased)
|
|||||||
classpath problems and unexpected behavior of symlinks (Chris Nauroth via
|
classpath problems and unexpected behavior of symlinks (Chris Nauroth via
|
||||||
bikas)
|
bikas)
|
||||||
|
|
||||||
|
MAPREDUCE-5191. TestQueue#testQueue fails with timeout on Windows. (Ivan
|
||||||
|
Mitic via hitesh)
|
||||||
|
|
||||||
BREAKDOWN OF HADOOP-8562 SUBTASKS
|
BREAKDOWN OF HADOOP-8562 SUBTASKS
|
||||||
|
|
||||||
MAPREDUCE-4739. Some MapReduce tests fail to find winutils.
|
MAPREDUCE-4739. Some MapReduce tests fail to find winutils.
|
||||||
|
@ -28,8 +28,11 @@
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
|
import org.apache.hadoop.fs.FileUtil;
|
||||||
import org.apache.hadoop.mapreduce.MRConfig;
|
import org.apache.hadoop.mapreduce.MRConfig;
|
||||||
import org.apache.hadoop.security.UserGroupInformation;
|
import org.apache.hadoop.security.UserGroupInformation;
|
||||||
|
import org.junit.After;
|
||||||
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import static junit.framework.Assert.*;
|
import static junit.framework.Assert.*;
|
||||||
@ -39,6 +42,18 @@
|
|||||||
* TestCounters checks the sanity and recoverability of Queue
|
* TestCounters checks the sanity and recoverability of Queue
|
||||||
*/
|
*/
|
||||||
public class TestQueue {
|
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
|
* test QueueManager
|
||||||
@ -217,8 +232,7 @@ public void test2Queue() throws IOException {
|
|||||||
*/
|
*/
|
||||||
private File writeFile() throws IOException {
|
private File writeFile() throws IOException {
|
||||||
|
|
||||||
File f = null;
|
File f = new File(testDir, "tst.xml");
|
||||||
f = File.createTempFile("tst", "xml");
|
|
||||||
BufferedWriter out = new BufferedWriter(new FileWriter(f));
|
BufferedWriter out = new BufferedWriter(new FileWriter(f));
|
||||||
String properties = "<properties><property key=\"key\" value=\"value\"/><property key=\"key1\" value=\"value1\"/></properties>";
|
String properties = "<properties><property key=\"key\" value=\"value\"/><property key=\"key1\" value=\"value1\"/></properties>";
|
||||||
out.write("<queues>");
|
out.write("<queues>");
|
||||||
|
Loading…
Reference in New Issue
Block a user