Skip to content

test(integration): harden network block wait in health check tests#2369

Open
rafaelwestphal wants to merge 1 commit into
masterfrom
westphalrafael/fix-network-health-check-flake-master
Open

test(integration): harden network block wait in health check tests#2369
rafaelwestphal wants to merge 1 commit into
masterfrom
westphalrafael/fix-network-health-check-flake-master

Conversation

@rafaelwestphal

@rafaelwestphal rafaelwestphal commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Description

TestNetworkHealthCheck occasionally flakes (reporting false passes on blocked endpoints) because the deny-egress firewall rule propagation is eventually consistent.

The existing waitForNetworkBlock helper only polled a single telemetry endpoint (telemetry.googleapis.com) to determine if the block was active. However, because GCP firewall rules propagate to different IP ranges at slightly different times, other endpoints (like package repositories or download servers) could still be reachable when the health check started, causing the test to fail its assertions.

Solution
Hardened waitForNetworkBlock to poll all three critical endpoints that are verified by the health checks:

telemetry.googleapis.com (Telemetry API)
dl.google.com (Download/DL API)
packages.cloud.google.com (Packages API)
The helper now waits until all three endpoints are completely unreachable (all connections fail) before allowing the test to proceed. If any endpoint is still reachable, it continues polling, ensuring the firewall block has fully propagated across all relevant ranges.

Related issue

How has this been tested?

Checklist:

  • Unit tests
    • Unit tests do not apply.
    • Unit tests have been added/modified and passed for this PR.
  • Integration tests
    • [] Integration tests do not apply.
    • Integration tests have been added/modified and passed for this PR.
  • Documentation
    • This PR introduces no user visible changes.
    • This PR introduces user visible changes and the corresponding documentation change has been made.
  • Minor version bump
    • This PR introduces no new features.
    • This PR introduces new features, and there is a separate PR to bump the minor version since the last release already.
    • This PR bumps the version.

@rafaelwestphal rafaelwestphal marked this pull request as ready for review June 26, 2026 20:44
@rafaelwestphal rafaelwestphal changed the title test(integration): harden network block wait to check multiple endpoints test(integration): harden network block wait in health check tests Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant