Skip to content

Commit

Permalink
fix keyless test flakiness (#13764)
Browse files Browse the repository at this point in the history
  • Loading branch information
zjma authored Jun 20, 2024
1 parent 73d7e31 commit b25016a
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions testsuite/smoke-test/src/keyless.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

use crate::smoke_test_environment::SwarmBuilder;
use aptos::test::CliTestFramework;
use aptos::{common::types::GasOptions, test::CliTestFramework};
use aptos_cached_packages::aptos_stdlib;
use aptos_crypto::{
ed25519::{Ed25519PrivateKey, Ed25519PublicKey},
Expand Down Expand Up @@ -495,7 +495,15 @@ fun main(core_resources: &signer) {{
"#,
KEYLESS_ACCOUNT_MODULE_NAME, KEYLESS_ACCOUNT_MODULE_NAME
);
let txn_summary = cli.run_script(root_idx, &script).await.unwrap();
let gas_options = GasOptions {
gas_unit_price: Some(100),
max_gas: Some(2000000),
expiration_secs: 60,
};
let txn_summary = cli
.run_script_with_gas_options(root_idx, &script, Some(gas_options))
.await
.unwrap();
debug!("txn_summary={:?}", txn_summary);

// Increment sequence number as we ran a governance proposal
Expand Down Expand Up @@ -596,7 +604,15 @@ fun main(core_resources: &signer) {{
hex::encode(training_wheels_pk.to_bytes())
);

let txn_summary = cli.run_script(root_idx, &script).await.unwrap();
let gas_options = GasOptions {
gas_unit_price: Some(100),
max_gas: Some(2000000),
expiration_secs: 60,
};
let txn_summary = cli
.run_script_with_gas_options(root_idx, &script, Some(gas_options))
.await
.unwrap();
debug!("txn_summary={:?}", txn_summary);

info!("Use resource API to check the patch result.");
Expand Down Expand Up @@ -680,7 +696,15 @@ script {{
)
.await;

let txn_summary = cli.run_script(root_idx, &script).await.unwrap();
let gas_options = GasOptions {
gas_unit_price: Some(100),
max_gas: Some(2000000),
expiration_secs: 60,
};
let txn_summary = cli
.run_script_with_gas_options(root_idx, &script, Some(gas_options))
.await
.unwrap();
debug!("txn_summary={:?}", txn_summary);

// Increment sequence number as we ran a governance proposal
Expand Down

0 comments on commit b25016a

Please sign in to comment.