imp: reduce integration test block time to 2s (#1428)

This commit is contained in:
Freddy Caceres 2022-11-02 18:37:23 -04:00 committed by GitHub
parent 457e25aabf
commit 192eb96358
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -6,7 +6,7 @@
config: {
consensus: {
// larger timeout for more stable mempool tests
timeout_commit: '10s',
timeout_commit: '2s',
},
mempool: {
// use v1 mempool to enable tx prioritization

View File

@ -45,7 +45,7 @@ def test_pruned_node(pruned):
signed = sign_transaction(w3, tx, KEYS["validator"])
txhash = w3.eth.send_raw_transaction(signed.rawTransaction)
print("wait for prunning happens")
w3_wait_for_new_blocks(w3, 10)
w3_wait_for_new_blocks(w3, 15)
tx_receipt = w3.eth.get_transaction_receipt(txhash.hex())
assert len(tx_receipt.logs) == 1

View File

@ -93,7 +93,7 @@ def test_cosmovisor_upgrade(custom_ethermint: Ethermint):
"""
cli = custom_ethermint.cosmos_cli()
height = cli.block_height()
target_height = height + 5
target_height = height + 10
print("upgrade height", target_height)
w3 = custom_ethermint.w3

View File

@ -80,7 +80,7 @@ def wait_for_new_blocks(cli, n):
def wait_for_block(cli, height, timeout=240):
for i in range(timeout * 2):
for _ in range(timeout * 2):
try:
status = cli.status()
except AssertionError as e:
@ -96,7 +96,7 @@ def wait_for_block(cli, height, timeout=240):
def w3_wait_for_block(w3, height, timeout=240):
for i in range(timeout * 2):
for _ in range(timeout * 2):
try:
current_height = w3.eth.block_number
except Exception as e: