qa: Move wait_until to util

This commit is contained in:
MarcoFalke
2017-08-16 18:17:34 +02:00
parent 22e301a3d5
commit 08ce33f8e9
11 changed files with 78 additions and 89 deletions

View File

@@ -32,7 +32,6 @@ Test is as follows:
"""
import time
from test_framework.mininode import wait_until
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
@@ -69,7 +68,7 @@ class MempoolPersistTest(BitcoinTestFramework):
self.nodes.append(self.start_node(1, self.options.tmpdir))
# Give bitcoind a second to reload the mempool
time.sleep(1)
assert wait_until(lambda: len(self.nodes[0].getrawmempool()) == 5)
wait_until(lambda: len(self.nodes[0].getrawmempool()) == 5)
assert_equal(len(self.nodes[1].getrawmempool()), 0)
self.log.debug("Stop-start node0 with -persistmempool=0. Verify that it doesn't load its mempool.dat file.")
@@ -84,7 +83,7 @@ class MempoolPersistTest(BitcoinTestFramework):
self.stop_nodes()
self.nodes = []
self.nodes.append(self.start_node(0, self.options.tmpdir))
assert wait_until(lambda: len(self.nodes[0].getrawmempool()) == 5)
wait_until(lambda: len(self.nodes[0].getrawmempool()) == 5)
if __name__ == '__main__':
MempoolPersistTest().main()