feat(solana-indexer) PR 9: cover the ingester to decoder pipeline end to end - #4677
Draft
squadgazzz wants to merge 5 commits into
Draft
feat(solana-indexer) PR 9: cover the ingester to decoder pipeline end to end#4677squadgazzz wants to merge 5 commits into
squadgazzz wants to merge 5 commits into
Conversation
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.
Description
Nothing exercised the ingester and the decoder as one pipeline, because the per-component tests stop at the channel boundary. This runs a proto
SubscribeUpdatecarrying aCreateOrderthrough the real ingester, channel and decoder, then asserts what arrived at the persistence seam.The plan's PR 9 asked for
adapters/fake.rswith aFakeStoreand aFakeStream, plus atests/smoke.rsintegration test. Neither fake is needed.Ingesteris generic overStream, sofutures::stream::iteris already the fake stream, andPersistenceis a concrete struct rather than theStoretrait the plan assumed, so aFakeStorehas no trait to implement. An integration test undertests/also cannot constructpub(crate)types. The test therefore lives in the crate, andPersistencegrows a test-only recorder to make the writes observable while its bodies are no-ops.Changes
Persistencerecords every write as aCallunder#[cfg(test)]. The log is shared across clones, so a test hands one clone to a component and reads back what that component wrote.stream::iterintoIngester, through the channel, intoDecoder::run, and asserts the decoder persisted theOrderCreatedevent with watermark 41 for a slot-42 transaction. That also pins theslot - 1watermark rule across the whole path.How to test
New unit test. Verified it has teeth by flipping the expected watermark to 42 and confirming the failure.
Related issues
Stacked on #4676.