[ http://issues.apache.org/jira/browse/HADOOP-383?page=all ]

Michel Tourn updated HADOOP-383:
--------------------------------

    Attachment: winenv.patch

The Environment code used was a little out-of-date:
-      if (OS.equals("Windows NT")) {
+      if (OS.indexOf("Windows") > -1) {

With this patch,
I successfully ran ant test-contrib on Windows XP.


> unit tests fail on windows
> --------------------------
>
>                 Key: HADOOP-383
>                 URL: http://issues.apache.org/jira/browse/HADOOP-383
>             Project: Hadoop
>          Issue Type: Bug
>          Components: contrib/streaming
>    Affects Versions: 0.5.0
>            Reporter: Owen O'Malley
>         Assigned To: Michel Tourn
>             Fix For: 0.5.0
>
>         Attachments: winenv.patch
>
>
> When I run the "ant test" target under Windows, I get the following exception 
> in the logs for the streaming unit tests. The unit tests need to run under 
> Windows, if it is going to be a supported platform. So we either need to 
> remove the streaming unit tests or make them work.
> Testsuite: org.apache.hadoop.streaming.TestStreaming
> Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.172 sec
> Testcase: testCommandLine took 0.172 sec
>         FAILED
> java.lang.RuntimeException: Operating system Windows XP not supported by this 
> class
>         at org.apache.hadoop.streaming.Environment.<init>(Environment.java:47)
>         at org.apache.hadoop.streaming.StreamJob.init(StreamJob.java:68)
>         at org.apache.hadoop.streaming.StreamJob.go(StreamJob.java:55)
>         at org.apache.hadoop.streaming.TestStreaming.testCommandLine(Unknown 
> Source)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at junit.framework.TestCase.runTest(TestCase.java:154)
>         at junit.framework.TestCase.runBare(TestCase.java:127)
>         at junit.framework.TestResult$1.protect(TestResult.java:106)
>         at junit.framework.TestResult.runProtected(TestResult.java:124)
>         at junit.framework.TestResult.run(TestResult.java:109)
>         at junit.framework.TestCase.run(TestCase.java:118)
>         at junit.framework.TestSuite.runTest(TestSuite.java:208)
>         at junit.framework.TestSuite.run(TestSuite.java:203)
>         at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:2
> 97)
>         at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.jav
> a:672)
>         at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:
> 567)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to