Open
Description
Describe the bug
The test electrum_protocol::test::test_blockchain_headers
is failing intermittently showcasing a possible intermittent network bug.
Steps to Reproduce
Run the test electrum_protocol::test::test_blockchain_headers
multiple times on master branch, a few of them pass, a few of them fail.
cargo test test_blockchain_headers
Expected behavior
It should always pass.
Build environment
Additional context
First time I noticed this was while working on #497 and @oleonardolima hinted at this being a intermittent problem. I am also having this issue on #521 where the CI is failing due to this.
luca@Lucas-MacBook-Air Floresta % cargo test test_blockchain_headers
Finished test [unoptimized + debuginfo] target(s) in 0.28s
running 1 test
test electrum_protocol::test::test_blockchain_headers ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 6 filtered out; finished in 0.09s
luca@Lucas-MacBook-Air Floresta % cargo test test_blockchain_headers
Finished test [unoptimized + debuginfo] target(s) in 0.09s
running 1 test
test electrum_protocol::test::test_blockchain_headers ... FAILED
failures:
---- electrum_protocol::test::test_blockchain_headers stdout ----
thread 'electrum_protocol::test::test_blockchain_headers' panicked at crates/floresta-electrum/src/electrum_protocol.rs:1219:9:
assertion failed: expected `Ok(_)`, got `Err(Custom { kind: UnexpectedEof, error: Error("EOF while parsing a string", line: 1, column: 48996) })`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
electrum_protocol::test::test_blockchain_headers
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 6 filtered out; finished in 0.08s
error: test failed, to rerun pass `-p floresta-electrum --lib`
luca@Lucas-MacBook-Air Floresta %