Skip to content

Commit

Permalink
Move tests taking over 60 s to nightly (near#6056)
Browse files Browse the repository at this point in the history
Issue: near#4490
  • Loading branch information
mina86 authored Jan 14, 2022
1 parent 1338d81 commit 518685a
Show file tree
Hide file tree
Showing 10 changed files with 114 additions and 0 deletions.
3 changes: 3 additions & 0 deletions integration-tests/src/tests/client/chunks_management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ fn chunks_produced_and_distributed_one_val_per_shard() {
/// give up on getting the part from test1 and will get it from test2 (who will have it because
/// `validator_groups=2`)
#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn chunks_recovered_from_others() {
heavy_test(|| {
run_actix(async {
Expand All @@ -284,6 +285,7 @@ fn 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]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
#[should_panic]
fn chunks_recovered_from_full_timeout_too_short() {
heavy_test(|| {
Expand All @@ -296,6 +298,7 @@ fn 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]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn chunks_recovered_from_full() {
heavy_test(|| {
run_actix(async {
Expand Down
1 change: 1 addition & 0 deletions integration-tests/src/tests/client/process_blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1560,6 +1560,7 @@ fn test_gc_after_state_sync() {
}

#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_process_block_after_state_sync() {
let epoch_length = 1024;
// test with shard_version > 0
Expand Down
6 changes: 6 additions & 0 deletions integration-tests/src/tests/nearcore/rpc_error_structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use near_primitives::types::BlockId;
// Queries json-rpc block that doesn't exists
// Checks if the struct is expected and contains the proper data
#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_block_unknown_block_error() {
init_integration_logger();

Expand Down Expand Up @@ -77,6 +78,7 @@ fn test_block_unknown_block_error() {
// (randomish chunk hash, we hope it won't happen in test case)
// Checks if the struct is expected and contains the proper data
#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_chunk_unknown_chunk_error() {
init_integration_logger();

Expand Down Expand Up @@ -205,6 +207,7 @@ fn test_protocol_config_unknown_block_error() {
// Queries json-rpc gas_price that doesn't exists
// Checks if the struct is expected and contains the proper data
#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_gas_price_unknown_block_error() {
init_integration_logger();

Expand Down Expand Up @@ -262,6 +265,7 @@ fn test_gas_price_unknown_block_error() {
// Queries json-rpc EXPERIMENTAL_receipt that doesn't exists
// Checks if the struct is expected and contains the proper data
#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_receipt_id_unknown_receipt_error() {
init_integration_logger();

Expand Down Expand Up @@ -332,6 +336,7 @@ fn test_receipt_id_unknown_receipt_error() {
/// Sends tx to first light client through `broadcast_tx_commit` and checks that the transaction has failed.
/// Checks if the struct is expected and contains the proper data
#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_tx_invalid_tx_error() {
init_integration_logger();

Expand Down Expand Up @@ -404,6 +409,7 @@ fn test_tx_invalid_tx_error() {
}

#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_query_rpc_account_view_unknown_block_must_return_error() {
init_integration_logger();

Expand Down
12 changes: 12 additions & 0 deletions integration-tests/src/tests/nearcore/rpc_nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use near_primitives::views::{ExecutionOutcomeView, ExecutionStatusView};
use crate::tests::nearcore::node_cluster::NodeCluster;

#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_get_validator_info_rpc() {
init_integration_logger();

Expand Down Expand Up @@ -213,16 +214,19 @@ fn test_get_execution_outcome(is_tx_successful: bool) {
}

#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_get_execution_outcome_tx_success() {
test_get_execution_outcome(true);
}

#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_get_execution_outcome_tx_failure() {
test_get_execution_outcome(false);
}

#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_protocol_config_rpc() {
init_integration_logger();

Expand Down Expand Up @@ -262,6 +266,7 @@ fn test_protocol_config_rpc() {
}

#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_query_rpc_account_view_must_succeed() {
init_integration_logger();

Expand Down Expand Up @@ -300,6 +305,7 @@ fn test_query_rpc_account_view_must_succeed() {
}

#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_query_rpc_account_view_account_doesnt_exist_must_return_error() {
init_integration_logger();

Expand Down Expand Up @@ -339,6 +345,7 @@ fn test_query_rpc_account_view_account_doesnt_exist_must_return_error() {
}

#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_tx_not_enough_balance_must_return_error() {
init_integration_logger();

Expand Down Expand Up @@ -401,6 +408,7 @@ fn test_tx_not_enough_balance_must_return_error() {
}

#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_send_tx_sync_returns_transaction_hash() {
init_integration_logger();

Expand Down Expand Up @@ -449,6 +457,7 @@ fn test_send_tx_sync_returns_transaction_hash() {
}

#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_send_tx_sync_to_lightclient_must_be_routed() {
init_integration_logger();

Expand Down Expand Up @@ -507,6 +516,7 @@ fn test_send_tx_sync_to_lightclient_must_be_routed() {
}

#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_check_unknown_tx_must_return_error() {
init_integration_logger();

Expand Down Expand Up @@ -565,6 +575,7 @@ fn test_check_unknown_tx_must_return_error() {
}

#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_check_tx_on_lightclient_must_return_does_not_track_shard() {
init_integration_logger();

Expand Down Expand Up @@ -618,6 +629,7 @@ fn test_check_tx_on_lightclient_must_return_does_not_track_shard() {
}

#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_validators_by_epoch_id_current_epoch_not_fails() {
init_integration_logger();

Expand Down
4 changes: 4 additions & 0 deletions integration-tests/src/tests/nearcore/run_nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,28 @@ fn run_heavy_nodes(

/// Runs two nodes that should produce blocks one after another.
#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn run_nodes_1_2_2() {
run_heavy_nodes(1, 2, 2, 10, 30);
}

/// Runs two nodes, where only one is a validator.
#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn run_nodes_1_2_1() {
run_heavy_nodes(1, 2, 1, 10, 30);
}

/// Runs 4 nodes that should produce blocks one after another.
#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn run_nodes_1_4_4() {
run_heavy_nodes(1, 4, 4, 8, 32);
}

/// Run 4 nodes, 4 shards, 2 validators, other two track 2 shards.
#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn run_nodes_4_4_2() {
run_heavy_nodes(4, 4, 2, 8, 32);
}
4 changes: 4 additions & 0 deletions integration-tests/src/tests/nearcore/stake_nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ fn init_test_staking(
/// Runs one validator network, sends staking transaction for the second node and
/// waits until it becomes a validator.
#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_stake_nodes() {
heavy_test(|| {
run_actix(async move {
Expand Down Expand Up @@ -167,6 +168,7 @@ fn test_stake_nodes() {
}

#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_validator_kickout() {
heavy_test(|| {
run_actix(async move {
Expand Down Expand Up @@ -314,6 +316,7 @@ fn test_validator_kickout() {
}

#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_validator_join() {
heavy_test(|| {
run_actix(async move {
Expand Down Expand Up @@ -465,6 +468,7 @@ fn test_validator_join() {
}

#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn test_inflation() {
heavy_test(|| {
run_actix(async move {
Expand Down
3 changes: 3 additions & 0 deletions integration-tests/src/tests/nearcore/sync_nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ fn setup_configs() -> (Genesis, Block, NearConfig, NearConfig) {

/// One client is in front, another must sync to it before they can produce blocks.
#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn sync_nodes() {
heavy_test(|| {
init_integration_logger();
Expand Down Expand Up @@ -168,6 +169,7 @@ fn sync_nodes() {

/// Clients connect and then one of them becomes in front. The other one must then sync to it.
#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn sync_after_sync_nodes() {
heavy_test(|| {
init_integration_logger();
Expand Down Expand Up @@ -230,6 +232,7 @@ fn sync_after_sync_nodes() {
/// Starts one validation node, it reduces it's stake to 1/2 of the stake.
/// Second node starts after 1s, needs to catchup & state sync and then make sure it's
#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn sync_state_stake_change() {
heavy_test(|| {
init_integration_logger();
Expand Down
2 changes: 2 additions & 0 deletions integration-tests/src/tests/nearcore/sync_state_nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use nearcore::{config::GenesisExt, load_test_config, start_with_config};

/// One client is in front, another must sync to it using state (fast) sync.
#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn sync_state_nodes() {
heavy_test(|| {
init_integration_logger();
Expand Down Expand Up @@ -254,6 +255,7 @@ fn sync_state_nodes_multishard() {
/// Start a validator that validators four shards. Since we only have 3 accounts one shard must have
/// empty state. Start another node that does state sync. Check state sync on empty state works.
#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn sync_empty_state() {
heavy_test(|| {
init_integration_logger();
Expand Down
1 change: 1 addition & 0 deletions integration-tests/src/tests/nearcore/track_shards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use near_primitives::hash::CryptoHash;
use crate::tests::nearcore::node_cluster::NodeCluster;

#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
fn track_shards() {
init_integration_logger();

Expand Down
Loading

0 comments on commit 518685a

Please sign in to comment.