Skip to content

Commit e455ca7

Browse files
Ensure IAST smoke tests wait for the product to be started (#8312)
1 parent 51fc9b9 commit e455ca7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

dd-smoke-tests/iast-util/src/testFixtures/groovy/datadog/smoketest/AbstractIastServerSmokeTest.groovy

+9
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import java.util.concurrent.TimeoutException
1818
abstract class AbstractIastServerSmokeTest extends AbstractServerSmokeTest {
1919

2020
private static final String TAG_NAME = '_dd.iast.json'
21+
private static final String IAST_STARTED_MSG = 'IAST started'
2122

2223
@Shared
2324
private final JsonSlurper jsonSlurper = new JsonSlurper()
@@ -32,6 +33,14 @@ abstract class AbstractIastServerSmokeTest extends AbstractServerSmokeTest {
3233
return {} // force traces decoding
3334
}
3435

36+
def setupSpec() {
37+
try {
38+
processTestLogLines { it.contains(IAST_STARTED_MSG) }
39+
} catch (TimeoutException toe) {
40+
throw new AssertionError("'$IAST_STARTED_MSG' not found in logs", toe)
41+
}
42+
}
43+
3544
protected static String withSystemProperty(final String config, final Object value) {
3645
return "-Ddd.${config}=${value}"
3746
}

0 commit comments

Comments
 (0)