mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
Merge #19730: ci: Set increased --timeout-factor by default
fa330ec2fe5f5ba68a8d43fff0b19584c0b1ff39 test: Remove confusing and broken use of wait_until global (MarcoFalke) fa6583c30bf7d82cf7ffdae995f8f16524ad2c0d ci: Set increased --timeout-factor by default (MarcoFalke) Pull request description: Assuming that tests don't have a logic error or race, setting a high timeout should not cause any issues. The tests will still pass just as fast in the fastest case, but it allows for some buffer in case of slow disks or otherwise starved ci machines. Fixes #19729 ACKs for top commit: hebasto: ACK fa330ec2fe5f5ba68a8d43fff0b19584c0b1ff39, I have reviewed the code, and it looks OK, I agree it can be merged. Tree-SHA512: 3da80ee008c7b08bab5fdaf7804d57c79d6fed49a7d37b9c54fc89756659fcb9981fd10afc4d07bd90d93c1699fd410a0110a3cd34d016873759d114ce3cd82d
This commit is contained in:
parent
0a27a2af73
commit
261d2a0ded
@ -42,7 +42,7 @@ echo "Using socketevents mode: $SOCKETEVENTS"
|
||||
EXTRA_ARGS="--dashd-arg=-socketevents=$SOCKETEVENTS"
|
||||
|
||||
set +e
|
||||
LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib ${TEST_RUNNER_ENV} ./test/functional/test_runner.py --ci --attempts=3 --ansi --combinedlogslen=4000 ${TEST_RUNNER_EXTRA} --failfast --nocleanup --tmpdir=$(pwd)/testdatadirs $PASS_ARGS $EXTRA_ARGS
|
||||
LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib ${TEST_RUNNER_ENV} ./test/functional/test_runner.py --ci --attempts=3 --ansi --combinedlogslen=4000 --timeout-factor=${TEST_RUNNER_TIMEOUT_FACTOR} ${TEST_RUNNER_EXTRA} --failfast --nocleanup --tmpdir=$(pwd)/testdatadirs $PASS_ARGS $EXTRA_ARGS
|
||||
RESULT=$?
|
||||
set -e
|
||||
|
||||
|
@ -39,6 +39,10 @@ export USE_BUSY_BOX=${USE_BUSY_BOX:-false}
|
||||
export RUN_UNIT_TESTS=${RUN_UNIT_TESTS:-true}
|
||||
export RUN_INTEGRATION_TESTS=${RUN_INTEGRATION_TESTS:-true}
|
||||
export RUN_SECURITY_TESTS=${RUN_SECURITY_TESTS:-false}
|
||||
# By how much to scale the test_runner timeouts (option --timeout-factor).
|
||||
# This is needed because some ci machines have slow CPU or disk, so sanitizers
|
||||
# might be slow or a reindex might be waiting on disk IO.
|
||||
export TEST_RUNNER_TIMEOUT_FACTOR=${TEST_RUNNER_TIMEOUT_FACTOR:-4}
|
||||
export TEST_RUNNER_ENV=${TEST_RUNNER_ENV:-}
|
||||
export RUN_FUZZ_TESTS=${RUN_FUZZ_TESTS:-false}
|
||||
export RUN_SYMBOL_TESTS=${RUN_SYMBOL_TESTS:-true}
|
||||
|
@ -13,7 +13,6 @@ from test_framework.util import (
|
||||
assert_fee_amount,
|
||||
assert_raises_rpc_error,
|
||||
count_bytes,
|
||||
wait_until,
|
||||
)
|
||||
from test_framework.wallet_util import test_address
|
||||
|
||||
@ -535,7 +534,7 @@ class WalletTest(BitcoinTestFramework):
|
||||
self.start_node(2, [m, "-limitancestorcount=" + str(chainlimit)])
|
||||
if m == '-reindex':
|
||||
# reindex will leave rpc warm up "early"; Wait for it to finish
|
||||
wait_until(lambda: [block_count] * 3 == [self.nodes[i].getblockcount() for i in range(3)])
|
||||
self.wait_until(lambda: [block_count] * 3 == [self.nodes[i].getblockcount() for i in range(3)])
|
||||
assert_equal(balance_nodes, [self.nodes[i].getbalance() for i in range(3)])
|
||||
|
||||
# Exercise listsinceblock with the last two blocks
|
||||
@ -582,7 +581,7 @@ class WalletTest(BitcoinTestFramework):
|
||||
self.restart_node(0, extra_args=["-walletrejectlongchains", "-limitancestorcount=" + str(2 * chainlimit)])
|
||||
|
||||
# wait until the wallet has submitted all transactions to the mempool
|
||||
wait_until(lambda: len(self.nodes[0].getrawmempool()) == chainlimit * 2)
|
||||
self.wait_until(lambda: len(self.nodes[0].getrawmempool()) == chainlimit * 2)
|
||||
|
||||
# Prevent potential race condition when calling wallet RPCs right after restart
|
||||
self.nodes[0].syncwithvalidationinterfacequeue()
|
||||
|
Loading…
Reference in New Issue
Block a user