Skip to content

ElectrumMiniWalletTest: use mock testnet3 server#853

Draft
sstone wants to merge 8 commits intomasterfrom
fix-ci-use-mock-testnet3-electrum-server
Draft

ElectrumMiniWalletTest: use mock testnet3 server#853
sstone wants to merge 8 commits intomasterfrom
fix-ci-use-mock-testnet3-electrum-server

Conversation

@sstone
Copy link
Copy Markdown
Member

@sstone sstone commented Mar 26, 2026

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.

Copy link
Copy Markdown
Member

@t-bast t-bast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you name it dummyClient or mockClient? Why just "my"?

Base automatically changed from update-bitcoin-secp256k1-kmp to master March 31, 2026 09:33
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.

2 participants