Skip to content

Commit

Permalink
fix(nightly): running lib tests (#2803)
Browse files Browse the repository at this point in the history
allows running unit tests in Nightly
  • Loading branch information
Kouprin authored Jun 8, 2020
1 parent 79a777a commit 29a5bf8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions chain/chain/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2818,6 +2818,7 @@ mod tests {
}

/// Test that MAX_HEIGHTS_TO_CLEAR works properly
#[cfg(feature = "expensive_tests")]
#[test]
fn test_clear_old_data_too_many_heights() {
let mut chain = get_chain_with_epoch_length(1);
Expand Down
5 changes: 4 additions & 1 deletion nightly/nightly.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ expensive --timeout=900 near-chain gc tests::test_gc_random_large
expensive --timeout=600 near-chain gc tests::test_gc_pine
expensive --timeout=600 near-chain gc tests::test_gc_star_large

# lib tests
lib near-chunks test::test_seal_removal
lib near-chain store::tests::test_clear_old_data_too_many_heights

# other tests
expensive nearcore test_simple test::test_2_10_multiple_nodes
expensive nearcore test_simple test::test_4_10_multiple_nodes
Expand All @@ -143,4 +147,3 @@ expensive nearcore test_simple test::test_7_10_multiple_nodes
expensive nearcore test_rejoin test::test_4_20_kill1
expensive nearcore test_rejoin test::test_4_20_kill1_two_shards
expensive nearcore test_rejoin test::test_4_20_kill2
expensive nearcore near-chunks test_seal_removal
6 changes: 3 additions & 3 deletions scripts/check_nightly.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def nightly_tests():
ret = set()
for test in tests:
t = test.strip().split(' ')
if t[0] == 'expensive' or (t[0] == '#' and t[1] == 'expensive'):
# It's okay to comment out a very expensive test intentionally
if t[0] == 'expensive' or (t[0] == '#' and t[1] == 'expensive') or t[0] == 'lib' or (t[0] == '#' and t[1] == 'lib'):
# It's okay to comment out a test intentionally
ret.add(t[-1].split('::')[-1])
return ret

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

0 comments on commit 29a5bf8

Please sign in to comment.