Page MenuHomePhabricator

[chronik] Electrum: handle multiple messages in a single packet in the test framework
ClosedPublic

Authored by Fabien on Thu, May 15, 14:30.

Details

Summary

It is possible for the server to send several '\n' separated messages in a single data frame. This diff adds support for this. For the current tests there is no change in behavior.

Test Plan
./test/functional/test_runner.py chronik_electrum_*

Diff Detail

Repository
rABC Bitcoin ABC
Branch
electrrum_multimessage
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 33318
Build 66117: Build Diffbuild-without-wallet · build-diff · build-debug · build-clang-tidy · build-clang
Build 66116: arc lint + arc unit

Event Timeline

PiRK added inline comments.
test/functional/test_framework/jsonrpctools.py
120–129

I probably doesn't matter much for the tests, but we could implement this a bit more efficiently by avoiding the split/join round trip.

See https://www.w3schools.com/python/trypython.asp?filename=demo_ref_string_split4
(untested)

This revision is now accepted and ready to land.Thu, May 15, 15:13