From f1874eaa55672adff48060249bf4d179b428d68f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Zemanovi=C4=8D?= Date: Tue, 11 Jul 2023 09:57:08 +0100 Subject: [PATCH] test/e2e/proposal_submission: wait for proposal to be committed --- tests/src/e2e/ledger_tests.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/src/e2e/ledger_tests.rs b/tests/src/e2e/ledger_tests.rs index 3c16d724e2..dbae6a6630 100644 --- a/tests/src/e2e/ledger_tests.rs +++ b/tests/src/e2e/ledger_tests.rs @@ -2893,7 +2893,7 @@ fn proposal_submission() -> Result<()> { run_as!(test, Who::Validator(0), Bin::Node, &["ledger"], Some(40))?; wait_for_wasm_pre_compile(&mut ledger)?; - let _bg_ledger = ledger.background(); + let bg_ledger = ledger.background(); let validator_one_rpc = get_actor_rpc(&test, &Who::Validator(0)); @@ -2944,6 +2944,11 @@ fn proposal_submission() -> Result<()> { client.exp_string("Transaction is valid.")?; client.assert_success(); + // Wait for the proposal to be committed + let mut ledger = bg_ledger.foreground(); + ledger.exp_string("Committed block hash")?; + let _bg_ledger = ledger.background(); + // 3. Query the proposal let proposal_query_args = vec![ "query-proposal",