Skip to content

Commit

Permalink
Move tear down test code to beginning of Environment
Browse files Browse the repository at this point in the history
  • Loading branch information
kanderson250 committed Oct 29, 2024
1 parent 79bd9fe commit a0e9161
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@

public class EnvironmentTest {

@After
public void clearObfuscateJvmPropsSettings() {
System.clearProperty("newrelic.config.obfuscate_jvm_props.enabled");
System.clearProperty("newrelic.config.obfuscate_jvm_props.allow");
System.clearProperty("newrelic.config.obfuscate_jvm_props.block");
}

@Test
public void overrideServerPort() throws Exception {
System.setProperty("newrelic.config.appserver_port", "666");
Expand Down Expand Up @@ -249,11 +256,4 @@ private List<String> getObfuscatedProps(List<String> props) {
Environment env = new Environment(config, "c:\\test\\log");
return env.obfuscateProps(props, config.getObfuscateJvmPropsConfig());
}

@After
public void clearObfuscateJvmPropsSettings() {
System.clearProperty("newrelic.config.obfuscate_jvm_props.enabled");
System.clearProperty("newrelic.config.obfuscate_jvm_props.allow");
System.clearProperty("newrelic.config.obfuscate_jvm_props.block");
}
}

0 comments on commit a0e9161

Please sign in to comment.