@@ -57,24 +57,28 @@ class TracerFlareSmokeTest extends AbstractSmokeTest {
5757
5858 def command = [javaPath()]
5959
60- if (processIndex == 0 ) {
60+ switch (processIndex) {
61+ case 0 :
6162 // Process 0: Profiling enabled (default)
62- command. addAll(defaultJavaProperties)
63- } else if (processIndex == 1 ) {
63+ command. addAll(defaultJavaProperties)
64+ break
65+ case 1 :
6466 // Process 1: Profiling disabled
65- def filteredProperties = defaultJavaProperties. findAll { prop ->
66- ! prop. startsWith(" -Ddd.profiling." )
67- }
68- command. addAll(filteredProperties)
69- command. add(" -Ddd.profiling.enabled=false" )
70- } else {
67+ def filteredProperties = defaultJavaProperties. findAll { prop ->
68+ ! prop. startsWith(" -Ddd.profiling." )
69+ }
70+ command. addAll(filteredProperties)
71+ command. add(" -Ddd.profiling.enabled=false" )
72+ break
73+ case 2 :
7174 // Process 2: Profiling enabled with template override
72- command. addAll(defaultJavaProperties)
75+ command. addAll(defaultJavaProperties)
7376 // Create a temp file with the override content
74- def tempOverrideFile = File . createTempFile(" test-override-" , " .jfp" )
75- tempOverrideFile. deleteOnExit()
76- tempOverrideFile. text = " datadog.ExceptionSample#enabled=false" // Arbitrary event choice
77- command. add(" -Ddd.profiling.jfr-template-override-file=" + tempOverrideFile. absolutePath)
77+ def tempOverrideFile = File . createTempFile(" test-override-" , " .jfp" )
78+ tempOverrideFile. deleteOnExit()
79+ tempOverrideFile. text = " datadog.ExceptionSample#enabled=false" // Arbitrary event choice
80+ command. add(" -Ddd.profiling.jfr-template-override-file=" + tempOverrideFile. absolutePath)
81+ break
7882 }
7983
8084 // Configure flare generation
0 commit comments