Skip to content

[fix][test] Split and fix flaky SASL authentication first-stage auth cache tests#49

Open
oneby-wang wants to merge 3 commits into
masterfrom
fix-sasl-only-auth-first-stage-flaky
Open

[fix][test] Split and fix flaky SASL authentication first-stage auth cache tests#49
oneby-wang wants to merge 3 commits into
masterfrom
fix-sasl-only-auth-first-stage-flaky

Conversation

@oneby-wang

@oneby-wang oneby-wang commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Fixes apache#24337

Motivation

SaslAuthenticateTest.testSaslOnlyAuthFirstStage currently verifies two timing-sensitive behaviors in one test: that first-stage SASL authentication leaves inflight contexts in the cache, and that residual contexts are later expired. The exact cache-size assertion can become flaky when entries expire before the assertion is reached.

Modifications

Added two focused tests for the separate behaviors:

  • testSaslOnlyAuthFirstStageKeepsInflightContextsBeforeExpiry verifies that first-stage SASL authentication keeps inflight contexts when the expiry timeout is long enough.
  • testSaslOnlyAuthFirstStageExpiresResidualContexts verifies that residual first-stage contexts expire and are removed after cleanup.

Verifying this change

  • Make sure that the change passes the CI checks.

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

@oneby-wang oneby-wang changed the title [fix][test] Split SASL first-stage auth cache tests [fix][test] Split SASL authentication first-stage auth cache tests Jun 6, 2026
@oneby-wang oneby-wang marked this pull request as ready for review June 6, 2026 10:21
@oneby-wang oneby-wang changed the title [fix][test] Split SASL authentication first-stage auth cache tests [fix][test] Split and fix flaky SASL authentication first-stage auth cache tests Jun 6, 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.

Flaky-test: SaslAuthenticateTest.testSaslOnlyAuthFirstStage

1 participant