Skip to content

Commit

Permalink
trigger timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Feb 17, 2024
1 parent 6cb49a5 commit 0c167c3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions integration_tests/test_ica.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def ibc(request, tmp_path_factory):
name,
incentivized=False,
connection_only=True,
relayer=cluster.Relayer.RLY.value,
relayer=cluster.Relayer.HERMES.value,
)


Expand Down Expand Up @@ -109,18 +109,19 @@ def generated_tx_txt(msg_num):

no_timeout = 60

def submit_msgs(msg_num, timeout_in_s=no_timeout, gas="200000"):
def submit_msgs(msg_num, t=no_timeout, gas="200000"):
num_txs = len(cli_host.query_all_txs(ica_address)["txs"])
# submit transaction on host chain on behalf of interchain account
timeout_duration = f"{t}ns" if t < no_timeout else f"{no_timeout}s"
rsp = cli_controller.icaauth_submit_tx(
connid,
generated_tx_txt(msg_num),
timeout_duration=f"{timeout_in_s}s",
timeout_duration=timeout_duration,
gas=gas,
from_="signer2",
)
assert rsp["code"] == 0, rsp["raw_log"]
timeout = timeout_in_s + 3 if timeout_in_s < no_timeout else None
timeout = t + 3 if t < no_timeout else None
wait_for_check_tx(cli_host, ica_address, num_txs, timeout)

# submit large txs to trigger timeout
Expand Down

0 comments on commit 0c167c3

Please sign in to comment.