Skip to content

Commit ff5e547

Browse files
roryharrksn6
authored andcommitted
Rename upsert reclaims accounts index test default define (#7325)
Renaming UPSERT_POPULATE_RECLAIMS to UPSERT_RECLAIM_TEST_DEFAULT
1 parent e74bf1d commit ff5e547

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

accounts-db/src/accounts_index.rs

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1929,7 +1929,7 @@ pub mod tests {
19291929
assert!(index.include_key(&pk2));
19301930
}
19311931

1932-
const UPSERT_POPULATE_RECLAIMS: UpsertReclaim = UpsertReclaim::PopulateReclaims;
1932+
const UPSERT_RECLAIM_TEST_DEFAULT: UpsertReclaim = UpsertReclaim::PopulateReclaims;
19331933

19341934
#[test]
19351935
fn test_insert_no_ancestors() {
@@ -1944,7 +1944,7 @@ pub mod tests {
19441944
&AccountSecondaryIndexes::default(),
19451945
true,
19461946
&mut gc,
1947-
UPSERT_POPULATE_RECLAIMS,
1947+
UPSERT_RECLAIM_TEST_DEFAULT,
19481948
);
19491949
assert!(gc.is_empty());
19501950

@@ -2113,7 +2113,7 @@ pub mod tests {
21132113
&AccountSecondaryIndexes::default(),
21142114
account_info,
21152115
&mut gc,
2116-
UPSERT_POPULATE_RECLAIMS,
2116+
UPSERT_RECLAIM_TEST_DEFAULT,
21172117
);
21182118

21192119
assert!(gc.is_empty());
@@ -2314,7 +2314,7 @@ pub mod tests {
23142314
&AccountSecondaryIndexes::default(),
23152315
account_infos[0],
23162316
&mut gc,
2317-
UPSERT_POPULATE_RECLAIMS,
2317+
UPSERT_RECLAIM_TEST_DEFAULT,
23182318
);
23192319
} else {
23202320
let items = vec![(key, account_infos[0])];
@@ -2355,7 +2355,7 @@ pub mod tests {
23552355
&AccountSecondaryIndexes::default(),
23562356
account_infos[1],
23572357
&mut gc,
2358-
UPSERT_POPULATE_RECLAIMS,
2358+
UPSERT_RECLAIM_TEST_DEFAULT,
23592359
);
23602360
} else {
23612361
// this has the effect of aging out everything in the in-mem cache
@@ -2424,7 +2424,7 @@ pub mod tests {
24242424
new_entry,
24252425
None,
24262426
&mut SlotList::default(),
2427-
UPSERT_POPULATE_RECLAIMS,
2427+
UPSERT_RECLAIM_TEST_DEFAULT,
24282428
);
24292429
assert_eq!(1, account_maps_stats_len(&index));
24302430

@@ -2464,7 +2464,7 @@ pub mod tests {
24642464
&AccountSecondaryIndexes::default(),
24652465
true,
24662466
&mut gc,
2467-
UPSERT_POPULATE_RECLAIMS,
2467+
UPSERT_RECLAIM_TEST_DEFAULT,
24682468
);
24692469
assert!(gc.is_empty());
24702470

@@ -2588,7 +2588,7 @@ pub mod tests {
25882588
&AccountSecondaryIndexes::default(),
25892589
true,
25902590
&mut gc,
2591-
UPSERT_POPULATE_RECLAIMS,
2591+
UPSERT_RECLAIM_TEST_DEFAULT,
25922592
);
25932593
assert!(gc.is_empty());
25942594

@@ -2637,7 +2637,7 @@ pub mod tests {
26372637
&AccountSecondaryIndexes::default(),
26382638
true,
26392639
&mut vec![],
2640-
UPSERT_POPULATE_RECLAIMS,
2640+
UPSERT_RECLAIM_TEST_DEFAULT,
26412641
);
26422642
new_pubkey
26432643
})
@@ -2654,7 +2654,7 @@ pub mod tests {
26542654
&AccountSecondaryIndexes::default(),
26552655
true,
26562656
&mut vec![],
2657-
UPSERT_POPULATE_RECLAIMS,
2657+
UPSERT_RECLAIM_TEST_DEFAULT,
26582658
);
26592659
}
26602660

