diff options
author | fanquake <fanquake@gmail.com> | 2023-11-13 10:12:26 +0000 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-11-13 10:12:34 +0000 |
commit | e11b7587a102595354c5ad502931d487c1cc145c (patch) | |
tree | 12bae66bb71e57aeb774a00ca16e5ef57a487441 | |
parent | 9c4b74fa92706d219533a656303cdf723e2eccb4 (diff) | |
parent | 44445ae8f1123c3affdcc0dbd7b3830eff5548ef (diff) |
Merge bitcoin/bitcoin#28831: test: Avoid intermittent failures in feature_init
44445ae8f1123c3affdcc0dbd7b3830eff5548ef test: Avoid intermittent failures in feature_init (MarcoFalke)
Pull request description:
The code not only modifies block dat files, but also leveldb files, which may be of smaller size. Such corruption may not force leveldb to abort, according to the intermittent test failures.
Fix the intermittent test failures by reverting https://github.com/bitcoin/bitcoin/commit/5ab6419f380cc0a8cde78b125f3eeee5fcba43ae .
ACKs for top commit:
kevkevinpal:
lgtm ACK [44445ae](https://github.com/bitcoin/bitcoin/pull/28831/commits/44445ae8f1123c3affdcc0dbd7b3830eff5548ef)
fjahr:
ACK 44445ae8f1123c3affdcc0dbd7b3830eff5548ef
theStack:
ACK 44445ae8f1123c3affdcc0dbd7b3830eff5548ef
Tree-SHA512: 8084e4aeb8a976c1706a1898d7854c55d0c4ec7b5a08f65f97ffc173c935f9b0e0c1caef7be1538a458e4c018f7bd1948173349ec76ca48bc4013a63f284bb0f
-rwxr-xr-x | test/functional/feature_init.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/functional/feature_init.py b/test/functional/feature_init.py index 37ef3de4dd..142d75a851 100755 --- a/test/functional/feature_init.py +++ b/test/functional/feature_init.py @@ -1,11 +1,10 @@ #!/usr/bin/env python3 -# Copyright (c) 2021-2022 The Bitcoin Core developers +# Copyright (c) 2021-present The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Stress tests related to node initialization.""" import os from pathlib import Path -from random import randint import shutil from test_framework.test_framework import BitcoinTestFramework, SkipTest @@ -138,8 +137,8 @@ class InitStressTest(BitcoinTestFramework): # Since the genesis block is not checked by -checkblocks, the # perturbation window must be chosen such that a higher block # in blk*.dat is affected. - tf.seek(randint (150, 15000)) - tf.write(b'1' * randint(20, 2000)) + tf.seek(150) + tf.write(b"1" * 200) start_expecting_error(err_fragment) |