Commit 4e35595
committed
Merge rust-bitcoin#213: Fix integration test failures by making Node::with_conf more robust
8c9a4a4 Revert "integration_test: Pause after node comes up" (Jamil Lambert, PhD)
66e7e7c Refactor Node::with_conf (Jamil Lambert, PhD)
2b8fad9 Split out sections into helper functions (Jamil Lambert, PhD)
Pull request description:
The intermittent integration test failures are caused by race conditions in the creation of the node, wallet or the cookie file. Change `Node::with_conf` to check if there is a problem and retry the section where it occurred, or if that still fails retry the whole process of starting the node.
First patch:
- Split out some sections into helper functions.
Second patch:
- Remove the loop in `with_conf()` that creates `client`, instead loop over the individual parts.
- Create helper functions for creating the `client`, and creating or loading the client `wallet`, both with their own retry logic.
- Reduce the sleep time between retries to reduce the delay, since it looks like the errors happen over shorter time periods than the existing 1 second wait.
- Add functions to wait until the client and the cookie file are available.
- Add a loop to retry the whole process if it fails, since the integration tests pass when repeated, just repeat this section where the failures occur instead.
- Remove all the debugging outputs since it all works now they are not needed.
- Update the rustdocs for the function.
Third patch:
- Revert rust-bitcoin#206, since the issue is now solved at it’s source the pause is no longer needed.
Closes rust-bitcoin#205
ACKs for top commit:
tcharding:
ACK 8c9a4a4
Tree-SHA512: d80ef5e4def47025e830dd84aaa99e8ed0b71302f95bfc3d0ec210226444ce45a0679c569c5cbcf152cccc3222f812e4a8e5ab4ed5383a89ae2539f1f49baed42 files changed
+212
-154
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 72 | + | |
77 | 73 | | |
78 | 74 | | |
79 | 75 | | |
| |||
0 commit comments