[
http://jira.codehaus.org/browse/SUREFIRE-346?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dan Fabulich closed SUREFIRE-346.
---------------------------------
Resolution: Fixed
Fixed in revision 597761.
> build failure when there is any class with name matching the test pattern,
> but is not a testcase
> ------------------------------------------------------------------------------------------------
>
> Key: SUREFIRE-346
> URL: http://jira.codehaus.org/browse/SUREFIRE-346
> Project: Maven Surefire
> Issue Type: Bug
> Affects Versions: 2.3
> Reporter: Domingos Creado
> Fix For: 2.4
>
>
> When there is a class (or classes) that match the name pattern (Test* ou
> *Test), but it is not a testcase, like for example a helper class or a mock,
> the plugin tries to instantiate it.
> The plugin could check if the class is assignable to a test case prior trying
> to instantiate it.
> [INFO] [surefire:test]
> [INFO] Surefire report directory:
> c:\views\Clearing_1.0\GSUP2\Clearing\Implementacao\ctup-web-app\target\surefire-reports
> org.apache.maven.surefire.booter.SurefireExecutionException: Unable to
> instantiate POJO 'class
> br.com.cpqd.ctup.batch.cdrinterno.filtros.FonteDadosTest'; nested exception
> is java.lang.InstantiationException:
> br.com.cpqd.ctup.batch.cdrinterno.filtros.FonteDadosTest; nested exception is
> org.apache.maven.surefire.testset.TestSetFailedException: Unable to
> instantiate POJO 'class
> br.com.cpqd.ctup.batch.cdrinterno.filtros.FonteDadosTest'; nested exception
> is java.lang.InstantiationException:
> br.com.cpqd.ctup.batch.cdrinterno.filtros.FonteDadosTestorg.apache.maven.surefire.testset.TestSetFailedException:
> Unable to instantiate POJO 'class
> br.com.cpqd.ctup.batch.cdrinterno.filtros.FonteDadosTest'; nested exception
> is java.lang.InstantiationException:
> br.com.cpqd.ctup.batch.cdrinterno.filtros.FonteDadosTest
> java.lang.InstantiationException:
> br.com.cpqd.ctup.batch.cdrinterno.filtros.FonteDadosTest
> at java.lang.Class.newInstance0(Class.java:340)
> at java.lang.Class.newInstance(Class.java:308)
> at
> org.apache.maven.surefire.testset.PojoTestSet.<init>(PojoTestSet.java:55)
> at
> org.apache.maven.surefire.junit.JUnitDirectoryTestSuite.createTestSet(JUnitDirectoryTestSuite.java:64)
> at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:96)
> at
> org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:150)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:111)
> 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.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
> at
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
> ava:818)
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira