Skip to content

History test fixes - #5168

Merged
marta-lokhova merged 1 commit into
stellar:masterfrom
marta-lokhova:historyTestFix
Mar 9, 2026
Merged

marta-lokhova merged 1 commit into
stellar:masterfrom
marta-lokhova:historyTestFix

Conversation

@marta-lokhova

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 9, 2026 18:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the cumulative in-memory mPublishQueued atomic counter and the associated virtual getPublishQueueCount() method from HistoryManager/HistoryManagerImpl, replacing all call sites with the static HistoryManager::publishQueueLength(Config const&) method that measures the publish queue length directly from the filesystem.

Changes:

  • Removes the mPublishQueued atomic field and the virtual getPublishQueueCount() method from HistoryManagerImpl and its base HistoryManager interface.
  • Updates all call sites in tests (HistoryTests.cpp, HistoryTestsUtils.cpp, BucketManagerTests.cpp) to use the static publishQueueLength().
  • Moves the doc comment that was on the old virtual method to the static publishQueueLength() declaration.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/history/HistoryManager.h Removes getPublishQueueCount() pure virtual declaration; comment for publishQueueLength() updated (moved from the removed method).
src/history/HistoryManagerImpl.h Removes mPublishQueued atomic field and getPublishQueueCount() override declaration.
src/history/HistoryManagerImpl.cpp Removes mPublishQueued++ increment and the getPublishQueueCount() implementation.
src/history/test/HistoryTests.cpp Replaces getPublishQueueCount() with publishQueueLength(cfg) in two polling loops.
src/history/test/HistoryTestsUtils.cpp Replaces getPublishQueueCount() with publishQueueLength() in a test REQUIRE assertion.
src/bucket/test/BucketManagerTests.cpp Replaces getPublishQueueCount() with publishQueueLength(cfg) in a polling loop.

Comment thread src/history/test/HistoryTestsUtils.cpp Resolved
Comment thread src/history/HistoryManager.h Resolved
@marta-lokhova
marta-lokhova force-pushed the historyTestFix branch 2 times, most recently from 979ab32 to 25ef6f5 Compare March 9, 2026 21:24

@dmkozh dmkozh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please revert the XDR submodule change

@marta-lokhova
marta-lokhova enabled auto-merge March 9, 2026 21:32
@marta-lokhova
marta-lokhova added this pull request to the merge queue Mar 9, 2026
Merged via the queue into stellar:master with commit 1bedb04 Mar 9, 2026
48 of 51 checks passed
@marta-lokhova
marta-lokhova deleted the historyTestFix branch March 9, 2026 23:31
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.

3 participants