mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 04:12:36 -03:00
Merge bitcoin/bitcoin#27221: test: Default timeout factor to 4 under --valgrind
fa27cf4cc7
test: Default timeout factor to 4 under --valgrind (MarcoFalke) Pull request description: valgrind will incur a slowdown of at least 2, so increase the default timeout factor. This should reduce the number of reported issues. See also https://github.com/bitcoin/bitcoin/issues/27112#issuecomment-1455762739 ACKs for top commit: fanquake: ACKfa27cf4cc7
- I still see at least one actual issue when running the functional tests under `--valgrind` (outside the CI system), but will follow up separately with that. Increasing the timeout here seems fine. Tree-SHA512: 4467559a3bfd98f5735f300f6ed54c68f951191d65a2b1294d71d72cc5d0864964de562d5dfa0a4855fc541ccb269a538b7aeb3d408d2d012a5369513397c395
This commit is contained in:
commit
f088949fcf
1 changed files with 4 additions and 3 deletions
|
@ -120,8 +120,6 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
|||
self.disable_autoconnect = True
|
||||
self.set_test_params()
|
||||
assert self.wallet_names is None or len(self.wallet_names) <= self.num_nodes
|
||||
if self.options.timeout_factor == 0 :
|
||||
self.options.timeout_factor = 99999
|
||||
self.rpc_timeout = int(self.rpc_timeout * self.options.timeout_factor) # optionally, increase timeout by a factor
|
||||
|
||||
def main(self):
|
||||
|
@ -193,7 +191,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
|||
help="run nodes under the valgrind memory error detector: expect at least a ~10x slowdown. valgrind 3.14 or later required. Forces --nosandbox.")
|
||||
parser.add_argument("--randomseed", type=int,
|
||||
help="set a random seed for deterministically reproducing a previous test run")
|
||||
parser.add_argument('--timeout-factor', dest="timeout_factor", type=float, default=1.0, help='adjust test timeouts by a factor. Setting it to 0 disables all timeouts')
|
||||
parser.add_argument("--timeout-factor", dest="timeout_factor", type=float, help="adjust test timeouts by a factor. Setting it to 0 disables all timeouts")
|
||||
|
||||
self.add_options(parser)
|
||||
# Running TestShell in a Jupyter notebook causes an additional -f argument
|
||||
|
@ -201,6 +199,9 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
|||
# source: https://stackoverflow.com/questions/48796169/how-to-fix-ipykernel-launcher-py-error-unrecognized-arguments-in-jupyter/56349168#56349168
|
||||
parser.add_argument("-f", "--fff", help="a dummy argument to fool ipython", default="1")
|
||||
self.options = parser.parse_args()
|
||||
if self.options.timeout_factor == 0:
|
||||
self.options.timeout_factor = 99999
|
||||
self.options.timeout_factor = self.options.timeout_factor or (4 if self.options.valgrind else 1)
|
||||
self.options.previous_releases_path = previous_releases_path
|
||||
|
||||
config = configparser.ConfigParser()
|
||||
|
|
Loading…
Reference in a new issue