Migrate dynamic config smoke tests to JUnit - #12148
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eaee938397
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| @Test | ||
| void activatesAppSecViaRemoteConfig() { | ||
| assumeFalse(isOracleJDK8(), "Telemetry product-change event flakes on Oracle JDK 8"); |
There was a problem hiding this comment.
Preserve the flaky tag for the Oracle JDK 8 skip
When this suite runs on Oracle JDK 8, replacing the old @Flaky marker with an in-method assumption leaves the migrated flaky case invisible to Gradle's JUnit tag filtering (-PskipFlakyTests/-PrunFlakyTests); those filters select by the flaky tag at discovery, while this assumption is reached only after the static SmokeCliApp extension has already started the backend and app. Keep this skip in the flaky-test tagging path rather than only aborting inside the test body.
AGENTS.md reference: AGENTS.md:L65-L65
Useful? React with 👍 / 👎.
| if (entry instanceof Map) { | ||
| Map<String, Object> config = (Map<String, Object>) entry; | ||
| if ("DD_APPSEC_ENABLED".equals(config.get("name")) | ||
| && "true".equals(String.valueOf(config.get("value"))) |
There was a problem hiding this comment.
Keep the telemetry value assertion exact
If the telemetry payload regresses to encode DD_APPSEC_ENABLED as boolean true instead of the expected string "true", this migrated check still passes because String.valueOf(...) coerces the value; the Spock assertion compared the field directly to 'true'. Since this smoke test is validating the telemetry payload shape as well as behavior, keep the value comparison type-exact so schema regressions are caught.
Useful? React with 👍 / 👎.
| "datadog/2/ASM_FEATURES/asm_features_activation/config", "{\"asm\":{\"enabled\":true}}"); | ||
|
|
||
| // The tracer reports the applied change via a telemetry configuration event. | ||
| agent.telemetry().waitForFlat(AppSecActivationSmokeTest::appsecEnabledFromRemoteConfig); |
There was a problem hiding this comment.
Restore the longer AppSec telemetry wait
On slower smoke-test jobs where the AppSec config-change telemetry arrives more than 10 seconds after the RC payload is pushed but still within the app's 15-second lifetime, this assertion can now time out early because Telemetry.waitForFlat(...) uses a 10-second default; the migrated Spock helper used the suite's 30-second polling timeout. Use the overload with the previous timeout, or otherwise align the wait with the app lifetime, to avoid introducing CI-only false negatives.
Useful? React with 👍 / 👎.
This comment has been minimized.
This comment has been minimized.
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
There was a problem hiding this comment.
More details
The JUnit migration preserves the prior RC assertions and compiles cleanly; shared smoke/backend tests also pass. The two changed smoke tests could not execute their child JVMs here because Docker is unavailable for TestAgentBackend, so end-to-end app behavior remains to be confirmed in CI.
🤖 Datadog Autotest · Commit eaee938 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
What Does This Do
This PR migrates the Spring Boot RabbitMQ smoke tests to the new JUnit smoke test framework.
Motivation
The new tests checks the RC messages (payload and behavior) against the CI test agent, and no longer our own implementation, to avoid validating our implementation by ourselves.
Additional Notes
The CI test agent runs as side car in CI. It will be run using testcontainers on local environment.
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: APMLP-1247