Skip to content

Commit

Permalink
Ensure IAST smoke tests wait for the product to be started
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-alvarez-alvarez committed Jan 30, 2025
1 parent a6b67c3 commit 731bf94
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import java.util.concurrent.TimeoutException
abstract class AbstractIastServerSmokeTest extends AbstractServerSmokeTest {

private static final String TAG_NAME = '_dd.iast.json'
private static final String IAST_STARTED_MSG = 'IAST started'

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

def setupSpec() {
try {
processTestLogLines { it.contains(IAST_STARTED_MSG) }
} catch (TimeoutException toe) {
throw new AssertionError("'$IAST_STARTED_MSG' not found in logs", toe)
}
}

protected static String withSystemProperty(final String config, final Object value) {
return "-Ddd.${config}=${value}"
}
Expand Down

0 comments on commit 731bf94

Please sign in to comment.