Commit bfc9d95
committed
Merge bitcoin/bitcoin#33104: test: Perform backup filename checks in migrate_and_get_rpc in wallet_migration.py
4b80147 test: Perform backup filename checks in migrate_and_get_rpc (Ava Chow)
Pull request description:
Some test cases were unnecessarily checking the backup filename, which involved setting the mocktime before `migrate_and_get_rpc`. However, this could cause a failure if the test was slow since `migrate_and_get_rpc` also sets the mocktime. Since it also already checks that the backup file is named correctly, there's no need for those tests to also do their own mocktime and filename check.
The CI failure can be reproduced locally by adding a sleep to `migrate_and_get_rpc`:
```diff
diff --git a/test/functional/wallet_migration.py b/test/functional/wallet_migration.py
index 7042044..e87a6100623 100755
--- a/test/functional/wallet_migration.py
+++ b/test/functional/wallet_migration.py
@@ -129,6 +129,7 @@ class WalletMigrationTest(BitcoinTestFramework):
assert_equal(w["warnings"], ["This wallet is a legacy wallet and will need to be migrated with migratewallet before it can be loaded"])
# Mock time so that we can check the backup filename.
+ time.sleep(1)
mocked_time = int(time.time())
self.master_node.setmocktime(mocked_time)
# Migrate, checking that rescan does not occur
```
Fixes #33096
ACKs for top commit:
fjahr:
reACK 4b80147
Sammie05:
tACK 4b80147
pablomartin4btc:
utACK 4b80147
rkrux:
ACK 4b80147
Tree-SHA512: 045d4acf2ad0b56a7083ff2ee5ef09f0d74ad097c01a290660daca096c71fc07109848024256d84f74abbc87dd52691d160f9968b3654726626d3dbd21a84ab61 file changed
+8
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| |||
148 | 149 | | |
149 | 150 | | |
150 | 151 | | |
151 | | - | |
| 152 | + | |
| 153 | + | |
152 | 154 | | |
| 155 | + | |
153 | 156 | | |
154 | 157 | | |
155 | 158 | | |
| |||
593 | 596 | | |
594 | 597 | | |
595 | 598 | | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | 599 | | |
601 | | - | |
602 | 600 | | |
603 | 601 | | |
604 | 602 | | |
| |||
665 | 663 | | |
666 | 664 | | |
667 | 665 | | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | 666 | | |
673 | | - | |
674 | 667 | | |
675 | 668 | | |
676 | 669 | | |
677 | 670 | | |
678 | 671 | | |
679 | 672 | | |
680 | 673 | | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
689 | 677 | | |
690 | 678 | | |
691 | 679 | | |
| |||
0 commit comments