Skip to content

Flaky test fixes#629

Merged
zeroshade merged 4 commits intoapache:mainfrom
zeroshade:flaky-test-fixes
Jan 14, 2026
Merged

Flaky test fixes#629
zeroshade merged 4 commits intoapache:mainfrom
zeroshade:flaky-test-fixes

Conversation

@zeroshade
Copy link
Copy Markdown
Member

Rationale for this change

Fixes for flaky FlightSQL tests that should hopefully reduce the CI failures

What changes are included in this PR?

Using grpc.Trailer for all the RPC calls in some of the test cases where we missed them should hopefully fix the race conditions that were being seen.

Are these changes tested?

Yes, they are part of tests in CI

Are there any user-facing changes?

No

Adds grpc.Trailer parameters to TestGetSetGetSessionOptions and
TestSetRemoveSessionOptions to ensure session cookies are fully
processed before subsequent operations.

This fixes race conditions where GetSessionOptions would execute
before SetSessionOptions trailers were processed, causing the
test to read stale session state.

Fixes macOS CI failures in PR apache#626.
Adds a 50ms delay after sending cookie deletion to allow client
middleware time to process the MaxAge=-1 cookie before the next
request validates that cookies are empty.

This fixes a race condition where the validation request would
start before cookie deletion completed, causing test to fail with
'expected map[], got map[foo:baz]' on Windows CI.

Fixes Windows CI failure in PR apache#626.
…estStatelessServerSessionCookies

- TestCookiesClone: Add 50ms delay after setting cookies before validation
  to allow client middleware time to process Set-Cookie headers
- TestStatelessServerSessionCookies: Reinitialize trailer metadata before
  each RPC call to avoid stale metadata issues

These fixes address race conditions where:
1. Cookie middleware's HeadersReceived processes headers asynchronously
2. gRPC trailer metadata can contain stale values if reused across calls

Fixes ARM64 and macOS CI failures in PR apache#629.
@zeroshade zeroshade merged commit 513f1ce into apache:main Jan 14, 2026
23 checks passed
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