The tests expect the websocket subscription to take effect immediately, however this doesn't hold as the subscription is send via the network and can take some time to be received/processed. This diff uses the log to make sure the subscription happened before returning.
Details
Details
- Reviewers
PiRK - Group Reviewers
Restricted Project - Commits
- rABC019650ee386a: [chronik] Fix websocket subscription in tests
./test/functional/test_runner.py chronik_*
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- ws_ping
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Event Timeline
test/functional/test_framework/util.py | ||
---|---|---|
659–662 ↗ | (On Diff #45280) | Potential simplification. >>> a = bytes.fromhex("deadbeef") >>> >>> repr(a) "b'\\xde\\xad\\xbe\\xef'" >>> str(a) "b'\\xde\\xad\\xbe\\xef'">>> f"test: {a}".replace("'", '"') 'test: b"\\xde\\xad\\xbe\\xef"' |
test/functional/test_framework/util.py | ||
---|---|---|
659–662 ↗ | (On Diff #45280) | >>> print(f"test: {a}".replace("'", '"')) test: b"\xde\xad\xbe\xef" |
chronik/chronik-http/src/ws.rs | ||
---|---|---|
159–162 | maybe this even puts it back to 1 line |