Repository navigation
Port the OpenFeature smoke tests to JUnit - #13106
Closed
PerfectSlayer wants to merge 2 commits into
Closed
PerfectSlayer wants to merge 2 commits into
PerfectSlayer wants to merge 2 commits into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/infoadvertises 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, withwaitForRequest.MockAgentBackend: captures/evp_proxy/v2/requests, clears them between tests, advertises/evp_proxy/v2/andevp_proxy_allowed_headersin/info.AgentBackend.mockAgent()returns theMockAgentBackendtype, 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 byRemoteConfig.waitForRequestandEvpProxy.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@Orderinstead of@Stepwise.OpenFeatureProviderSmokeTest: captures the tracer first Remote Configuration poll in@BeforeAll, before the per-test backend reset, to keep checking it asks forFFE_FLAGS.OpenFeatureAgentlessSmokeTest,OpenFeatureStandaloneSmokeTest,OpenFeatureMalformedRemoteConfigSmokeTest: same scenarios as before.AbstractOpenFeatureShutdownSmokeTestand its two variants: useterminate()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.
Jira ticket: APMLP-1512
🤖 Generated with Claude Code