Skip to content

[improve][test] Fixed flakiness of SaslAuthenticateTest.testSaslOnlyAuthFirstStage#23

Open
storm-08 wants to merge 1 commit into
branch-4.0from
branch-4.0_sasl_test
Open

[improve][test] Fixed flakiness of SaslAuthenticateTest.testSaslOnlyAuthFirstStage#23
storm-08 wants to merge 1 commit into
branch-4.0from
branch-4.0_sasl_test

Conversation

@storm-08
Copy link
Copy Markdown
Collaborator

Fixes #xyz

Motivation

The test SaslAuthenticateTest.testSaslOnlyAuthFirstStage is flaky due to a strict assertion on cache size. When the loop inserting entries runs longer than the configured 50ms expiry, early entries may get evicted, causing the test to fail sometimes.

Modifications

  • SaslAuthenticateTest : Modified the assertion - now it asserts that sum of evicted entries and entries currently in cache equals to 10 i.e. it will also take in account of the expired entries.
  • AuthenticationProviderSasl : Enabled accumulation of stats from which count of evicted entries can be fetched

Verifying this change

  • Make sure that the change passes the CI checks.

This change is a trivial rework / code cleanup without any test coverage.

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

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants