Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.2: Fix flaky banking stage tests (backport of #5160) #5165

Open
wants to merge 2 commits into
base: v2.2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 4 additions & 22 deletions core/src/banking_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1078,14 +1078,8 @@ mod tests {
Blockstore::open(ledger_path.path())
.expect("Expected to be able to open database ledger"),
);
let poh_config = PohConfig {
// limit tick count to avoid clearing working_bank at PohRecord then
// PohRecorderError(MaxHeightReached) at BankingStage
target_tick_count: Some(bank.max_tick_height() - 1),
..PohConfig::default()
};
let (exit, poh_recorder, poh_service, entry_receiver) =
create_test_recorder(bank.clone(), blockstore, Some(poh_config), None);
create_test_recorder(bank.clone(), blockstore, None, None);
let (_, cluster_info) = new_test_cluster_info(/*keypair:*/ None);
let cluster_info = Arc::new(cluster_info);
let (replay_vote_sender, _replay_vote_receiver) = unbounded();
Expand Down Expand Up @@ -1256,14 +1250,8 @@ mod tests {
Blockstore::open(ledger_path.path())
.expect("Expected to be able to open database ledger"),
);
let poh_config = PohConfig {
// limit tick count to avoid clearing working_bank at
// PohRecord then PohRecorderError(MaxHeightReached) at BankingStage
target_tick_count: Some(bank.max_tick_height() - 1),
..PohConfig::default()
};
let (exit, poh_recorder, poh_service, entry_receiver) =
create_test_recorder(bank.clone(), blockstore, Some(poh_config), None);
create_test_recorder(bank.clone(), blockstore, None, None);
let (_, cluster_info) = new_test_cluster_info(/*keypair:*/ None);
let cluster_info = Arc::new(cluster_info);
let _banking_stage = BankingStage::new(
Expand Down Expand Up @@ -1401,7 +1389,7 @@ mod tests {
);

// For these tests there's only 1 slot, don't want to run out of ticks
config_info.genesis_config.ticks_per_slot *= 8;
config_info.genesis_config.ticks_per_slot *= 1024;
config_info
}

Expand Down Expand Up @@ -1452,14 +1440,8 @@ mod tests {
Blockstore::open(ledger_path.path())
.expect("Expected to be able to open database ledger"),
);
let poh_config = PohConfig {
// limit tick count to avoid clearing working_bank at PohRecord then
// PohRecorderError(MaxHeightReached) at BankingStage
target_tick_count: Some(bank.max_tick_height() - 1),
..PohConfig::default()
};
let (exit, poh_recorder, poh_service, _entry_receiver) =
create_test_recorder(bank.clone(), blockstore, Some(poh_config), None);
create_test_recorder(bank.clone(), blockstore, None, None);
let (_, cluster_info) = new_test_cluster_info(/*keypair:*/ None);
let cluster_info = Arc::new(cluster_info);
let (replay_vote_sender, _replay_vote_receiver) = unbounded();
Expand Down
Loading