sudeep87 / uimafit

Automatically exported from code.google.com/p/uimafit
0 stars 0 forks source link

org.uimafit.factory.ExternalResourceFactoryTest fails with an error if not connected to Internet #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I happened to run the uimaFIT test suite when I was offline and discovered that 
this test throws an error.

org.junit.ComparisonFailure: expected:<[http://dum.my]> but 
was:<[file:/C:/Users/Philip/Documents/Academic/workspace/uimaFIT/target/test-cla
sses/]>
    at org.junit.Assert.assertEquals(Assert.java:123)
    at org.junit.Assert.assertEquals(Assert.java:145)
    at org.uimafit.factory.ExternalResourceFactoryTest$DummySharedResourceObject.load(ExternalResourceFactoryTest.java:134)
    at org.apache.uima.resource.impl.ResourceManager_impl.registerResource(ResourceManager_impl.java:574)
    at org.apache.uima.resource.impl.ResourceManager_impl.initializeExternalResources(ResourceManager_impl.java:413)
    at org.apache.uima.resource.Resource_ImplBase.initialize(Resource_ImplBase.java:146)
    at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.initialize(AnalysisEngineImplBase.java:109)
    at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initialize(PrimitiveAnalysisEngine_impl.java:124)
    at org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(AnalysisEngineFactory_impl.java:94)
    at org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:62)
    at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:258)
    at org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:326)
    at org.uimafit.factory.ExternalResourceFactoryTest.testScanBind(ExternalResourceFactoryTest.java:73)
    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:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Original issue reported on code.google.com by pvogren@gmail.com on 16 Jun 2010 at 2:46

GoogleCodeExporter commented 8 years ago
I'll have a look at it.

Original comment by richard.eckart on 16 Jun 2010 at 8:45

GoogleCodeExporter commented 8 years ago
I can reproduce the issue. It doesn't seem to me that the problem is in uimaFIT 
though. I think UIMA itself does some oddness here while passing the value 
through. Have to investigate further.

Original comment by richard.eckart on 19 Jun 2010 at 4:42

GoogleCodeExporter commented 8 years ago
I've had this problem for an automatic build as well now. Maybe UIMA does 
something to check if an URL is a URL and if there is an exception, it assumes 
it is a file URL or something. This does not seem to be a critical issue, but 
sure an annoying one. Since UIMA probably can't be fixed here easily, changing 
the test case to use a file URL to start with may be an option. I have to check 
this.

Original comment by richard.eckart on 15 Jul 2010 at 12:47

GoogleCodeExporter commented 8 years ago
Added warnings in JavaDoc. Fixed test case. 

Original comment by richard.eckart on 15 Jul 2010 at 5:24