Skip to content

Fix issues with the Bump Allocator & Logging tests for Windows CI#59

Merged
JoltedJon merged 1 commit into
Redot-Engine:masterfrom
Shakai-Dev:bumpallocator-logging-test-issue-fix
Jul 19, 2026
Merged

Fix issues with the Bump Allocator & Logging tests for Windows CI#59
JoltedJon merged 1 commit into
Redot-Engine:masterfrom
Shakai-Dev:bumpallocator-logging-test-issue-fix

Conversation

@Shakai-Dev

@Shakai-Dev Shakai-Dev commented Jul 19, 2026

Copy link
Copy Markdown
Member
  • Fixes issues with the Bump Allocator & Logging tests for Windows CI.
  • For the Bump Allocator test, we needed to update the test to check if a second page was allocated or if the first page simply had enough capacity to satisfy both requirements due to OS rounding.
  • For the Logging test, we needed to ensure that shutdown() is called inside a cleanup block so that it runs even if an exception is thrown. Furthermore, we need to call shutdown() before attempting to delete the log file to guarantee that the background thread has completely dropped its file handles.

Summary by CodeRabbit

  • Tests
    • Improved logging test reliability by ensuring pending file output is finalized before validation.
    • Updated memory allocator coverage to support valid allocation behavior across different page-sizing outcomes.

* Fixes issues with the Bump Allocator & Logging tests for Windows CI.
* For the Bump Allocator test, we needed to update the test to check if a second page was allocated or if the first page simply had enough capacity to satisfy both requirements due to OS rounding.
* For the Logging test, we needed to ensure that `shutdown()` is called inside a cleanup block so that it runs even if an exception is thrown. Furthermore, we need to call `shutdown()` before attempting to delete the log file to guarantee that the background thread has completely dropped its file handles.
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: abdaa84f-e08c-4b91-afcd-fc8d1feef274

📥 Commits

Reviewing files that changed from the base of the PR and between 53097f5 and f6fc480.

📒 Files selected for processing (2)
  • Engine/cpp/Runtime/Core/Logging/Logging.test.cpp
  • Engine/cpp/Runtime/Core/Memory/BumpAllocator.test.cpp

📝 Walkthrough

Walkthrough

The changes update two tests: logging now shuts down before file validation, and the bump allocator test accepts either a new page or sufficient first-page growth for the second allocation.

Changes

Logging test lifecycle

Layer / File(s) Summary
File sink shutdown ordering
Engine/cpp/Runtime/Core/Logging/Logging.test.cpp
The test calls shutdown() after removing the file sink and before validating the output file.

Allocator test portability

Layer / File(s) Summary
Bump allocator allocation assertion
Engine/cpp/Runtime/Core/Memory/BumpAllocator.test.cpp
The test accepts either allocation of a second page or growth of the first page to at least 16384 bytes.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the two Windows CI test fixes in Bump Allocator and Logging.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Shakai-Dev Shakai-Dev mentioned this pull request Jul 19, 2026

@OldDev78 OldDev78 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.

Good. I would even consider adding actual destructors to prevent this kind of mistakes in the future.
Enough of this irrational prejudice for "implicit behavior".

Having control is not the same as requiring boilerplate everywhere.

@JoltedJon
JoltedJon merged commit 5209d1f into Redot-Engine:master Jul 19, 2026
2 checks passed
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