Improve e2e test CI reliability - #301
benthecarman wants to merge 4 commits into
Conversation
|
👋 Thanks for assigning @tankyleo as a reviewer! |
015181e to
5047dc1
Compare
f3r10
left a comment
There was a problem hiding this comment.
LGTM. Just one comment, about keeping both ports reserved until the child is ready to take them over.
| std::fs::write(&config_path, &config_content).unwrap(); | ||
|
|
||
| // Keep both ports reserved until the child is ready to take them over. | ||
| drop((grpc_listener, p2p_listener)); |
There was a problem hiding this comment.
I'm not sure the comment above matches the code.
It says both ports stay reserved until the child is ready to take them over. The listeners are dropped first, and only then does spawn_server_process start ldk-server. After that drop, is anything still holding the ports, or are they free until the child binds them?
I ran the end-to-end tests and they passed, so I can't show that this gap causes a failure. I just want to check whether the comment describes what the code does.
Keep test listeners outside the ephemeral range and prevent port reuse within a test process. Fail promptly when a server exits during startup and reap children even when initialization fails. Give PostgreSQL fixtures unique table names across test processes so reusing a port does not reuse database state. AI assistance: OpenAI Codex.
Keep a second channel open so LDK Node does not reconnect the peer while its force-close notification is being delivered. Require the exact local and remote closure reasons and verify the other channel stays usable. Wait for funding and both channels to be usable before closing, then observe closure events before mining. Remove the alternate processing error handling from the test. AI assistance: OpenAI Codex.
Channel opening returns before its funding transaction is broadcast. Wait for the transaction before mining announcement confirmations, then require that exact channel to be usable on both peers. Existing channels must not satisfy readiness for a newly opened channel. Include routing updates in gossip timeout diagnostics. AI assistance: OpenAI Codex.
An already-claimed HTLC can leave the commitment during restart, lowering the closing fee and increasing the claimable balance by the same amount. Compare exact funds per channel including that fee after outstanding outgoing claims resolve, while retaining the crash-recovery scenario. Cover the observed 43-satoshi fee change and ensure a one-satoshi loss still fails the funds comparison. AI assistance: OpenAI Codex.
5047dc1 to
984772b
Compare
Few things codex found to improve the e2e test reliability on CI:
within a test process.
reusing a port does not reuse database state.