Page MenuHomePhabricator

[electrum] tests: raise on RPC error with proper error message
ClosedPublic

Authored by PiRK on Nov 6 2023, 15:27.

Details

Summary

This makes it easier to diagnose RPC errors.
Without raising on timeout error, poll_for_answer would just continue execution, now it will fail the test if a response is not received.

Also run the electrum-abc process in verbose mode for additional debugging info on stdout, and add an additional debugging/error message if the result == PACKAGE_VERSION assertion fails (which misteriously happens occasionnaly on our CI infra)

This is a partial backport of electroncash#2721
https://github.com/Electron-Cash/Electron-Cash/pull/2721/commits/0a1f39897d24092604092f48d182c50979e53e0c

Depends on D14742

Test Plan

pytest electrum/electrumabc/tests/regtest

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Nov 6 2023, 15:27
PiRK retitled this revision from tests: raise on RPC error or timeout error with proper error message to [electrum] tests: raise on RPC error or timeout error with proper error message.Nov 6 2023, 15:31
This revision is now accepted and ready to land.Nov 6 2023, 22:38
PiRK retitled this revision from [electrum] tests: raise on RPC error or timeout error with proper error message to [electrum] tests: raise on RPC error with proper error message.Nov 7 2023, 06:43