Skip to content

Commit 29a5bf8

Browse files
authored
fix(nightly): running lib tests (#2803)
allows running unit tests in Nightly
1 parent 79a777a commit 29a5bf8

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

chain/chain/src/store.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2818,6 +2818,7 @@ mod tests {
28182818
}
28192819

28202820
/// Test that MAX_HEIGHTS_TO_CLEAR works properly
2821+
#[cfg(feature = "expensive_tests")]
28212822
#[test]
28222823
fn test_clear_old_data_too_many_heights() {
28232824
let mut chain = get_chain_with_epoch_length(1);

nightly/nightly.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ expensive --timeout=900 near-chain gc tests::test_gc_random_large
135135
expensive --timeout=600 near-chain gc tests::test_gc_pine
136136
expensive --timeout=600 near-chain gc tests::test_gc_star_large
137137

138+
# lib tests
139+
lib near-chunks test::test_seal_removal
140+
lib near-chain store::tests::test_clear_old_data_too_many_heights
141+
138142
# other tests
139143
expensive nearcore test_simple test::test_2_10_multiple_nodes
140144
expensive nearcore test_simple test::test_4_10_multiple_nodes
@@ -143,4 +147,3 @@ expensive nearcore test_simple test::test_7_10_multiple_nodes
143147
expensive nearcore test_rejoin test::test_4_20_kill1
144148
expensive nearcore test_rejoin test::test_4_20_kill1_two_shards
145149
expensive nearcore test_rejoin test::test_4_20_kill2
146-
expensive nearcore near-chunks test_seal_removal

scripts/check_nightly.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ def nightly_tests():
6262
ret = set()
6363
for test in tests:
6464
t = test.strip().split(' ')
65-
if t[0] == 'expensive' or (t[0] == '#' and t[1] == 'expensive'):
66-
# It's okay to comment out a very expensive test intentionally
65+
if t[0] == 'expensive' or (t[0] == '#' and t[1] == 'expensive') or t[0] == 'lib' or (t[0] == '#' and t[1] == 'lib'):
66+
# It's okay to comment out a test intentionally
6767
ret.add(t[-1].split('::')[-1])
6868
return ret
6969

@@ -80,4 +80,4 @@ def nightly_tests():
8080
if t not in nightly_txt_tests:
8181
print(f'error: file {rs} test {t} not in nightly.txt')
8282
exit(1)
83-
print('all tests in nightly')
83+
print('all tests in nightly')

0 commit comments

Comments
 (0)