Skip to content

Conversation

@tcharding
Copy link
Member

We are getting intermittent test failures stating that the node is not available. node already includes code that hits the RPC API after the node is up so this is a little surprising. However it doesn't hurt to try waiting a little still.

Just sleep for half a second after each node spins up and see if the intermittent failures go away.

We are getting intermittent test failures stating that the node is not
available. `node` already includes code that hits the RPC API after the
node is up so this is a little surprising. However it doesn't hurt to
try waiting a little still.

Just sleep for half a second after each node spins up and see if the
intermittent failures go away.
@tcharding
Copy link
Member Author

To test this I just ran test17 in a loop ten times locally.

Copy link
Collaborator

@jamillambert jamillambert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK c188d91

This doesn't fix the issue, but it did improve it in my testing. I tried changing it to a 2s wait and still got failures. I think merge this, but keep the issue open.

@tcharding tcharding merged commit bc875a2 into rust-bitcoin:master May 28, 2025
29 checks passed
tcharding added a commit that referenced this pull request May 30, 2025
…ore 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 #206, since the issue is now solved at it’s source the pause is no longer needed.

  Closes #205

ACKs for top commit:
  tcharding:
    ACK 8c9a4a4

Tree-SHA512: d80ef5e4def47025e830dd84aaa99e8ed0b71302f95bfc3d0ec210226444ce45a0679c569c5cbcf152cccc3222f812e4a8e5ab4ed5383a89ae2539f1f49baed4
blaze-smith470pm added a commit to blaze-smith470pm/corepc that referenced this pull request Sep 26, 2025
…es up

c188d911cd893d84fd03145c5c02f3c3d5928178 integration_test: Pause after node comes up (Tobin C. Harding)

Pull request description:

  We are getting intermittent test failures stating that the node is not available. `node` already includes code that hits the RPC API after the node is up so this is a little surprising. However it doesn't hurt to try waiting a little still.

  Just sleep for half a second after each node spins up and see if the intermittent failures go away.

ACKs for top commit:
  jamillambert:
    ACK c188d911cd893d84fd03145c5c02f3c3d5928178

Tree-SHA512: 65dc7d06703c4cf29922d21215b74bcb5491b67de2d45a4c0e5454a18b7a2cf52d8d82ff9c78f18caba0d9ba3eda2d201f772011d32d144e49a5f9c616965f6d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants