Page MenuHomePhabricator

Increase timeout in wallet_multiwallet
ClosedPublic

Authored by Fabien on Oct 12 2022, 10:45.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC7476a3c6356c: Increase timeout in wallet_multiwallet
Summary

The test occasionally fails on got_loading_error = False on the slow qemu machines. There are only 3 ways this can fail: a timeout occured, an unhandled JSONRPCError is raised, or the race didn't happen.
The later case should be rare enough that it never happens, intended that the tests runs the RPCs enough times
This is where this becomes problematic, as we have a timeout that doesn't scale with the RPC duration. This diff fixes that by ensuring that each of the 2 RPCs in test_load_unload can run 10x at timeout duration. That will also fixes the first case as RPC timeout can be greater than the thread timeout without this diff.

Depends on D12215.

Test Plan
./test/functional/test_runner.py wallet_multiwallet

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Oct 12 2022, 10:45

Failed tests logs:

====== Bitcoin ABC functional tests: wallet_multiwallet.py ======

------- Stdout: -------
2022-10-12T11:10:15.573000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20221012_111014/wallet_multiwallet_0
2022-10-12T11:10:27.768000Z TestFramework (INFO): Check for per-wallet settxfee call
2022-10-12T11:10:27.772000Z TestFramework (INFO): Test dynamic wallet loading
2022-10-12T11:10:28.189000Z TestFramework (INFO): Load first wallet
2022-10-12T11:10:28.205000Z TestFramework (INFO): Load second wallet
2022-10-12T11:10:28.214000Z TestFramework (INFO): Concurrent wallet loading
2022-10-12T11:10:28.253000Z TestFramework (INFO): Load remaining wallets
2022-10-12T11:10:28.295000Z TestFramework (INFO): Test dynamic wallet creation.
2022-10-12T11:10:28.338000Z TestFramework (INFO): Test dynamic wallet unloading
2022-10-12T11:10:31.372000Z TestFramework (INFO): Test wallet backup
2022-10-12T11:10:59.264000Z TestFramework (INFO): Stopping nodes
2022-10-12T11:10:59.466000Z TestFramework (INFO): Cleaning up /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20221012_111014/wallet_multiwallet_0 on exit
2022-10-12T11:10:59.466000Z TestFramework (INFO): Tests successful
------- Stderr: -------
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "/work/test/functional/wallet_multiwallet.py", line 32, in test_load_unload
    node.loadwallet(name)
  File "/work/test/functional/test_framework/coverage.py", line 47, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  File "/work/test/functional/test_framework/authproxy.py", line 163, in __call__
    raise JSONRPCException(response['error'], status)
test_framework.authproxy.JSONRPCException: Wallet file verification failed. Refusing to load database. Data file '/work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20221012_111014/wallet_multiwallet_0/node0/regtest/wallets/w3/wallet.dat' is already loaded. (-4)

Each failure log is accessible here:
Bitcoin ABC functional tests: wallet_multiwallet.py

Don't raise in case of an unhandler JSONRPCException, because there are legit cases of this that can happen.

CTRL+S caused a 's' typo

This revision is now accepted and ready to land.Oct 12 2022, 12:42
This revision was automatically updated to reflect the committed changes.