Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Oct 30, 2023
1 parent b804a2b commit a8c30d4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
14 changes: 11 additions & 3 deletions integration_tests/ibc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ def gen_send_msg(sender, receiver, denom, amount):
}


def log_gas_records(cli):
def log_gas_records(cli, print_info=False):
criteria = "tx.height >= 0"
txs = cli.tx_search_rpc(criteria)
records = []
Expand All @@ -670,5 +670,13 @@ def log_gas_records(cli):
for attribute in event["attributes"]:
if attribute["key"] == "action":
actions.append(attribute["value"])
records.append(res["gas_used"])
print("records", records)
if res["gas_used"]:
records.append(res["gas_used"])
if print_info:
info = {
"hash": tx["hash"],
"gas_wanted": res["gas_wanted"],
"gas_used": res["gas_used"],
"actions": actions,
}
print(info)
2 changes: 1 addition & 1 deletion integration_tests/test_ibc_rly.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
@pytest.fixture(scope="module")
def ibc(request, tmp_path_factory):
"prepare-network"
name = "ibc_rly"
name = "ibc_rly_evm"
path = tmp_path_factory.mktemp(name)
yield from prepare_network(
path,
Expand Down
3 changes: 1 addition & 2 deletions integration_tests/test_ibc_rly_gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ def test_ibc(ibc):
rly_transfer(ibc)
diff = 0.001
record = log_gas_records(cli)
if record:
records.append(record)
records.append(record)
if len(records) == 2:
for e1, e2 in zip(*records):
res = e2 / e1
Expand Down

0 comments on commit a8c30d4

Please sign in to comment.