Skip to content

[#1823] fix(test): Fix flaky ShuffleBufferManagerTest.shuffleFlushThreshold#2773

Open
wForget wants to merge 1 commit into
apache:masterfrom
wForget:UNIFFLE-1823
Open

[#1823] fix(test): Fix flaky ShuffleBufferManagerTest.shuffleFlushThreshold#2773
wForget wants to merge 1 commit into
apache:masterfrom
wForget:UNIFFLE-1823

Conversation

@wForget

@wForget wForget commented Jul 23, 2026

Copy link
Copy Markdown
Member

What changes were proposed?

Replace transient memory assertions and fixed sleeps in ShuffleBufferManagerTest.shuffleFlushThreshold with Awaitility-based assertions that wait for stable usedMemory and inFlushSize values.

closes #1823

Why are the changes needed?

The asynchronous flush may complete before the test checks the intermediate memory usage, causing failures such as:

expected: <159> but was: <63>

The previous assertions depended on thread scheduling, while fixed sleeps could not guarantee that flush cleanup had completed.

How was this patch tested?

Existing test.


Generated by Codex (GPT-5.6)

@wForget wForget changed the title Fix flaky ShuffleBufferManagerTest.shuffleFlushThreshold [#1823] fix(test): Fix flaky ShuffleBufferManagerTest.shuffleFlushThreshold Jul 23, 2026
shuffleBufferManager.cacheShuffleData(appId, shuffleId, false, createData(0, 64));
assertEquals(96, shuffleBufferManager.getUsedMemory());
shuffleBufferManager.cacheShuffleData(appId, smallShuffleId, false, createData(0, 31));
assertEquals(96 + 63, shuffleBufferManager.getUsedMemory());

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flush might have already been completed before this assertion.

@github-actions

Copy link
Copy Markdown

Test Results

 3 617 files  ±0   3 617 suites  ±0   7h 44m 39s ⏱️ + 2m 8s
 1 265 tests ±0   1 254 ✅ +1  11 💤 ±0  0 ❌  - 1 
18 055 runs  ±0  18 018 ✅ +1  37 💤 ±0  0 ❌  - 1 

Results for commit 0b2882a. ± Comparison against base commit 20167ff.

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] Flaky test for ShuffleBufferManagerTest

1 participant