mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
test: Fix feature_pruning.py
(#5353)
## Issue being fixed or feature implemented `feature_pruning.py` is failing atm ## What was done? pls see individual commits ## How Has This Been Tested? run `feature_pruning.py` locally gitian for this branch with `INTEGRATION_TESTS_ARGS` set to `--extended --exclude feature_dbcrash --timeoutscale=4 --jobs=4`: https://gitlab.com/dashpay/dash/-/pipelines/852044104 NOTE: [`linux64_tsan-test`](https://gitlab.com/dashpay/dash/-/jobs/4197383660) failed because tsan build binaries are super slow and we hit 30 minutes timeout for 1 single test because of that. This is not an actual test failure. ## Breaking Changes n/a ## Checklist: - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
This commit is contained in:
parent
b1626f9af0
commit
72899530bf
@ -121,9 +121,10 @@ class PruneTest(BitcoinTestFramework):
|
|||||||
self.sync_blocks(self.nodes[0:5])
|
self.sync_blocks(self.nodes[0:5])
|
||||||
|
|
||||||
def test_invalid_command_line_options(self):
|
def test_invalid_command_line_options(self):
|
||||||
|
self.stop_node(0)
|
||||||
self.nodes[0].assert_start_raises_init_error(
|
self.nodes[0].assert_start_raises_init_error(
|
||||||
expected_msg='Error: Prune cannot be configured with a negative value.',
|
expected_msg='Error: Prune cannot be configured with a negative value.',
|
||||||
extra_args=['-prune=-1'],
|
extra_args=['-prune=-1', '-txindex=0', '-disablegovernance'],
|
||||||
)
|
)
|
||||||
self.nodes[0].assert_start_raises_init_error(
|
self.nodes[0].assert_start_raises_init_error(
|
||||||
expected_msg='Error: Prune configured below the minimum of 550 MiB. Please use a higher number.',
|
expected_msg='Error: Prune configured below the minimum of 550 MiB. Please use a higher number.',
|
||||||
@ -133,9 +134,17 @@ class PruneTest(BitcoinTestFramework):
|
|||||||
expected_msg='Error: Prune mode is incompatible with -txindex.',
|
expected_msg='Error: Prune mode is incompatible with -txindex.',
|
||||||
extra_args=['-prune=550', '-txindex'],
|
extra_args=['-prune=550', '-txindex'],
|
||||||
)
|
)
|
||||||
|
# self.nodes[0].assert_start_raises_init_error(
|
||||||
|
# expected_msg='Error: Prune mode is incompatible with -coinstatsindex.',
|
||||||
|
# extra_args=['-prune=550', '-coinstatsindex'],
|
||||||
|
# )
|
||||||
self.nodes[0].assert_start_raises_init_error(
|
self.nodes[0].assert_start_raises_init_error(
|
||||||
expected_msg='Error: Prune mode is incompatible with -coinstatsindex.',
|
expected_msg='Error: Prune mode is incompatible with -blockfilterindex.',
|
||||||
extra_args=['-prune=550', '-coinstatsindex'],
|
extra_args=['-prune=550', '-blockfilterindex'],
|
||||||
|
)
|
||||||
|
self.nodes[0].assert_start_raises_init_error(
|
||||||
|
expected_msg='Error: Prune mode is incompatible with -disablegovernance=false.',
|
||||||
|
extra_args=['-prune=550', '-disablegovernance=false'],
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_height_min(self):
|
def test_height_min(self):
|
||||||
@ -474,14 +483,15 @@ class PruneTest(BitcoinTestFramework):
|
|||||||
self.log.info("Test wallet re-scan")
|
self.log.info("Test wallet re-scan")
|
||||||
self.wallet_test()
|
self.wallet_test()
|
||||||
|
|
||||||
|
self.log.info("Test invalid pruning command line options")
|
||||||
|
self.test_invalid_command_line_options()
|
||||||
|
|
||||||
|
# NOTE: this is a Dash-specific part, it should be the very last one before "Done"
|
||||||
self.log.info("Stopping pruned nodes manually")
|
self.log.info("Stopping pruned nodes manually")
|
||||||
for i in range(2, 6):
|
for i in range(2, 6):
|
||||||
self.log.info("Stopping pruned node%d" % i)
|
self.log.info("Stopping pruned node%d" % i)
|
||||||
self.stop_node(i, expected_stderr=EXPECTED_STDERR_NO_GOV_PRUNE)
|
self.stop_node(i, expected_stderr=EXPECTED_STDERR_NO_GOV_PRUNE)
|
||||||
|
|
||||||
self.log.info("Test invalid pruning command line options")
|
|
||||||
self.test_invalid_command_line_options()
|
|
||||||
|
|
||||||
self.log.info("Done")
|
self.log.info("Done")
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
Reference in New Issue
Block a user