From 5fb1b85c20fa4f542ca4451b1743dda8e0b306ac Mon Sep 17 00:00:00 2001 From: Martin Kourim Date: Tue, 18 Jan 2022 15:17:59 +0100 Subject: [PATCH 1/2] More time for errors to make it to log files --- cardano_node_tests/tests/test_kes.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cardano_node_tests/tests/test_kes.py b/cardano_node_tests/tests/test_kes.py index 2210cb3f4..712980771 100644 --- a/cardano_node_tests/tests/test_kes.py +++ b/cardano_node_tests/tests/test_kes.py @@ -138,8 +138,10 @@ def test_expired_kes( kes_period_timeout = int(cluster.slots_per_kes_period * cluster.slot_length + 1) LOGGER.info(f"Waiting for {kes_period_timeout} sec for next KES period.") time.sleep(kes_period_timeout) + assert cluster.get_slot_no() == init_slot, "Unexpected new slots" - assert cluster.get_slot_no() == init_slot, "Unexpected new slots" + LOGGER.info("Waiting 120 secs to make sure the expected errors make it to log files.") + time.sleep(120) @allure.link(helpers.get_vcs_link()) @pytest.mark.order(6) From c14dbb347b0a180cf72ee298e1cf79b1f305004e Mon Sep 17 00:00:00 2001 From: Martin Kourim Date: Tue, 18 Jan 2022 15:18:36 +0100 Subject: [PATCH 2/2] Use `build-raw` instead of `build` The `transaction build` command doesn't work when TX era is different from network era. --- cardano_node_tests/tests/test_staking.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/cardano_node_tests/tests/test_staking.py b/cardano_node_tests/tests/test_staking.py index 2bba1021b..43cbda0dc 100644 --- a/cardano_node_tests/tests/test_staking.py +++ b/cardano_node_tests/tests/test_staking.py @@ -881,25 +881,17 @@ def _mir_tx(fund_src: str) -> clusterlib.TxRawOutput: *cluster.genesis_keys.delegate_skeys, ], ) - mir_tx_raw_output = cluster.build_tx( - src_address=pool_owner.payment.address, - tx_name=f"{temp_template}_{fund_src}", - tx_files=mir_tx_files, - fee_buffer=1000_000, - witness_override=2, - ) - mir_tx_signed = cluster.sign_tx( - tx_body_file=mir_tx_raw_output.out_file, - signing_key_files=mir_tx_files.signing_key_files, - tx_name=f"{temp_template}_{fund_src}", - ) LOGGER.info( f"Submitting MIR cert for tranferring funds from {fund_src} to " f"'{pool_reward.stake.address}' in epoch {cluster.get_epoch()} " f"on cluster instance {cluster_manager.cluster_instance_num}" ) - cluster.submit_tx(tx_file=mir_tx_signed, txins=mir_tx_raw_output.txins) + mir_tx_raw_output = cluster.send_tx( + src_address=pool_owner.payment.address, + tx_name=f"{temp_template}_{fund_src}", + tx_files=mir_tx_files, + ) return mir_tx_raw_output