Skip to content

Commit

Permalink
s/ultraslow/ultra_slow/
Browse files Browse the repository at this point in the history
  • Loading branch information
nagisa committed Nov 15, 2024
1 parent e0593f4 commit 79497b0
Show file tree
Hide file tree
Showing 25 changed files with 338 additions and 338 deletions.
2 changes: 1 addition & 1 deletion chain/chain/src/tests/doomslug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ fn one_iter(
}

#[test]
fn ultraslow_test_fuzzy_doomslug_liveness_and_safety() {
fn ultra_slow_test_fuzzy_doomslug_liveness_and_safety() {
for (time_to_gst_millis, height_goal) in
&[(0, 200), (1000, 200), (10000, 300), (100000, 400), (500000, 500)]
{
Expand Down
14 changes: 7 additions & 7 deletions chain/chain/src/tests/garbage_collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ fn test_gc_remove_fork_small() {
}

#[test]
fn ultraslow_test_gc_remove_fork_large() {
fn ultra_slow_test_gc_remove_fork_large() {
test_gc_remove_fork_common(20)
}

Expand Down Expand Up @@ -396,7 +396,7 @@ fn test_gc_not_remove_fork_small() {
}

#[test]
fn ultraslow_test_gc_not_remove_fork_large() {
fn ultra_slow_test_gc_not_remove_fork_large() {
test_gc_not_remove_fork_common(20)
}

Expand Down Expand Up @@ -481,7 +481,7 @@ fn test_gc_boundaries_small() {
}

#[test]
fn ultraslow_test_gc_boundaries_large() {
fn ultra_slow_test_gc_boundaries_large() {
test_gc_boundaries_common(20)
}

Expand Down Expand Up @@ -509,7 +509,7 @@ fn slow_test_gc_random_small() {
}

#[test]
fn ultraslow_test_gc_random_large() {
fn ultra_slow_test_gc_random_large() {
test_gc_random_common(25);
}

Expand Down Expand Up @@ -541,7 +541,7 @@ fn test_gc_pine_small() {
}

#[test]
fn ultraslow_test_gc_pine() {
fn ultra_slow_test_gc_pine() {
for max_changes in 1..=20 {
let mut chains = vec![SimpleChain { from: 0, length: 101, is_removed: false }];
for i in 1..100 {
Expand Down Expand Up @@ -573,7 +573,7 @@ fn test_gc_star_small() {
}

#[test]
fn ultraslow_test_gc_star_large() {
fn ultra_slow_test_gc_star_large() {
test_gc_star_common(20)
}

Expand Down Expand Up @@ -829,7 +829,7 @@ fn test_clear_old_data_fixed_height() {
/// Test that `gc_blocks_limit` works properly
#[test]
#[allow(unreachable_code)]
fn ultraslow_test_clear_old_data_too_many_heights() {
fn ultra_slow_test_clear_old_data_too_many_heights() {
// TODO(#10634): panics on `clear_data` -> `clear_resharding_data` ->
// `MockEpochManager::is_next_block_epoch_start` apparently because
// epoch manager is not updated at all. Should we fix it together with
Expand Down
26 changes: 13 additions & 13 deletions chain/client/src/tests/catching_up.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ pub struct StateRequestStruct {

/// Sanity checks that the incoming and outgoing receipts are properly sent and received
#[test]
fn ultraslow_test_catchup_receipts_sync_third_epoch() {
fn ultra_slow_test_catchup_receipts_sync_third_epoch() {
test_catchup_receipts_sync_common(13, 1, false)
}

Expand All @@ -120,17 +120,17 @@ fn ultraslow_test_catchup_receipts_sync_third_epoch() {
/// The reason of increasing block_prod_time in the test is to allow syncing complete.
/// Otherwise epochs will be changing faster than state sync happen.
#[test]
fn ultraslow_test_catchup_receipts_sync_hold() {
fn ultra_slow_test_catchup_receipts_sync_hold() {
test_catchup_receipts_sync_common(13, 1, true)
}

#[test]
fn ultraslow_test_catchup_receipts_sync_last_block() {
fn ultra_slow_test_catchup_receipts_sync_last_block() {
test_catchup_receipts_sync_common(13, 5, false)
}

#[test]
fn ultraslow_test_catchup_receipts_sync_distant_epoch() {
fn ultra_slow_test_catchup_receipts_sync_distant_epoch() {
test_catchup_receipts_sync_common(35, 1, false)
}

Expand Down Expand Up @@ -380,32 +380,32 @@ enum RandomSinglePartPhases {
/// assigned to were to have incorrect receipts, the balances in the fourth epoch would have
/// been incorrect due to wrong receipts applied during the third epoch.
#[test]
fn ultraslow_test_catchup_random_single_part_sync() {
fn ultra_slow_test_catchup_random_single_part_sync() {
test_catchup_random_single_part_sync_common(false, false, 13)
}

// Same test as `test_catchup_random_single_part_sync`, but skips the chunks on height 14 and 15
// It causes all the receipts to be applied only on height 16, which is the next epoch.
// It tests that the incoming receipts are property synced through epochs
#[test]
fn ultraslow_test_catchup_random_single_part_sync_skip_15() {
fn ultra_slow_test_catchup_random_single_part_sync_skip_15() {
test_catchup_random_single_part_sync_common(true, false, 13)
}

#[test]
fn ultraslow_test_catchup_random_single_part_sync_send_15() {
fn ultra_slow_test_catchup_random_single_part_sync_send_15() {
test_catchup_random_single_part_sync_common(false, false, 15)
}

// Make sure that transactions are at least applied.
#[test]
fn ultraslow_test_catchup_random_single_part_sync_non_zero_amounts() {
fn ultra_slow_test_catchup_random_single_part_sync_non_zero_amounts() {
test_catchup_random_single_part_sync_common(false, true, 13)
}

// Use another height to send txs.
#[test]
fn ultraslow_test_catchup_random_single_part_sync_height_6() {
fn ultra_slow_test_catchup_random_single_part_sync_height_6() {
test_catchup_random_single_part_sync_common(false, false, 6)
}

Expand Down Expand Up @@ -607,7 +607,7 @@ fn test_catchup_random_single_part_sync_common(skip_15: bool, non_zero: bool, he
/// This test would fail if at any point validators got stuck with state sync, or block
/// production stalled for any other reason.
#[test]
fn ultraslow_test_catchup_sanity_blocks_produced() {
fn ultra_slow_test_catchup_sanity_blocks_produced() {
init_integration_logger();
run_actix(async move {
let connectors: Arc<RwLock<Vec<ActorHandlesForTesting>>> = Arc::new(RwLock::new(vec![]));
Expand Down Expand Up @@ -673,17 +673,17 @@ fn ultraslow_test_catchup_sanity_blocks_produced() {
}

#[test]
fn ultraslow_test_all_chunks_accepted_1000() {
fn ultra_slow_test_all_chunks_accepted_1000() {
test_all_chunks_accepted_common(1000, 3000, 5)
}

#[test]
fn ultraslow_test_all_chunks_accepted_1000_slow() {
fn ultra_slow_test_all_chunks_accepted_1000_slow() {
test_all_chunks_accepted_common(1000, 6000, 5)
}

#[test]
fn ultraslow_test_all_chunks_accepted_1000_rare_epoch_changing() {
fn ultra_slow_test_all_chunks_accepted_1000_rare_epoch_changing() {
test_all_chunks_accepted_common(1000, 1500, 100)
}

Expand Down
2 changes: 1 addition & 1 deletion chain/client/src/tests/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use near_primitives::types::{AccountId, BlockHeight};
/// Periodically verify finality is not violated.
/// This test is designed to reproduce finality bugs on the epoch boundaries.
#[test]
fn ultraslow_test_consensus_with_epoch_switches() {
fn ultra_slow_test_consensus_with_epoch_switches() {
init_integration_logger();

const HEIGHT_GOAL: u64 = 120;
Expand Down
14 changes: 7 additions & 7 deletions chain/client/src/tests/cross_shard_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -557,29 +557,29 @@ fn test_cross_shard_tx_common(
/// Doesn't drop chunks, disabled doomslug, no validator rotation (each epoch
/// has the same set of validators).
#[test]
fn ultraslow_test_cross_shard_tx() {
fn ultra_slow_test_cross_shard_tx() {
test_cross_shard_tx_common(64, false, false, false, 70, Some(2.3), None);
}

/// Same as above, but doomslug is enabled.
#[test]
fn ultraslow_test_cross_shard_tx_doomslug() {
fn ultra_slow_test_cross_shard_tx_doomslug() {
test_cross_shard_tx_common(64, false, false, true, 200, None, Some(1.5));
}

/// Same as the first one but the chunks are sometimes dropped.
#[test]
fn ultraslow_test_cross_shard_tx_drop_chunks() {
fn ultra_slow_test_cross_shard_tx_drop_chunks() {
test_cross_shard_tx_common(64, false, true, false, 250, None, None);
}

#[test]
fn ultraslow_test_cross_shard_tx_8_iterations() {
fn ultra_slow_test_cross_shard_tx_8_iterations() {
test_cross_shard_tx_common(8, false, false, false, 200, Some(2.4), None);
}

#[test]
fn ultraslow_test_cross_shard_tx_8_iterations_drop_chunks() {
fn ultra_slow_test_cross_shard_tx_8_iterations_drop_chunks() {
test_cross_shard_tx_common(8, false, true, false, 200, Some(2.4), None);
}

Expand All @@ -589,11 +589,11 @@ fn ultraslow_test_cross_shard_tx_8_iterations_drop_chunks() {
/// the allocated time. (the one with lower block production time is expected to
/// finish fewer because it has higher forkfulness).
#[test]
fn ultraslow_test_cross_shard_tx_with_validator_rotation_1() {
fn ultra_slow_test_cross_shard_tx_with_validator_rotation_1() {
test_cross_shard_tx_common(8, true, false, false, 220, Some(2.4), None);
}

#[test]
fn ultraslow_test_cross_shard_tx_with_validator_rotation_2() {
fn ultra_slow_test_cross_shard_tx_with_validator_rotation_2() {
test_cross_shard_tx_common(24, true, false, false, 400, Some(2.4), None);
}
12 changes: 6 additions & 6 deletions docs/architecture/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,26 +269,26 @@ changes.
Not all tests are created equal though and while some may only need
milliseconds to run, others may run for several seconds or even
minutes. Tests that take a long time should be marked as such by
prefixing their name with `slow_test_` or `ultraslow_test_`:
prefixing their name with `slow_test_` or `ultra_slow_test_`:

```rust
#[test]
fn ultraslow_test_catchup_random_single_part_sync() {
fn ultra_slow_test_catchup_random_single_part_sync() {
test_catchup_random_single_part_sync_common(false, false, 13)
}
```

During local development both slow and ultra-slow tests will not run
with a typical `just nextest` invocation. You can run them with `just
nextest-slow` or `just nextest-all` locally. CI will run the slow
tests and the ultraslow ones are left to run on Nayduck.
tests and the `ultra_slow` ones are left to run on Nayduck.

Because ultraslow tests are run on nayduck, they need to be explicitly
Because `ultra_slow` tests are run on nayduck, they need to be explicitly
included in `nightly/expensive.txt` file; for example:

```text
expensive --timeout=1800 near-client near_client tests::catching_up::ultraslow_test_catchup_random_single_part_sync
expensive --timeout=1800 near-client near_client tests::catching_up::ultraslow_test_catchup_random_single_part_sync --features nightly
expensive --timeout=1800 near-client near_client tests::catching_up::ultra_slow_test_catchup_random_single_part_sync
expensive --timeout=1800 near-client near_client tests::catching_up::ultra_slow_test_catchup_random_single_part_sync --features nightly
```

For more details regarding nightly tests see `nightly/README.md`.
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/src/tests/client/block_corruption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ fn check_process_flipped_block_fails_on_bit(
/// `oks` are printed to check the sanity of the test.
/// This vector should include various validation errors that correspond to data changed with a bit flip.
#[test]
fn ultraslow_test_check_process_flipped_block_fails() {
fn ultra_slow_test_check_process_flipped_block_fails() {
init_test_logger();
let mut corrupted_bit_idx = 0;
// List of reasons `check_process_flipped_block_fails_on_bit` returned `Err`.
Expand Down
28 changes: 14 additions & 14 deletions integration-tests/src/tests/client/chunks_management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ fn chunks_produced_and_distributed_all_in_all_shards() {
}

#[test]
fn ultraslow_test_chunks_produced_and_distributed_2_vals_per_shard() {
fn ultra_slow_test_chunks_produced_and_distributed_2_vals_per_shard() {
Test {
validator_groups: 2,
chunk_only_producers: false,
Expand All @@ -346,7 +346,7 @@ fn ultraslow_test_chunks_produced_and_distributed_2_vals_per_shard() {
}

#[test]
fn ultraslow_test_chunks_produced_and_distributed_one_val_per_shard() {
fn ultra_slow_test_chunks_produced_and_distributed_one_val_per_shard() {
Test {
validator_groups: 4,
chunk_only_producers: false,
Expand All @@ -361,7 +361,7 @@ fn ultraslow_test_chunks_produced_and_distributed_one_val_per_shard() {
// because we always fallback on the p2p mechanism. This test runs with a config
// where `enabled: false`.
#[test]
fn ultraslow_test_chunks_produced_and_distributed_chunk_distribution_network_disabled() {
fn ultra_slow_test_chunks_produced_and_distributed_chunk_distribution_network_disabled() {
let config = ChunkDistributionNetworkConfig {
enabled: false,
uris: ChunkDistributionUris { set: String::new(), get: String::new() },
Expand All @@ -380,7 +380,7 @@ fn ultraslow_test_chunks_produced_and_distributed_chunk_distribution_network_dis
// because we always fallback on the p2p mechanism. This test runs with a config
// where the URIs are not real endpoints.
#[test]
fn ultraslow_test_chunks_produced_and_distributed_chunk_distribution_network_wrong_urls() {
fn ultra_slow_test_chunks_produced_and_distributed_chunk_distribution_network_wrong_urls() {
let config = ChunkDistributionNetworkConfig {
enabled: false,
uris: ChunkDistributionUris {
Expand All @@ -403,7 +403,7 @@ fn ultraslow_test_chunks_produced_and_distributed_chunk_distribution_network_wro
// where the `get` URI points at a random http server (therefore it does not
// return valid chunks).
#[test]
fn ultraslow_test_chunks_produced_and_distributed_chunk_distribution_network_incorrect_get_return()
fn ultra_slow_test_chunks_produced_and_distributed_chunk_distribution_network_incorrect_get_return()
{
let config = ChunkDistributionNetworkConfig {
enabled: false,
Expand Down Expand Up @@ -433,7 +433,7 @@ fn chunks_produced_and_distributed_all_in_all_shards_should_succeed_even_without
}

#[test]
fn ultraslow_test_chunks_produced_and_distributed_2_vals_per_shard_should_succeed_even_without_forwarding(
fn ultra_slow_test_chunks_produced_and_distributed_2_vals_per_shard_should_succeed_even_without_forwarding(
) {
Test {
validator_groups: 2,
Expand All @@ -446,7 +446,7 @@ fn ultraslow_test_chunks_produced_and_distributed_2_vals_per_shard_should_succee
}

#[test]
fn ultraslow_test_chunks_produced_and_distributed_one_val_per_shard_should_succeed_even_without_forwarding(
fn ultra_slow_test_chunks_produced_and_distributed_one_val_per_shard_should_succeed_even_without_forwarding(
) {
Test {
validator_groups: 4,
Expand All @@ -470,7 +470,7 @@ fn ultraslow_test_chunks_produced_and_distributed_one_val_per_shard_should_succe
/// TODO: this test is broken due to (#8395) - with fix in #8211

#[test]
fn ultraslow_test_chunks_recovered_from_others() {
fn ultra_slow_test_chunks_recovered_from_others() {
Test {
validator_groups: 2,
chunk_only_producers: false,
Expand All @@ -486,7 +486,7 @@ fn ultraslow_test_chunks_recovered_from_others() {
/// but they won't do it for the first 3 seconds, and 3s block_timeout means that the block producers
/// only wait for 3000/2 milliseconds until they produce a block with some chunks missing
#[test]
fn ultraslow_test_chunks_recovered_from_full_timeout_too_short() {
fn ultra_slow_test_chunks_recovered_from_full_timeout_too_short() {
Test {
validator_groups: 4,
chunk_only_producers: false,
Expand All @@ -500,7 +500,7 @@ fn ultraslow_test_chunks_recovered_from_full_timeout_too_short() {
/// Same test as above, but the timeout is sufficiently large for test4 now to reconstruct the full
/// chunk
#[test]
fn ultraslow_test_chunks_recovered_from_full() {
fn ultra_slow_test_chunks_recovered_from_full() {
Test {
validator_groups: 4,
chunk_only_producers: false,
Expand All @@ -515,7 +515,7 @@ fn ultraslow_test_chunks_recovered_from_full() {

/// Happy case -- each shard is handled by one cop and one block producers.
#[test]
fn ultraslow_test_chunks_produced_and_distributed_one_val_shard_cop() {
fn ultra_slow_test_chunks_produced_and_distributed_one_val_shard_cop() {
Test {
validator_groups: 4,
chunk_only_producers: true,
Expand All @@ -528,7 +528,7 @@ fn ultraslow_test_chunks_produced_and_distributed_one_val_shard_cop() {

/// `test4` can't talk to `test1`, so it'll fetch the chunk for first shard from `cop1`.
#[test]
fn ultraslow_test_chunks_recovered_from_others_cop() {
fn ultra_slow_test_chunks_recovered_from_others_cop() {
Test {
validator_groups: 1,
chunk_only_producers: true,
Expand All @@ -542,7 +542,7 @@ fn ultraslow_test_chunks_recovered_from_others_cop() {
/// `test4` can't talk neither to `cop1` nor to `test1`, so it can't fetch chunk
/// from chunk producers and has to reconstruct it.
#[test]
fn ultraslow_test_chunks_recovered_from_full_timeout_too_short_cop() {
fn ultra_slow_test_chunks_recovered_from_full_timeout_too_short_cop() {
Test {
validator_groups: 4,
chunk_only_producers: true,
Expand All @@ -558,7 +558,7 @@ fn ultraslow_test_chunks_recovered_from_full_timeout_too_short_cop() {

/// Same as above, but with longer block production timeout which should allow for full reconstruction.
#[test]
fn ultraslow_test_chunks_recovered_from_full_cop() {
fn ultra_slow_test_chunks_recovered_from_full_cop() {
Test {
validator_groups: 4,
chunk_only_producers: true,
Expand Down
Loading

0 comments on commit 79497b0

Please sign in to comment.