test: Bump timeouts in slow running tests

This commit is contained in:
MarcoFalke 2019-09-16 13:19:29 -04:00
parent cd737214ce
commit fa502cb6f0
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548
7 changed files with 10 additions and 7 deletions

View File

@ -40,7 +40,7 @@ from test_framework.messages import (
CTxIn, CTxIn,
CTxOut, CTxOut,
msg_block, msg_block,
msg_headers msg_headers,
) )
from test_framework.mininode import P2PInterface from test_framework.mininode import P2PInterface
from test_framework.script import (CScript, OP_TRUE) from test_framework.script import (CScript, OP_TRUE)
@ -180,7 +180,7 @@ class AssumeValidTest(BitcoinTestFramework):
for i in range(2202): for i in range(2202):
p2p1.send_message(msg_block(self.blocks[i])) p2p1.send_message(msg_block(self.blocks[i]))
# Syncing 2200 blocks can take a while on slow systems. Give it plenty of time to sync. # Syncing 2200 blocks can take a while on slow systems. Give it plenty of time to sync.
p2p1.sync_with_ping(200) p2p1.sync_with_ping(960)
assert_equal(self.nodes[1].getblock(self.nodes[1].getbestblockhash())['height'], 2202) assert_equal(self.nodes[1].getblock(self.nodes[1].getbestblockhash())['height'], 2202)
# Send blocks to node2. Block 102 will be rejected. # Send blocks to node2. Block 102 will be rejected.

View File

@ -1261,7 +1261,7 @@ class FullBlockTest(BitcoinTestFramework):
self.save_spendable_output() self.save_spendable_output()
spend = self.get_spendable_output() spend = self.get_spendable_output()
self.send_blocks(blocks, True, timeout=480) self.send_blocks(blocks, True, timeout=960)
chain1_tip = i chain1_tip = i
# now create alt chain of same length # now create alt chain of same length
@ -1273,14 +1273,14 @@ class FullBlockTest(BitcoinTestFramework):
# extend alt chain to trigger re-org # extend alt chain to trigger re-org
block = self.next_block("alt" + str(chain1_tip + 1), version=4) block = self.next_block("alt" + str(chain1_tip + 1), version=4)
self.send_blocks([block], True, timeout=480) self.send_blocks([block], True, timeout=960)
# ... and re-org back to the first chain # ... and re-org back to the first chain
self.move_tip(chain1_tip) self.move_tip(chain1_tip)
block = self.next_block(chain1_tip + 1, version=4) block = self.next_block(chain1_tip + 1, version=4)
self.send_blocks([block], False, force_send=True) self.send_blocks([block], False, force_send=True)
block = self.next_block(chain1_tip + 2, version=4) block = self.next_block(chain1_tip + 2, version=4)
self.send_blocks([block], True, timeout=480) self.send_blocks([block], True, timeout=960)
self.log.info("Reject a block with an invalid block header version") self.log.info("Reject a block with an invalid block header version")
b_v1 = self.next_block('b_v1', version=1) b_v1 = self.next_block('b_v1', version=1)

View File

@ -50,7 +50,7 @@ class ChainstateWriteCrashTest(BitcoinTestFramework):
def set_test_params(self): def set_test_params(self):
self.num_nodes = 4 self.num_nodes = 4
self.setup_clean_chain = False self.setup_clean_chain = False
self.rpc_timeout = 180 self.rpc_timeout = 480
# Set -maxmempool=0 to turn off mempool memory sharing with dbcache # Set -maxmempool=0 to turn off mempool memory sharing with dbcache
# Set -rpcservertimeout=900 to reduce socket disconnects in this # Set -rpcservertimeout=900 to reduce socket disconnects in this

View File

@ -92,6 +92,7 @@ class PruneTest(BitcoinTestFramework):
["-maxreceivebuffer=20000"], ["-maxreceivebuffer=20000"],
["-prune=550"], ["-prune=550"],
] ]
self.rpc_timeout = 120
def skip_test_if_missing_module(self): def skip_test_if_missing_module(self):
self.skip_if_no_wallet() self.skip_if_no_wallet()

View File

@ -85,7 +85,7 @@ class InvalidMessagesTest(BitcoinTestFramework):
# Peer 1, despite serving up a bunch of nonsense, should still be connected. # Peer 1, despite serving up a bunch of nonsense, should still be connected.
self.log.info("Waiting for node to drop junk messages.") self.log.info("Waiting for node to drop junk messages.")
node.p2p.sync_with_ping(timeout=120) node.p2p.sync_with_ping(timeout=320)
assert node.p2p.is_connected assert node.p2p.is_connected
# #

View File

@ -19,6 +19,7 @@ class ToolWalletTest(BitcoinTestFramework):
def set_test_params(self): def set_test_params(self):
self.num_nodes = 1 self.num_nodes = 1
self.setup_clean_chain = True self.setup_clean_chain = True
self.rpc_timeout = 120
def skip_test_if_missing_module(self): def skip_test_if_missing_module(self):
self.skip_if_no_wallet() self.skip_if_no_wallet()

View File

@ -49,6 +49,7 @@ class WalletBackupTest(BitcoinTestFramework):
self.setup_clean_chain = True self.setup_clean_chain = True
# nodes 1, 2,3 are spenders, let's give them a keypool=100 # nodes 1, 2,3 are spenders, let's give them a keypool=100
self.extra_args = [["-keypool=100"], ["-keypool=100"], ["-keypool=100"], []] self.extra_args = [["-keypool=100"], ["-keypool=100"], ["-keypool=100"], []]
self.rpc_timeout = 120
def skip_test_if_missing_module(self): def skip_test_if_missing_module(self):
self.skip_if_no_wallet() self.skip_if_no_wallet()