Skip to content

Commit b314407

Browse files
Fixed review notes.
1 parent 6a8ed45 commit b314407

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

dd-smoke-tests/src/main/groovy/datadog/smoketest/ProcessManager.groovy

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package datadog.smoketest
22

3+
import com.google.common.collect.ImmutableSet
34
import datadog.trace.agent.test.utils.PortUtils
45
import java.nio.file.Files
56
import java.nio.file.Paths
@@ -15,6 +16,7 @@ abstract class ProcessManager extends Specification {
1516
public static final String SERVICE_NAME = "smoke-test-java-app"
1617
public static final String ENV = "smoketest"
1718
public static final String VERSION = "99"
19+
public static final Set<String> NOISY_ENVIRONMENT_VARIABLES = ImmutableSet.of('CI_COMMIT_MESSAGE')
1820

1921
@Shared
2022
protected String buildDirectory = System.getProperty("datadog.smoketest.builddir")
@@ -193,19 +195,12 @@ abstract class ProcessManager extends Specification {
193195
|| line.contains("Failed to handle exception in instrumentation")
194196
}
195197

196-
/**
197-
* @return Set of noisy variables to remove.
198-
*/
199-
protected Set<String> noisyEnvironmentVariables() {
200-
return ['CI_COMMIT_MESSAGE'] as Set
201-
}
202-
203198
/**
204199
* Some variable can be printed in smoke application logs and result into false-positive test result.
205200
* @param env environment variables to process.
206201
*/
207202
void muteNoisyEnvironmentVariables(Map<String, String> env) {
208-
noisyEnvironmentVariables().each { String envVar -> env.remove(envVar) }
203+
env.keySet().removeAll(NOISY_ENVIRONMENT_VARIABLES)
209204
}
210205

211206
/**

0 commit comments

Comments
 (0)