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
:
0diff --git a/test/functional/wallet_migration.py b/test/functional/wallet_migration.py
1index 704204425c7..e87a6100623 100755
2--- a/test/functional/wallet_migration.py
3+++ b/test/functional/wallet_migration.py
4@@ -129,6 +129,7 @@ class WalletMigrationTest(BitcoinTestFramework):
5 assert_equal(w["warnings"], ["This wallet is a legacy wallet and will need to be migrated with migratewallet before it can be loaded"])
6
7 # Mock time so that we can check the backup filename.
8+ time.sleep(1)
9 mocked_time = int(time.time())
10 self.master_node.setmocktime(mocked_time)
11 # Migrate, checking that rescan does not occur
Fixes #33096