This repository was archived by the owner on Mar 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 9 files changed +14
-11
lines changed
token-lending/program/tests Expand file tree Collapse file tree 9 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ async fn test_success() {
18
18
) ;
19
19
20
20
// limit to track compute unit increase
21
- test. set_bpf_compute_max_units ( 31_000 ) ;
21
+ test. set_bpf_compute_max_units ( 35_000 ) ;
22
22
23
23
let user_accounts_owner = Keypair :: new ( ) ;
24
24
let usdc_mint = add_usdc_mint ( & mut test) ;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ async fn test_success() {
27
27
) ;
28
28
29
29
// limit to track compute unit increase
30
- test. set_bpf_compute_max_units ( 25_000 ) ;
30
+ test. set_bpf_compute_max_units ( 30_000 ) ;
31
31
32
32
const INITIAL_SOL_RESERVE_SUPPLY_LAMPORTS : u64 = 100 * LAMPORTS_TO_SOL ;
33
33
const INITIAL_USDC_RESERVE_SUPPLY_FRACTIONAL : u64 = 100 * FRACTIONAL_TO_USDC ;
Original file line number Diff line number Diff line change @@ -12,9 +12,12 @@ use spl_token_lending::{
12
12
} ;
13
13
14
14
#[ tokio:: test]
15
- async fn test_success ( ) {
15
+ async fn test_genesis_accounts ( ) {
16
16
let ( mut test, lending) = setup_test ( ) ;
17
17
18
+ // TODO: Remove this next line to restore 200,000 limit
19
+ test. set_bpf_compute_max_units ( 240_000 ) ;
20
+
18
21
let LendingTest {
19
22
sol_usdc_dex_market,
20
23
srm_usdc_dex_market,
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ async fn test_success() {
24
24
) ;
25
25
26
26
// limit to track compute unit increase
27
- test. set_bpf_compute_max_units ( 28_000 ) ;
27
+ test. set_bpf_compute_max_units ( 32_000 ) ;
28
28
29
29
let user_accounts_owner = Keypair :: new ( ) ;
30
30
let sol_usdc_dex_market = TestDexMarket :: setup ( & mut test, TestDexMarketPair :: SOL_USDC ) ;
@@ -83,7 +83,7 @@ async fn test_already_initialized() {
83
83
) ;
84
84
85
85
// limit to track compute unit increase
86
- test. set_bpf_compute_max_units ( 13_000 ) ;
86
+ test. set_bpf_compute_max_units ( 15_000 ) ;
87
87
88
88
let user_accounts_owner = Keypair :: new ( ) ;
89
89
let sol_usdc_dex_market = TestDexMarket :: setup ( & mut test, TestDexMarketPair :: SOL_USDC ) ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ async fn test_success() {
26
26
) ;
27
27
28
28
// limit to track compute unit increase
29
- test. set_bpf_compute_max_units ( 70_000 ) ;
29
+ test. set_bpf_compute_max_units ( 75_000 ) ;
30
30
31
31
let user_accounts_owner = Keypair :: new ( ) ;
32
32
let sol_usdc_dex_market = TestDexMarket :: setup ( & mut test, TestDexMarketPair :: SOL_USDC ) ;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ async fn test_success() {
24
24
) ;
25
25
26
26
// limit to track compute unit increase
27
- test. set_bpf_compute_max_units ( 97_000 ) ;
27
+ test. set_bpf_compute_max_units ( 200_000 ) ;
28
28
29
29
// set loan values to about 90% of collateral value so that it gets liquidated
30
30
// assumes SOL is ~$14
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ async fn test_success() {
29
29
) ;
30
30
31
31
// limit to track compute unit increase
32
- test. set_bpf_compute_max_units ( 51_000 ) ;
32
+ test. set_bpf_compute_max_units ( 55_000 ) ;
33
33
34
34
const INITIAL_SOL_RESERVE_SUPPLY_LAMPORTS : u64 = 100 * LAMPORTS_TO_SOL ;
35
35
const INITIAL_USDC_RESERVE_SUPPLY_FRACTIONAL : u64 = 100 * FRACTIONAL_TO_USDC ;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ async fn test_success() {
27
27
) ;
28
28
29
29
// limit to track compute unit increase
30
- test. set_bpf_compute_max_units ( 33_000 ) ;
30
+ test. set_bpf_compute_max_units ( 35_000 ) ;
31
31
32
32
let user_accounts_owner = Keypair :: new ( ) ;
33
33
let usdc_mint = add_usdc_mint ( & mut test) ;
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ async fn test_success() {
33
33
) ;
34
34
35
35
// limit to track compute unit increase
36
- test. set_bpf_compute_max_units ( 84_000 ) ;
36
+ test. set_bpf_compute_max_units ( 190_000 ) ;
37
37
38
38
const INITIAL_SOL_RESERVE_SUPPLY_LAMPORTS : u64 = 100 * LAMPORTS_TO_SOL ;
39
39
const INITIAL_USDC_RESERVE_SUPPLY_FRACTIONAL : u64 = 100 * FRACTIONAL_TO_USDC ;
@@ -196,7 +196,7 @@ async fn test_withdraw_below_required() {
196
196
) ;
197
197
198
198
// limit to track compute unit increase
199
- test. set_bpf_compute_max_units ( 84_000 ) ;
199
+ test. set_bpf_compute_max_units ( 180_000 ) ;
200
200
201
201
const INITIAL_SOL_RESERVE_SUPPLY_LAMPORTS : u64 = 100 * LAMPORTS_TO_SOL ;
202
202
const INITIAL_USDC_RESERVE_SUPPLY_FRACTIONAL : u64 = 100 * FRACTIONAL_TO_USDC ;
You can’t perform that action at this time.
0 commit comments