Add regression tests for arbitrum classic database#4465
Open
joshuacolvin0 wants to merge 6 commits intomasterfrom
Open
Add regression tests for arbitrum classic database#4465joshuacolvin0 wants to merge 6 commits intomasterfrom
joshuacolvin0 wants to merge 6 commits intomasterfrom
Conversation
Extract OpenClassicOutboxFromStack from CreateExecutionNode so the classic-msg database open logic is independently testable. Fix GetMsg bounds check from `merkleSize < index` to `merkleSize <= index` so one-past-the-end indices get a clear error instead of falling through to merkle traversal. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add unit tests for ClassicOutboxRetriever covering merkle tree traversal, boundary indices, error paths, and the NoFreezer database reopen flow. Add system tests verifying OpenClassicOutboxFromStack with a real on-disk database and graceful handling of missing databases. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
❌ 6 Tests Failed:
View the top 3 failed tests by shortest run time
📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #4465 +/- ##
==========================================
+ Coverage 32.72% 32.79% +0.06%
==========================================
Files 493 494 +1
Lines 58290 58327 +37
==========================================
+ Hits 19076 19128 +52
+ Misses 35868 35867 -1
+ Partials 3346 3332 -14 |
Extract shared BuildClassicMerkleTree and WriteClassicBatchHeader into classicMessage_testhelpers.go, removing duplicate implementations from both classicMessage_test.go and classic_msg_test.go. Remove redundant TestClassicMsgDatabaseReopen (covered by system test TestOpenClassicOutboxFromStack). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… computation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Prevents leaking an open database handle (file locks, descriptors) when the conversion check fails in OpenClassicOutboxFromStack. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactors the logic for opening the
classic-msgdatabase into a dedicatedOpenClassicOutboxFromStackfunction. This centralizes database initialization, error handling, and theUnfinishedConversionCheck, improving code clarity and reusability.Adds comprehensive unit and system tests to:
classic-msgdatabase can be correctly opened and its data retrieved after closing and reopening with production settings.Addresses minor off-by-one error in
ClassicOutboxRetriever.GetMsgthat would simply cause a different error which would report an error message unrelated to actual error.Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com