Skip to content

Commit

Permalink
Merge branch 'tomas/fix-flakey-e2e' (#1700)
Browse files Browse the repository at this point in the history
* origin/tomas/fix-flakey-e2e:
  test/e2e/proposal_submission: wait for proposal to be committed
  test/e2e/double_signing: path for validator copy that keeps logs in CI
  • Loading branch information
Fraccaman committed Jul 13, 2023
2 parents 4bc441e + f1874ea commit 4401da8
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions tests/src/e2e/ledger_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -4413,8 +4418,13 @@ fn double_signing_gets_slashed() -> Result<()> {

// 2. Copy the first genesis validator base-dir
let validator_0_base_dir = test.get_base_dir(&Who::Validator(0));
let validator_0_base_dir_copy =
test.test_dir.path().join("validator-0-copy");
let validator_0_base_dir_copy = test
.test_dir
.path()
.join(test.net.chain_id.as_str())
.join(client::utils::NET_ACCOUNTS_DIR)
.join("validator-0-copy")
.join(namada_apps::config::DEFAULT_BASE_DIR);
fs_extra::dir::copy(
validator_0_base_dir,
&validator_0_base_dir_copy,
Expand Down

0 comments on commit 4401da8

Please sign in to comment.