Skip to content

Migrate dynamic config smoke tests to JUnit - #12148

Open
PerfectSlayer wants to merge 1 commit into
bbujon/smoke-tests-spring-boot-rabbitfrom
bbujon/smoke-tests-dynamic-config
Open

Migrate dynamic config smoke tests to JUnit#12148
PerfectSlayer wants to merge 1 commit into
bbujon/smoke-tests-spring-boot-rabbitfrom
bbujon/smoke-tests-dynamic-config

Conversation

@PerfectSlayer

@PerfectSlayer PerfectSlayer commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

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

Jira ticket: APMLP-1247

@PerfectSlayer
PerfectSlayer requested a review from a team as a code owner August 5, 2026 15:57
@PerfectSlayer
PerfectSlayer requested a review from ygree August 5, 2026 15:57
@PerfectSlayer PerfectSlayer added type: feature Enhancements and improvements tag: no release notes Changes to exclude from release notes comp: remote config Configuration at Runtime labels Aug 5, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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")))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@datadog-official

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.11 s 13.86 s [+0.8%; +2.7%] (maybe worse)
startup:insecure-bank:tracing:Agent 12.89 s 13.00 s [-1.5%; -0.2%] (maybe better)
startup:petclinic:appsec:Agent 16.94 s 16.87 s [-0.5%; +1.4%] (no difference)
startup:petclinic:iast:Agent 16.89 s 16.93 s [-1.0%; +0.6%] (no difference)
startup:petclinic:profiling:Agent 16.87 s 16.90 s [-1.4%; +1.0%] (no difference)
startup:petclinic:sca:Agent 16.71 s 16.54 s [+0.2%; +1.8%] (maybe worse)
startup:petclinic:tracing:Agent 16.15 s 16.16 s [-0.8%; +0.6%] (no difference)

Commit: eaee9383 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@datadog-official datadog-official Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Datadog Autotest: PASS

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.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit eaee938 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: remote config Configuration at Runtime tag: no release notes Changes to exclude from release notes type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant