Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Duplicate
-
2.0 (2.2 plugin)
-
None
-
None
-
None
Description
The following code is in SurefirePlugin.java:
processSystemProperties( !fork.isForking() ); if ( getLog().isDebugEnabled() ) { showMap( systemProperties, "system property" ); }
2 problems:
1) fork.isForking() is false when forking is enabled and thus system properties are not set:
protected void processSystemProperties( boolean setInSystem ) { [...] if ( setInSystem ) { // Add all system properties configured by the user Iterator iter = systemProperties.keySet().iterator(); while ( iter.hasNext() ) { String key = (String) iter.next(); String value = systemProperties.getProperty( key ); System.setProperty( key, value ); } } }
2) showMap() is called regardless of whether the system properties are set or not, leading to the following kind of misleading logs:
[...] [DEBUG] Setting system property [cargo.jetty4x.port]=[8280] [DEBUG] Setting system property [cargo.jetty6x.port]=[8280] [DEBUG] Setting system property [cargo.jetty5x.port]=[8280] [...]
Those properties are actually NOT set.
Attachments
Attachments
Issue Links
- duplicates
-
SUREFIRE-47 JUnit suite() method ends up being called twice when tests are run with Surefire
- Closed