You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Jeff Zemerick (Jira)" <ji...@apache.org> on 2022/03/21 15:04:00 UTC

[jira] [Resolved] (OPENNLP-1323) Test Failure

     [ https://issues.apache.org/jira/browse/OPENNLP-1323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeff Zemerick resolved OPENNLP-1323.
------------------------------------
    Resolution: Not A Problem

> Test Failure
> ------------
>
>                 Key: OPENNLP-1323
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-1323
>             Project: OpenNLP
>          Issue Type: Bug
>          Components: Build, Packaging and Test
>            Reporter: Soodeh
>            Priority: Major
>
> Hi, 
> I have generated tests for "Opennlp tools" classes using Evosuite (version 1.0.6)framework but when I run generated tests I have this failure (full trace):
> *<testcase* name*=*"test04" ** classname*=*"opennlp.tools.formats.brat.AnnotationConfiguration_ESTest" ** time*=*"0.012"*>*
>     *<failure* message*=*"Exception was not thrown in org.evosuite.runtime.mock.java.io.MockFileInputStream but in java.io.FilePermission.init(FilePermission.java:191): java.lang.NullPointerException: name can&apos;t be null" ** type*=*"java.lang.AssertionError"*><![CDATA[*java.lang.AssertionError: Exception was not thrown in org.evosuite.runtime.mock.java.io.MockFileInputStream but in java.io.FilePermission.init(FilePermission.java:191): java.lang.NullPointerException: name can't be null
> at org.evosuite.runtime.EvoAssertions.assertThrownBy(EvoAssertions.java:112)
> at org.evosuite.runtime.EvoAssertions.verifyException(EvoAssertions.java:49)
> at opennlp.tools.formats.brat.AnnotationConfiguration_ESTest.test04(AnnotationConfiguration_ESTest.java:91)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
> at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.lang.Thread.run(Thread.java:748)
> *]]></failure>*
>  
> And this is the generated test:
> @Test(timeout = 4000)
> public void test04() throws Throwable {
>  
>  try { 
>  AnnotationConfiguration.parse((File) null);
>  fail("Expecting exception: NullPointerException");
>  
>  } catch(NullPointerException e) {
>  //
>  // no message in exception (getMessage() returned null)
>  //
>  verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e);
>  }
> }
>  
> Thanks.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)