Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Make a test that depends on the user.dir system property (the current working directory), and put in a multimodule reactor.
When you launch the tests from the reactor, user.dir will be the reactor aggregator root. When you launch the tests from the individual module, user.dir will be the child's root.
Brett and I had a conversation about this on IRC. Ideally, we want user.dir to have the same default regardless of whether you're running in a reactor or not, and whether you're forking or not. We might wish that were the behavior of 2.3, but if not, we'll have to change the behavior to make the tests behave more logically.
To solve this, we're going to set user.dir to be ${basedir} when forking; when not forking we'll temporarily change the global system properties, and finally change them back. (This should be part of a more general test of systemProperties when not forking.)