test: add deterministic deposit consolidation integration tests#60
Merged
test: add deterministic deposit consolidation integration tests#60
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds deterministic integration coverage for the deposit consolidation timer task by introducing reusable JSON-RPC HTTP mock fixtures and a helper to drive PocketIC time/ticks until mocked outcalls are executed.
Changes:
- Add a new
consolidation_testsintegration test that advances time to trigger the consolidation timer and asserts expected events. - Introduce
Setup::execute_http_mocksto repeatedly tick/advance time while executing pending HTTP outcall mocks. - Move/extend HTTP mock helpers into
integration_tests::fixtures(getSlot/getBlock/sendTransaction + shared getTransaction mocks).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| integration_tests/tests/tests.rs | Adds consolidation integration test and per-RPC mock setup for the timer-triggered flow. |
| integration_tests/src/lib.rs | Adds execute_http_mocks helper and re-exports PocketIC REST types for test/mocking ergonomics. |
| integration_tests/src/fixtures.rs | Centralizes and expands JSON-RPC mock builders used by integration tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
maciejdfinity
approved these changes
Mar 23, 2026
lpahlavi
added a commit
that referenced
this pull request
Mar 24, 2026
(DEFI-2670) Add timer task that resubmits all expired submitted transactions with a new blockhash. Deterministic integration tests similar to the ones for deposit consolidation task added in #60 will be added in a follow-up PR. --------- Co-authored-by: Claude Opus 4.5 <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.
(DEFI-2670) Add deterministic integration tests with mocked HTTP outcalls for the deposit consolidation timer task.