[ 
https://issues.apache.org/jira/browse/UIMA-1243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654897#action_12654897
 ] 

Marshall Schor commented on UIMA-1243:
--------------------------------------

I could not reproduce (on windows xp, Sun Java 6_07) - I got the capital "C:" 
for both the expected and actual.  What OS were you using?

A quick look at the code shows that the UIMA core code being tested is the 
{{findAbsoluteUrl}} method, and the test case is comparing it using a 
*canonicalized* form.

If you can get this to reproduce on your system, can you try changing the test 
case line 123, replacing {{getCanonicalFile()}} with {{getAbsoluteFile()}} and 
see if that makes the test case work?

> testFindAbsoluteUrl(org.apache.uima.resource.metadata.impl.Import_implTest) 
> fails on windows
> --------------------------------------------------------------------------------------------
>
>                 Key: UIMA-1243
>                 URL: https://issues.apache.org/jira/browse/UIMA-1243
>             Project: UIMA
>          Issue Type: Bug
>          Components: Build, Packaging and Test
>    Affects Versions: 2.2.2
>         Environment: Windows, Sun Java 6.  Didn't test other JVMs.
>            Reporter: Thilo Goetz
>            Priority: Minor
>
> URL comparison fails because device is in capitals (C:) in one instance, and 
> in lowercase (c:) in the other.  Not sure how to fix this.
> -------------------------------------------------------------------------------
> Test set: org.apache.uima.resource.metadata.impl.Import_implTest
> -------------------------------------------------------------------------------
> Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.031 sec <<< 
> FAILURE!
> testFindAbsoluteUrl(org.apache.uima.resource.metadata.impl.Import_implTest)  
> Time elapsed: 0.016 sec  <<< FAILURE!
> junit.framework.AssertionFailedError: 
> expected:<file:/C:/code/uima/uimaj-core/foo/bar/MyFile.xml> but 
> was:<file:/c:/code/uima/uimaj-core/foo/bar/MyFile.xml>
>       at junit.framework.Assert.fail(Assert.java:47)
>       at junit.framework.Assert.failNotEquals(Assert.java:282)
>       at junit.framework.Assert.assertEquals(Assert.java:64)
>       at junit.framework.Assert.assertEquals(Assert.java:71)
>       at 
> org.apache.uima.resource.metadata.impl.Import_implTest.testFindAbsoluteUrl(Import_implTest.java:124)
>       at 
> org.apache.uima.resource.metadata.impl.Import_implTest.testFindAbsoluteUrl(Import_implTest.java:124)
>       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 sun.reflect.GeneratedMethodAccessor313.invoke(Unknown Source)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:585)
>       at 
> org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
>       at 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
>       at 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
>       at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
>       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 
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
>       at 
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to