SLIDER-352 more testing of windows
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/db2d2985 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/db2d2985 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/db2d2985 Branch: refs/heads/feature/SLIDER-149_Support_a_YARN_service_registry Commit: db2d29857faf53da2e8fce0c107209883980b266 Parents: 83665f6 Author: Steve Loughran <ste...@apache.org> Authored: Fri Aug 22 16:15:02 2014 +0100 Committer: Steve Loughran <ste...@apache.org> Committed: Fri Aug 22 16:15:02 2014 +0100 ---------------------------------------------------------------------- .../apache/slider/common/tools/TestWindowsSupport.groovy | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/db2d2985/slider-core/src/test/groovy/org/apache/slider/common/tools/TestWindowsSupport.groovy ---------------------------------------------------------------------- diff --git a/slider-core/src/test/groovy/org/apache/slider/common/tools/TestWindowsSupport.groovy b/slider-core/src/test/groovy/org/apache/slider/common/tools/TestWindowsSupport.groovy index 4da42f2..8387237 100644 --- a/slider-core/src/test/groovy/org/apache/slider/common/tools/TestWindowsSupport.groovy +++ b/slider-core/src/test/groovy/org/apache/slider/common/tools/TestWindowsSupport.groovy @@ -24,13 +24,15 @@ import org.apache.hadoop.conf.Configuration import org.apache.hadoop.fs.ChecksumFileSystem import org.apache.hadoop.fs.Path import org.apache.hadoop.fs.FileSystem as HadoopFS +import org.apache.hadoop.util.Shell +import org.apache.slider.test.SliderTestUtils import org.junit.Test import java.util.regex.Pattern @CompileStatic @Slf4j -class TestWindowsSupport { +class TestWindowsSupport extends SliderTestUtils { private static final Pattern hasDriveLetterSpecifier = Pattern.compile("^/?[a-zA-Z]:"); @@ -62,17 +64,18 @@ class TestWindowsSupport { @Test public void testPathHandling() throws Throwable { - System.setProperty("os.name", "Windows/286") + assume(Shell.WINDOWS, "not windows") + Path path = new Path(windowsFile); def uri = path.toUri() // assert "file" == uri.scheme assert uri.authority == null; - - Configuration conf = new Configuration() def localfs = HadoopFS.get(uri, conf) assert localfs instanceof ChecksumFileSystem + def stat = localfs.getFileStatus(path) + } }