@@ -2709,7 +2709,7 @@ pub mod tests {
27092709
&AccountSecondaryIndexes::default(),
27102710
true,
27112711
&mut gc,
2712-
UPSERT_POPULATE_RECLAIMS,
2712+
UPSERT_RECLAIM_TEST_DEFAULT,
27132713
);
27142714
assert!(gc.is_empty());
27152715

@@ -2757,7 +2757,7 @@ pub mod tests {
27572757
&AccountSecondaryIndexes::default(),
27582758
true,
27592759
&mut gc,
2760-
UPSERT_POPULATE_RECLAIMS,
2760+
UPSERT_RECLAIM_TEST_DEFAULT,
27612761
);
27622762
assert!(gc.is_empty());
27632763
index
@@ -2782,7 +2782,7 @@ pub mod tests {
27822782
&AccountSecondaryIndexes::default(),
27832783
false,
27842784
&mut gc,
2785-
UPSERT_POPULATE_RECLAIMS,
2785+
UPSERT_RECLAIM_TEST_DEFAULT,
27862786
);
27872787
assert_eq!(gc, vec![(0, true)]);
27882788
index
@@ -2814,7 +2814,7 @@ pub mod tests {
28142814
&AccountSecondaryIndexes::default(),
28152815
true,
28162816
&mut gc,
2817-
UPSERT_POPULATE_RECLAIMS,
2817+
UPSERT_RECLAIM_TEST_DEFAULT,
28182818
);
28192819
assert!(gc.is_empty());
28202820
index.upsert(
@@ -2825,7 +2825,7 @@ pub mod tests {
28252825
&AccountSecondaryIndexes::default(),
28262826
false,
28272827
&mut gc,
2828-
UPSERT_POPULATE_RECLAIMS,
2828+
UPSERT_RECLAIM_TEST_DEFAULT,
28292829
);
28302830
assert!(gc.is_empty());
28312831
index
@@ -2868,7 +2868,7 @@ pub mod tests {
28682868
&AccountSecondaryIndexes::default(),
28692869
true,
28702870
&mut gc,
2871-
UPSERT_POPULATE_RECLAIMS,
2871+
UPSERT_RECLAIM_TEST_DEFAULT,
28722872
);
28732873
assert!(gc.is_empty());
28742874
index.upsert(
@@ -2879,7 +2879,7 @@ pub mod tests {
28792879
&AccountSecondaryIndexes::default(),
28802880
false,
28812881
&mut gc,
2882-
UPSERT_POPULATE_RECLAIMS,
2882+
UPSERT_RECLAIM_TEST_DEFAULT,
28832883
);
28842884
index.upsert(
28852885
2,
@@ -2889,7 +2889,7 @@ pub mod tests {
28892889
&AccountSecondaryIndexes::default(),
28902890
true,
28912891
&mut gc,
2892-
UPSERT_POPULATE_RECLAIMS,
2892+
UPSERT_RECLAIM_TEST_DEFAULT,
28932893
);
28942894
index.upsert(
28952895
3,
@@ -2899,7 +2899,7 @@ pub mod tests {
28992899
&AccountSecondaryIndexes::default(),
29002900
true,
29012901
&mut gc,
2902-
UPSERT_POPULATE_RECLAIMS,
2902+
UPSERT_RECLAIM_TEST_DEFAULT,
29032903
);
29042904
index.add_root(0);
29052905
index.add_root(1);
@@ -2912,7 +2912,7 @@ pub mod tests {
29122912
&AccountSecondaryIndexes::default(),
29132913
true,
29142914
&mut gc,
2915-
UPSERT_POPULATE_RECLAIMS,
2915+
UPSERT_RECLAIM_TEST_DEFAULT,
29162916
);
29172917

29182918
// Updating index should not purge older roots, only purges
@@ -2961,7 +2961,7 @@ pub mod tests {
29612961
&AccountSecondaryIndexes::default(),
29622962
12,
29632963
&mut gc,
2964-
UPSERT_POPULATE_RECLAIMS,
2964+
UPSERT_RECLAIM_TEST_DEFAULT,
29652965
);
29662966
assert_eq!(1, account_maps_stats_len(&index));
29672967

@@ -2973,7 +2973,7 @@ pub mod tests {
29732973
&AccountSecondaryIndexes::default(),
29742974
10,
29752975
&mut gc,
2976-
UPSERT_POPULATE_RECLAIMS,
2976+
UPSERT_RECLAIM_TEST_DEFAULT,
29772977
);
29782978
assert_eq!(1, account_maps_stats_len(&index));
29792979

@@ -2993,7 +2993,7 @@ pub mod tests {
29932993
&AccountSecondaryIndexes::default(),
29942994
9,
29952995
&mut gc,
2996-
UPSERT_POPULATE_RECLAIMS,
2996+
UPSERT_RECLAIM_TEST_DEFAULT,
29972997
);
29982998
assert_eq!(1, account_maps_stats_len(&index));
29992999
}
@@ -3082,7 +3082,7 @@ pub mod tests {
30823082
secondary_indexes,
30833083
true,
30843084
&mut vec![],
3085-
UPSERT_POPULATE_RECLAIMS,
3085+
UPSERT_RECLAIM_TEST_DEFAULT,
30863086
);
30873087
}
30883088

@@ -3257,7 +3257,7 @@ pub mod tests {
32573257
&secondary_indexes,
32583258
true,
32593259
&mut vec![],
3260-
UPSERT_POPULATE_RECLAIMS,
3260+
UPSERT_RECLAIM_TEST_DEFAULT,
32613261
);
32623262
assert!(secondary_index.index.is_empty());
32633263
assert!(secondary_index.reverse_index.is_empty());
@@ -3271,7 +3271,7 @@ pub mod tests {
32713271
&secondary_indexes,
32723272
true,
32733273
&mut vec![],
3274-
UPSERT_POPULATE_RECLAIMS,
3274+
UPSERT_RECLAIM_TEST_DEFAULT,
32753275
);
32763276
assert!(secondary_index.index.is_empty());
32773277
assert!(secondary_index.reverse_index.is_empty());
@@ -3396,7 +3396,7 @@ pub mod tests {
33963396
secondary_indexes,
33973397
true,
33983398
&mut vec![],
3399-
UPSERT_POPULATE_RECLAIMS,
3399+
UPSERT_RECLAIM_TEST_DEFAULT,
34003400
);
34013401

34023402
// Now write a different mint index for the same account
@@ -3408,7 +3408,7 @@ pub mod tests {
34083408
secondary_indexes,
34093409
true,
34103410
&mut vec![],
3411-
UPSERT_POPULATE_RECLAIMS,
3411+
UPSERT_RECLAIM_TEST_DEFAULT,
34123412
);
34133413

34143414
// Both pubkeys will now be present in the index
@@ -3428,7 +3428,7 @@ pub mod tests {
34283428
secondary_indexes,
34293429
true,
34303430
&mut vec![],
3431-
UPSERT_POPULATE_RECLAIMS,
3431+
UPSERT_RECLAIM_TEST_DEFAULT,
34323432
);
34333433
assert_eq!(secondary_index.get(&secondary_key1), vec![account_key]);
34343434

@@ -3595,7 +3595,7 @@ pub mod tests {
35953595
&AccountSecondaryIndexes::default(),
35963596
value,
35973597
&mut gc,
3598-
UPSERT_POPULATE_RECLAIMS,
3598+
UPSERT_RECLAIM_TEST_DEFAULT,
35993599
);
36003600
assert!(gc.is_empty());
36013601
}

0 commit comments

Comments
 (0)