tests(appsec): wait for sidecar telemetry ready before TelemetryTests#3816
Draft
tests(appsec): wait for sidecar telemetry ready before TelemetryTests#3816
Conversation
…tryTests Add a startup health-check in @BeforeAll that uses waitForMetrics() to wait for waf.init telemetry (up to 60s) before releasing any test. This eliminates the race between a slow helper/sidecar startup and the first test's polling window, which was causing all 9 ordered tests to time out in sequence. Also increase the @order(1) test's waitForMetrics timeout from 30s to 60s, since @BeforeAll may consume the first waf.init batch (10s metric interval) and the test needs headroom to catch the next emission cycle.
|
✨ Fix all issues with BitsAI or with Cursor
|
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.
Problem
TelemetryTestsshare a single Docker container across 9 ordered tests. The@BeforeAllrestarts php-fpm, but if the helper-rust sidecar startup is slow, the first test's 30s polling window expires beforewaf.inittelemetry arrives. All 9 tests then fail in sequence (30s apart, perfectly timed out).Fix
Add a startup health-check in
@BeforeAllthat waits forwaf.inittelemetry before releasing the first test, and increase the first test's timeout to 60s (it bears the full startup cost). This removes the race between sidecar startup and the first test's poll window.