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

Commit 0a0a6d9

Browse files
authored
token-2022: Try to fix flaky test (#2874)
1 parent 2d357e8 commit 0a0a6d9

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

token/program-2022/tests/transfer_fee.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,9 +1054,8 @@ async fn create_and_transfer_to_account(
10541054
amount: u64,
10551055
decimals: u8,
10561056
) -> Pubkey {
1057-
let account = Keypair::new();
10581057
let account = token
1059-
.create_auxiliary_token_account(&account, owner)
1058+
.create_auxiliary_token_account(&Keypair::new(), owner)
10601059
.await
10611060
.unwrap();
10621061
token
@@ -1108,18 +1107,6 @@ async fn harvest_withheld_tokens_to_mint() {
11081107
let extension = state.get_extension::<TransferFeeConfig>().unwrap();
11091108
assert_eq!(extension.withheld_amount, accumulated_fees.into());
11101109

1111-
// harvest again from the same account
1112-
token
1113-
.harvest_withheld_tokens_to_mint(&[&account])
1114-
.await
1115-
.unwrap();
1116-
let state = token.get_account_info(&account).await.unwrap();
1117-
let extension = state.get_extension::<TransferFeeAmount>().unwrap();
1118-
assert_eq!(extension.withheld_amount, 0.into());
1119-
let state = token.get_mint_info().await.unwrap();
1120-
let extension = state.get_extension::<TransferFeeConfig>().unwrap();
1121-
assert_eq!(extension.withheld_amount, accumulated_fees.into());
1122-
11231110
// no fail harvesting from account belonging to different mint, but nothing
11241111
// happens
11251112
let account = create_and_transfer_to_account(

0 commit comments

Comments
 (0)