wallet_keypool.py test failure when run as part of suite
The wallet_keypool.py test fails when running as part of ninja check-all
or ./test/functional/test_runner.py
after a clean build on master, tested at e918b273. The test does not fail when run standalone with test/functional/wallet_keypool.py
after copying tests to build directory.
wallet_keypool.py failed, Duration: 147 s
stdout:
2021-12-17T21:46:03.791000Z TestFramework (INFO): Initializing test directory /usr/src/bounty/bch/bitcoin-cash-node/build/test/tmp/bitcoin_test_runner_20211217_214427/wallet_keypool_550
2021-12-17T21:47:30.895000Z TestFramework (ERROR): JSONRPC error
Traceback (most recent call last):
File "/usr/src/bounty/bch/bitcoin-cash-node/test/functional/test_framework/authproxy.py", line 168, in _get_response
http_response = self.__conn.getresponse()
File "/usr/lib/python3.9/http/client.py", line 1377, in getresponse
response.begin()
File "/usr/lib/python3.9/http/client.py", line 320, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.9/http/client.py", line 281, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.9/socket.py", line 704, in readinto
return self._sock.recv_into(b)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/bounty/bch/bitcoin-cash-node/test/functional/test_framework/test_framework.py", line 185, in main
self.run_test()
File "/usr/src/bounty/bch/bitcoin-cash-node/test/functional/wallet_keypool.py", line 90, in run_test
nodes[0].keypoolrefill(100)
File "/usr/src/bounty/bch/bitcoin-cash-node/test/functional/test_framework/coverage.py", line 48, in __call__
return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
File "/usr/src/bounty/bch/bitcoin-cash-node/test/functional/test_framework/authproxy.py", line 149, in __call__
response = self._request(
File "/usr/src/bounty/bch/bitcoin-cash-node/test/functional/test_framework/authproxy.py", line 117, in _request
return self._get_response()
File "/usr/src/bounty/bch/bitcoin-cash-node/test/functional/test_framework/authproxy.py", line 170, in _get_response
raise JSONRPCException({
test_framework.authproxy.JSONRPCException: 'keypoolrefill' RPC took longer than 60 seconds. Consider using larger timeout for calls that take longer to return. (-344)
2021-12-17T21:47:30.948000Z TestFramework (INFO): Stopping nodes
2021-12-17T21:47:31.095000Z TestFramework.node0 (ERROR): Unable to stop node.
Traceback (most recent call last):
File "/usr/src/bounty/bch/bitcoin-cash-node/test/functional/test_framework/test_node.py", line 324, in stop_node
self.stop(wait=wait)
File "/usr/src/bounty/bch/bitcoin-cash-node/test/functional/test_framework/coverage.py", line 48, in __call__
return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
File "/usr/src/bounty/bch/bitcoin-cash-node/test/functional/test_framework/authproxy.py", line 149, in __call__
response = self._request(
File "/usr/src/bounty/bch/bitcoin-cash-node/test/functional/test_framework/authproxy.py", line 116, in _request
self.__conn.request(method, path, postdata, headers)
File "/usr/lib/python3.9/http/client.py", line 1285, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.9/http/client.py", line 1296, in _send_request
self.putrequest(method, url, **skips)
File "/usr/lib/python3.9/http/client.py", line 1122, in putrequest
raise CannotSendRequest(self.__state)
http.client.CannotSendRequest: Request-sent
2021-12-17T21:48:31.145000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ([' def is_node_stopped(self):\n', ' """Checks whether the node has stopped.\n', '\n', ' Returns True if the node has stopped. False otherwise.\n', ' This method is responsible for freeing resources (self.process)."""\n', ' if not self.running:\n', ' return True\n', ' return_code = self.process.poll()\n', ' if return_code is None:\n', ' return False\n', '\n', " # process has stopped. Assert that it didn't return an error code.\n", ' assert return_code == 0, self._node_msg(\n', ' "Node returned non-zero exit code ({}) when stopping".format(return_code))\n', ' self.running = False\n', ' self.process = None\n', ' self.rpc_connected = False\n', ' self.rpc = None\n', ' self.log.debug("Node stopped")\n', ' return True\n'], 337)
stderr:
Traceback (most recent call last):
File "/usr/src/bounty/bch/bitcoin-cash-node/test/functional/wallet_keypool.py", line 97, in <module>
KeyPoolTest().main()
File "/usr/src/bounty/bch/bitcoin-cash-node/test/functional/test_framework/test_framework.py", line 210, in main
self.stop_nodes()
File "/usr/src/bounty/bch/bitcoin-cash-node/test/functional/test_framework/test_framework.py", line 388, in stop_nodes
node.wait_until_stopped()
File "/usr/src/bounty/bch/bitcoin-cash-node/test/functional/test_framework/test_node.py", line 359, in wait_until_stopped
wait_until(self.is_node_stopped, timeout=timeout)
File "/usr/src/bounty/bch/bitcoin-cash-node/test/functional/test_framework/util.py", line 288, in wait_until
raise AssertionError(
AssertionError: Predicate ([' def is_node_stopped(self):\n', ' """Checks whether the node has stopped.\n', '\n', ' Returns True if the node has stopped. False otherwise.\n', ' This method is responsible for freeing resources (self.process)."""\n', ' if not self.running:\n', ' return True\n', ' return_code = self.process.poll()\n', ' if return_code is None:\n', ' return False\n', '\n', " # process has stopped. Assert that it didn't return an error code.\n", ' assert return_code == 0, self._node_msg(\n', ' "Node returned non-zero exit code ({}) when stopping".format(return_code))\n', ' self.running = False\n', ' self.process = None\n', ' self.rpc_connected = False\n', ' self.rpc = None\n', ' self.log.debug("Node stopped")\n', ' return True\n'], 337) not true after 60 seconds