Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 3436ae1

Browse files
authored
stake-pool: Fix flaky test (#6151)
1 parent c01db92 commit 3436ae1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

stake-pool/program/tests/update_validator_list_balance.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ async fn merge_transient_stake_after_remove() {
661661

662662
#[tokio::test]
663663
async fn success_with_burned_tokens() {
664-
let num_validators = 5;
664+
let num_validators = 1;
665665
let (mut context, last_blockhash, stake_pool_accounts, _, deposit_accounts, _, _, mut slot) =
666666
setup(num_validators).await;
667667

@@ -693,6 +693,10 @@ async fn success_with_burned_tokens() {
693693
.await
694694
.unwrap();
695695

696+
let slots_per_epoch = context.genesis_config().epoch_schedule.slots_per_epoch;
697+
slot += slots_per_epoch;
698+
context.warp_to_slot(slot).unwrap();
699+
696700
let mint_info = get_account(
697701
&mut context.banks_client,
698702
&stake_pool_accounts.pool_mint.pubkey(),
@@ -701,10 +705,6 @@ async fn success_with_burned_tokens() {
701705
let mint = Mint::unpack(&mint_info.data).unwrap();
702706
assert_ne!(mint.supply, stake_pool.pool_token_supply);
703707

704-
let slots_per_epoch = context.genesis_config().epoch_schedule.slots_per_epoch;
705-
slot += slots_per_epoch;
706-
context.warp_to_slot(slot).unwrap();
707-
708708
stake_pool_accounts
709709
.update_all(
710710
&mut context.banks_client,

0 commit comments

Comments
 (0)