Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Dec 4, 2020

Failing the test after 10 iterations without a loading error is problematic because it may take 11 iterations to get a loading error.

Fix that by running until a loading error occurs, which should happen in almost all runs within the first 10 iterations.

@maflcko
Copy link
Member Author

maflcko commented Dec 4, 2020

@fanquake fanquake added the Tests label Dec 4, 2020
@maflcko maflcko force-pushed the 2012-testWalletInt branch from fa08f12 to fab48da Compare December 4, 2020 09:32
@maflcko maflcko requested review from ryanofsky and promag December 16, 2020 14:19
Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

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

Code review ACK fab48da. This seems like a good workaround. I think more ideally think load and unload RPCs would not have racy status reporting (suggested previously #19300 (review) and
#19232 (comment)) so the race condition that this test tries to trigger just wouldn't exist.

Also for reference there was discussion about fragility of this test when it was added #19300 (comment)

@maflcko maflcko merged commit 9dbcd37 into bitcoin:master Dec 16, 2020
@maflcko maflcko deleted the 2012-testWalletInt branch December 16, 2020 14:56
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Dec 17, 2020
…with got_loading_error

fab48da test: Fix intermittent wallet_multiwallet issue with got_loading_error (MarcoFalke)
fa8e15f test: pep8 wallet_multiwallet.py (MarcoFalke)

Pull request description:

  Failing the test after 10 iterations without a loading error is problematic because it may take 11 iterations to get a loading error.

  Fix that by running until a loading error occurs, which should happen in almost all runs within the first 10 iterations.

ACKs for top commit:
  ryanofsky:
    Code review ACK fab48da. This seems like a good workaround. I think more ideally think load and unload RPCs would not have racy status reporting (suggested previously bitcoin#19300 (review) and

Tree-SHA512: 6b80b26d916276efe2a01af93bca7dbf71a3e67db9d3deb15175070719bf7d1325a1410d93e74c0316942e388faa2ba185dc9d3759c82d1c73c3c509b9997f05
@PiRK
Copy link
Contributor

PiRK commented Dec 15, 2021

Doesn't that introduce a risk that one of the 3 threads never detects a race and keeps running forever alone without interference from the other two?

@PiRK
Copy link
Contributor

PiRK commented Dec 20, 2021

nvm, I missed the fact that got_loading_error is a global.

Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Dec 20, 2021
Summary:
Failing the test after 10 iterations without a loading error is problematic because it may take 11 iterations to get a loading error.

Fix that by running until a loading error occurs, which should happen in almost all runs within the first 10 iterations.

This is a backport of [[bitcoin/bitcoin#20569 | core#20569]]

Test Plan: `ninja check-functional`

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10684
@bitcoin bitcoin locked and limited conversation to collaborators Dec 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants