ElectrumMiniWalletTest: use mock testnet3 server#853
Draft
Conversation
It saves a compact-to-DER-to-compact roundtrip since we use compact signatures everywhere.
testnet3 electrum servers are unreliable and cause tests and CI to fail. We replace our testnet3 server by as mock that uses data returned by a real testnet3 server.
t-bast
reviewed
Mar 27, 2026
Member
t-bast
left a comment
There was a problem hiding this comment.
I think that can be quite useful. It won't catch issues caused by changes in servers though, ideally we'd want:
- to run these tests with the mock during standard CI
- but to run them with the real testnet3 servers during a nightly or weekly run
That wouldn't require much code, but I don't know if kotlin's test framework allows skipping or including specific tests when running, the way Scalatest does?
|
|
||
| /** | ||
| * mock-up client that uses data returned by real testnet3 electrum servers for the last 2 tests (and which is valid only for the seed used in these tests) | ||
| * testnet3 servers are unreliable and caused CI to fail, using |
Member
There was a problem hiding this comment.
It looks like you haven't finished your sentence here?
| * mock-up client that uses data returned by real testnet3 electrum servers for the last 2 tests (and which is valid only for the seed used in these tests) | ||
| * testnet3 servers are unreliable and caused CI to fail, using | ||
| */ | ||
| private val myClient = object : IElectrumClient { |
Member
There was a problem hiding this comment.
Can you name it dummyClient or mockClient? Why just "my"?
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.
testnet3 electrum servers are unreliable and cause tests and CI to fail. We replace our testnet3 server by as mock that uses data returned by a real testnet3 server.