You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Daniel Lindner (JIRA)" <ji...@codehaus.org> on 2007/03/20 09:36:35 UTC
[jira] Created: (SUREFIRE-309) Disabling POJO tests - Problem with
parametrized constructors
Disabling POJO tests - Problem with parametrized constructors
-------------------------------------------------------------
Key: SUREFIRE-309
URL: http://jira.codehaus.org/browse/SUREFIRE-309
Project: Maven Surefire
Issue Type: Wish
Components: classloading
Affects Versions: 2.3
Reporter: Daniel Lindner
If you include a class that matches the test class pattern but is a regular class (e.g. a helper or mock implementation of a production type) to the test directories, the surefire plugin attempts to run POJO-tests on it. This fails if there is no non-argument default constructor. The failure breaks the test cycle.
There are three ways to resolve the effect:
- Move the POJO class away or rename it. Both is only needed because surefire lacks support
- Adjust the test class pattern. This is probably possible.
- Make surefire aware of the problem. Either make it configurable or do not attempt to POJO-test classes without default constructor. At least, do not fail the tests if this situation occurs.
The third way of handling the issue is my suggestion. I would prefer the solution "by convention" that POJO tests need a default constructor and other classes will be ignored.
To recreate the problem, add a class named TestThisPOJONot to your test classes and give it a constructor with parameters.
--
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
[jira] Closed: (SUREFIRE-309) Disabling POJO tests - Problem with
parametrized constructors
Posted by "Dan Fabulich (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Fabulich closed SUREFIRE-309.
---------------------------------
Resolution: Duplicate
Fix Version/s: (was: 2.4)
duplicate of SUREFIRE-346
> Disabling POJO tests - Problem with parametrized constructors
> -------------------------------------------------------------
>
> Key: SUREFIRE-309
> URL: http://jira.codehaus.org/browse/SUREFIRE-309
> Project: Maven Surefire
> Issue Type: Wish
> Components: classloading
> Affects Versions: 2.3
> Reporter: Daniel Lindner
>
> If you include a class that matches the test class pattern but is a regular class (e.g. a helper or mock implementation of a production type) to the test directories, the surefire plugin attempts to run POJO-tests on it. This fails if there is no non-argument default constructor. The failure breaks the test cycle.
> There are three ways to resolve the effect:
> - Move the POJO class away or rename it. Both is only needed because surefire lacks support
> - Adjust the test class pattern. This is probably possible.
> - Make surefire aware of the problem. Either make it configurable or do not attempt to POJO-test classes without default constructor. At least, do not fail the tests if this situation occurs.
> The third way of handling the issue is my suggestion. I would prefer the solution "by convention" that POJO tests need a default constructor and other classes will be ignored.
> To recreate the problem, add a class named TestThisPOJONot to your test classes and give it a constructor with parameters.
--
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
[jira] Updated: (SUREFIRE-309) Disabling POJO tests - Problem with
parametrized constructors
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter updated SUREFIRE-309:
----------------------------------
Fix Version/s: 2.4
> Disabling POJO tests - Problem with parametrized constructors
> -------------------------------------------------------------
>
> Key: SUREFIRE-309
> URL: http://jira.codehaus.org/browse/SUREFIRE-309
> Project: Maven Surefire
> Issue Type: Wish
> Components: classloading
> Affects Versions: 2.3
> Reporter: Daniel Lindner
> Fix For: 2.4
>
>
> If you include a class that matches the test class pattern but is a regular class (e.g. a helper or mock implementation of a production type) to the test directories, the surefire plugin attempts to run POJO-tests on it. This fails if there is no non-argument default constructor. The failure breaks the test cycle.
> There are three ways to resolve the effect:
> - Move the POJO class away or rename it. Both is only needed because surefire lacks support
> - Adjust the test class pattern. This is probably possible.
> - Make surefire aware of the problem. Either make it configurable or do not attempt to POJO-test classes without default constructor. At least, do not fail the tests if this situation occurs.
> The third way of handling the issue is my suggestion. I would prefer the solution "by convention" that POJO tests need a default constructor and other classes will be ignored.
> To recreate the problem, add a class named TestThisPOJONot to your test classes and give it a constructor with parameters.
--
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