dropwizard/dropwizard — pull request #674 by stuartgunter (2014-08-06 09:53:11+00:00)
Title: `DropwizardAppRule` more strict in resetting config overrides

Prior to this change, `DropwizardAppRule` would clear *ALL* system properties that start with `dw.`, regardless of whether they were defined as `ConfigOverride` values in the test. This caused problems with tests that relied on a combination of command-line overrides (that should not be reset) and test-specific overrides (that should be reset).

An example of where this might be useful is dynamic port allocation, where the build system (Maven, Jenkins, etc.) dynamically allocates port numbers to the app and provides these via command-line overrides (e.g. `-Ddw.cassandra.port=${SOME_DYNAMIC_PORT}`). These values should be retained (otherwise subsequent tests fail), but the configuration that was explicitly overridden using `ConfigOverride` in the test should be reset.

Note that this does _not_ revert the original value of the system property if you override an already-overridden property.