HADOOP-8974. TestDFVariations fails on Windows. Contributed by Chris Nauroth.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1407222 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Suresh Srinivas 2012-11-08 19:12:42 +00:00
parent d511052be5
commit 1813fb0132
2 changed files with 9 additions and 2 deletions

View File

@ -272,7 +272,10 @@ Trunk (Unreleased)
HADOOP-8918. test-patch.sh is parsing modified files wrong. HADOOP-8918. test-patch.sh is parsing modified files wrong.
(Raja Aluri via suresh) (Raja Aluri via suresh)
HADOOP-8589 ViewFs tests fail when tests and home dirs are nested (sanjay Radia) HADOOP-8589 ViewFs tests fail when tests and home dirs are nested.
(sanjay Radia)
HADOOP-8974. TestDFVariations fails on Windows. (Chris Nauroth via suresh)
OPTIMIZATIONS OPTIMIZATIONS

View File

@ -23,6 +23,8 @@ import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.EnumSet; import java.util.EnumSet;
import org.apache.hadoop.util.Shell;
public class TestDFVariations extends TestCase { public class TestDFVariations extends TestCase {
public static class XXDF extends DF { public static class XXDF extends DF {
@ -51,7 +53,9 @@ public class TestDFVariations extends TestCase {
public void testOSParsing() throws Exception { public void testOSParsing() throws Exception {
for (DF.OSType ost : EnumSet.allOf(DF.OSType.class)) { for (DF.OSType ost : EnumSet.allOf(DF.OSType.class)) {
XXDF df = new XXDF(ost.getId()); XXDF df = new XXDF(ost.getId());
assertEquals(ost.getId() + " mount", "/foo/bar", df.getMount()); assertEquals(ost.getId() + " mount",
Shell.WINDOWS ? df.getDirPath().substring(0, 2) : "/foo/bar",
df.getMount());
} }
} }