Skip to content

test(proxy): fix flaky TestShadow timing and counter assertions - #4327

Merged
a4180p merged 1 commit into
zalando:masterfrom
shardool-patil:fix/flaky-testshadow
Oct 8, 2026
Merged

a4180p merged 1 commit into
zalando:masterfrom
shardool-patil:fix/flaky-testshadow

Conversation

@shardool-patil

Copy link
Copy Markdown
Contributor

Summary

Fixes non-deterministic failures in TestShadow caused by rigid timing thresholds & Vegeta request count variance under CI load

Changes

  1. FIFO Shedding Assertions: Replaced the rigid statusFifoFull < 2 check with cumulative capacity validation (statusFifoFull + statusFifoTimeout >= 10 and statusFifoTimeout >= 1) to account for sub-millisecond inter-arrival timer drift and wait timeouts under heavy CPU load
  2. Request Count Tolerance: Decoupled success validation from strict nominal target equality ($N = 100$), comparing statusOK and counterMain against completed requests (reqCount with a tolerance bound of reqCount >= N-5) to prevent false-positive failures due to attack timer truncation

Related Issues

Signed-off-by: Shardool Patil <shardoolpatil999@gmail.com>
@szuecs szuecs added bugfix Bug fixes and patches test Missing test case labels Oct 8, 2026
@szuecs

szuecs commented Oct 8, 2026

Copy link
Copy Markdown
Member

👍

1 similar comment
@a4180p

a4180p commented Oct 8, 2026

Copy link
Copy Markdown
Member

👍

@a4180p
a4180p merged commit fb02285 into zalando:master Oct 8, 2026
19 checks passed
@shardool-patil
shardool-patil deleted the fix/flaky-testshadow branch October 8, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Bug fixes and patches test Missing test case

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky TestShadow

3 participants