Skip to content

Port the OpenFeature smoke tests to JUnit - #13106

Closed
PerfectSlayer wants to merge 2 commits into
bbujon/ffe-extrasfrom
bbujon/ffe-smoke-junit
Closed

PerfectSlayer wants to merge 2 commits into
bbujon/ffe-extrasfrom
bbujon/ffe-smoke-junit

Conversation

@PerfectSlayer

@PerfectSlayer PerfectSlayer commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

What Does This Do

Ports the OpenFeature smoke tests from Groovy/Spock to the JUnit 5 smoke test framework, and adds the two framework features they need:

  • MockAgentBackend.evpProxy() captures the requests the tracer sends through the event platform proxy, and the mock agent /info advertises the proxy and its allowed headers, like the Groovy smoke base.
  • SmokeServerApp.terminate(timeout, unit) stops the app with a termination signal, so a test can assert what it flushes at exit.

The tests run against the in-process mock agent: the dd-apm-test-agent (pinned v1.64.1, and current master) neither proxies the flag evaluation events nor advertises the event platform proxy headers. The scenarios and assertions are unchanged.

Smoke test framework (dd-smoke-tests)
  • EvpProxy: query facade over the captured proxy requests (path, headers, body), filtered by intake path, with waitForRequest.
  • MockAgentBackend: captures /evp_proxy/v2/ requests, clears them between tests, advertises /evp_proxy/v2/ and evp_proxy_allowed_headers in /info.
  • AgentBackend.mockAgent() returns the MockAgentBackend type, to reach its specific surfaces.
  • SmokeServerApp.terminate(): completes the test scope diagnostics, sends the termination signal without closing the app output streams (Java 9+), so its shutdown logs stay captured, and waits for the exit. The per-test liveness check accepts a terminated app; a later test fails with an explicit message.
  • Polling.waitForFirst: shared by RemoteConfig.waitForRequest and EvpProxy.waitForRequest.
  • AbstractSmokeTest.groovy: removes the Remote Config poll capture the deleted Groovy tests were the last users of.
  • docs/how_to_smoke_test.md: documents both features.
OpenFeature smoke tests (dd-smoke-tests/openfeature)
  • AbstractOpenFeatureSmokeTest: exposures first (exposure cache), then one parameterized test per system tests evaluation case, ordered with @Order instead of @Stepwise.
  • OpenFeatureProviderSmokeTest: captures the tracer first Remote Configuration poll in @BeforeAll, before the per-test backend reset, to keep checking it asks for FFE_FLAGS.
  • OpenFeatureAgentlessSmokeTest, OpenFeatureStandaloneSmokeTest, OpenFeatureMalformedRemoteConfigSmokeTest: same scenarios as before.
  • AbstractOpenFeatureShutdownSmokeTest and its two variants: use terminate() instead of destroying the process.
  • OpenFeatureFixtures: the flag configuration, the CDN fixture, the evaluation cases and the app builder.
  • Json: keeps numbers as written, as the evaluation cases tell integers from decimals, which the application maps to different types.

Motivation

Moves the OpenFeature smoke tests to the Java smoke test framework (APMLP-1512).

Stack

The full change is in #12709. It was split into this stack to ease the review.

  1. Resolve Feature Flags enablement from instrumenter config #12845 (merged)
  2. Add dd-openfeature SDK flag configuration and evaluation core #12840 (merged)
  3. Add dd-openfeature SDK settings and configuration delivery #12841 (merged)
  4. Add dd-openfeature SDK exposure and flag evaluation pipelines #12842 (merged)
  5. Add dd-openfeature SDK OpenFeature provider #12843 (merged)
  6. Port master Feature Flags changes to the dd-openfeature SDK #12957 (merged)
  7. Add the agent bridge for the dd-openfeature SDK #12975 (merged)
  8. Connect the dd-openfeature SDK to the agent #12844 (merged)
  9. Keep released dd-openfeature SDKs working with the agent #12976 (merged)
  10. Resolve the Feature Flags settings like the SDK #12977 (merged)
  11. Restore the agent Feature Flags behaviors through the bridge #12978
  12. Add agentless and standalone OpenFeature smoke tests #12846
  13. Port the OpenFeature smoke tests to JUnit #13106 👈 this PR

Jira ticket: APMLP-1512

🤖 Generated with Claude Code

PerfectSlayer and others added 2 commits October 28, 2026 13:40
…er apps

The mock agent captures the requests sent through the event platform proxy and advertises it like the Groovy smoke base, and SmokeServerApp.terminate() stops the app with a termination signal so tests can assert what it does at exit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tests run on the Java smoke test framework, with the in-process mock agent: the test agent neither proxies the flag evaluation events nor advertises the event platform proxy headers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PerfectSlayer PerfectSlayer added comp: testing Testing tag: no release notes Changes to exclude from release notes type: refactoring tag: ai generated Largely based on code generated by an AI or LLM comp: openfeature OpenFeature labels Oct 28, 2026
@PerfectSlayer
PerfectSlayer deleted the bbujon/ffe-smoke-junit branch October 28, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: openfeature OpenFeature comp: testing Testing tag: ai generated Largely based on code generated by an AI or LLM tag: no release notes Changes to exclude from release notes type: refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant