Skip to content

Commit

Permalink
[aggregator] Improve event testing (#12113)
Browse files Browse the repository at this point in the history
Tests compare events in a nicer fashion, and all transaction outputs are compared for
both sequential/parallel and enabled/disabled flags.
  • Loading branch information
georgemitenkov authored Feb 27, 2024
1 parent b90e264 commit 76e2c37
Show file tree
Hide file tree
Showing 3 changed files with 154 additions and 193 deletions.
8 changes: 6 additions & 2 deletions aptos-move/e2e-move-tests/src/aggregator_v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ use aptos_language_e2e_tests::{
executor::{assert_outputs_equal, ExecutorMode, FakeExecutor},
};
use aptos_types::{
account_address::AccountAddress, on_chain_config::FeatureFlag, transaction::SignedTransaction,
account_address::AccountAddress,
on_chain_config::FeatureFlag,
transaction::{SignedTransaction, TransactionOutput},
};
use move_core_types::{
ident_str,
Expand Down Expand Up @@ -185,7 +187,7 @@ impl AggV2TestHarness {
&mut self,
block_split: BlockSplit,
txn_block: Vec<(u64, SignedTransaction)>,
) {
) -> Vec<TransactionOutput> {
let result = self
.harness
.run_block_in_parts_and_check(block_split, txn_block.clone());
Expand All @@ -194,6 +196,8 @@ impl AggV2TestHarness {
let new_result = h.run_block_in_parts_and_check(block_split, txn_block.clone());
assert_outputs_equal(&result, "baseline", &new_result, name);
}

result
}

pub fn initialize_issuer_accounts(&mut self, num_accounts: usize) {
Expand Down
2 changes: 1 addition & 1 deletion aptos-move/e2e-move-tests/src/tests/aggregator_v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn _setup(
}
}

fn setup(
pub(crate) fn setup(
executor_mode: ExecutorMode,
aggregator_execution_mode: AggregatorMode,
txns: usize,
Expand Down
Loading

0 comments on commit 76e2c37

Please sign in to comment.