Skip to content

Conversation

@3pacccccc
Copy link
Contributor

Fixes #24608

motivation

this test was flaky due to
line108 in EntryCacheManagerTest.java of current master branch
already triggered cache eviction, so sometimes the eviction is over, sometimes not, cause this flaky.

Modifications

  1. Removed one entry insertion (EntryImpl.create(2, 2, new byte[1]) to:
    • Ensure predictable cache eviction timing
    • Maintain test's original purpose of verifying eviction logic
  2. Updated all affected assertions to match the new expected cache sizes:
    • Reduced expected sizes by 1 across all assertions
    • Maintained consistent state validation throughout test flow

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

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

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

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: 3pacccccc#21

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Aug 5, 2025
@lhotari lhotari added this to the 4.1.0 milestone Aug 6, 2025
@Technoboy- Technoboy- changed the title [fix][test] fix flaky EntryCacheManagerTest.simple [fix][test] Fix flaky EntryCacheManagerTest.simple Aug 7, 2025
@Technoboy- Technoboy- merged commit 7ab68b1 into apache:master Aug 7, 2025
98 of 100 checks passed
@3pacccccc 3pacccccc deleted the fixEntryCacheTest branch August 7, 2025 11:14
gaozhangmin pushed a commit to gaozhangmin/pulsar that referenced this pull request Aug 13, 2025
poorbarcode pushed a commit to poorbarcode/pulsar that referenced this pull request Aug 14, 2025
KannarFr pushed a commit to CleverCloud/pulsar that referenced this pull request Sep 22, 2025
walkinggo pushed a commit to walkinggo/pulsar that referenced this pull request Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs type/flaky-tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky-test: EntryCacheManagerTest.simple

3 participants