From 8a0b933aaed45b8d58aaba5bd9a904bb7105cf08 Mon Sep 17 00:00:00 2001 From: Tom Harding Date: Thu, 9 Jul 2015 18:10:57 -0700 Subject: Fix intermittent test failure, reduce test time In txn_clone.py, non-essential test transaction tx2 was asserted to be unconfirmed, but would occasionally confirm depending on network behavior. Fix by explicitly sharing with miner and checking for 1 confirmation. Reduce required conflict tests from 4 to 2, by moving one invocation each of txn_clone.py and txn_doublespend.py to the extented test section. This saves about 15 seconds per test run for me. --- qa/rpc-tests/txn_clone.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'qa/rpc-tests/txn_clone.py') diff --git a/qa/rpc-tests/txn_clone.py b/qa/rpc-tests/txn_clone.py index 0d276ecc91..e8ced0e5bb 100755 --- a/qa/rpc-tests/txn_clone.py +++ b/qa/rpc-tests/txn_clone.py @@ -125,6 +125,8 @@ class TxnMallTest(BitcoinTestFramework): # Reconnect the split network, and sync chain: connect_nodes(self.nodes[1], 2) + self.nodes[2].sendrawtransaction(fund_bar_tx["hex"]) + self.nodes[2].sendrawtransaction(tx2["hex"]) self.nodes[2].generate(1) # Mine another block to make sure we sync sync_blocks(self.nodes) @@ -136,7 +138,7 @@ class TxnMallTest(BitcoinTestFramework): # Verify expected confirmations assert_equal(tx1["confirmations"], -1) assert_equal(tx1_clone["confirmations"], 2) - assert_equal(tx2["confirmations"], 0) + assert_equal(tx2["confirmations"], 1) # Check node0's total balance; should be same as before the clone, + 100 BTC for 2 matured, # less possible orphaned matured subsidy -- cgit v1.2.3