aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-05-20 13:41:57 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-05-22 11:24:08 +0000
commit13864702f189f2ca47d93201bc7e7cc71a8abfc0 (patch)
tree74a766f4778ae892f63424a50c8bff446a3fd65c
parentMerge pull request #5548 (diff)
downloadmonero-13864702f189f2ca47d93201bc7e7cc71a8abfc0.tar.xz
functional_tests: fix rare get_output_distribution failure
When the wallet auto refreshes after mining the last two blocks but before popping them, it will then try to use outputs which are not unlocked yet. This is really a wallet problem, which will be fixed later.
-rwxr-xr-xtests/functional_tests/get_output_distribution.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/functional_tests/get_output_distribution.py b/tests/functional_tests/get_output_distribution.py
index 2a0762d5e..061b8dbe2 100755
--- a/tests/functional_tests/get_output_distribution.py
+++ b/tests/functional_tests/get_output_distribution.py
@@ -213,5 +213,14 @@ class GetOutputDistributionTest():
assert d.distribution[h] == 0
+class Guard:
+ def __enter__(self):
+ for i in range(4):
+ Wallet(idx = i).auto_refresh(False)
+ def __exit__(self, exc_type, exc_value, traceback):
+ for i in range(4):
+ Wallet(idx = i).auto_refresh(True)
+
if __name__ == '__main__':
- GetOutputDistributionTest().run_test()
+ with Guard() as guard:
+ GetOutputDistributionTest().run_test()