File tree Expand file tree Collapse file tree
dd-smoke-tests/src/main/groovy/datadog/smoketest Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package datadog.smoketest
22
3+ import com.google.common.collect.ImmutableSet
34import datadog.trace.agent.test.utils.PortUtils
45import java.nio.file.Files
56import 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 /**
You can’t perform that action at this time.
0 commit comments