Skip to content

Commit

Permalink
chore(ci): Time out overly long integration tests
Browse files Browse the repository at this point in the history
Our ignored tests run as a nightly integration test. The longest running one is node_staggered_starts:
https://github.com/MystenLabs/narwhal/blob/main/primary/tests/nodes_bootstrapping_tests.rs#L49-L94

This test is supposed to terminate in an instant after 1200s. Instead we observe it running over an hour.
This puts it under a timeout.
  • Loading branch information
huitseeker committed Aug 23, 2022
1 parent ad41b66 commit e1c068e
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 24 deletions.
3 changes: 2 additions & 1 deletion .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ status-level = "skip"
fail-fast = false
# Retry failing tests in order to not block builds on flaky tests
retries = 2
# no killing slow tests, by design
# Mark tests as slow after 25mins, kill them after 50
slow-timeout = { period = "1500s", terminate-after = 1 }
6 changes: 3 additions & 3 deletions crypto/src/tests/bls12377_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ use crate::bls12377::{
BLS12377AggregateSignature, BLS12377KeyPair, BLS12377PrivateKey, BLS12377PublicKey,
BLS12377PublicKeyBytes, BLS12377Signature,
};
use fastcrypto::traits::{
AggregateAuthenticator, EncodeDecodeBase64, KeyPair, ToFromBytes, VerifyingKey,
use fastcrypto::{
traits::{AggregateAuthenticator, EncodeDecodeBase64, KeyPair, ToFromBytes, VerifyingKey},
Hash, SignatureService,
};
use fastcrypto::{Hash, SignatureService};

use rand::{rngs::StdRng, SeedableRng as _};
use signature::{Signer, Verifier};
Expand Down
3 changes: 1 addition & 2 deletions node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ use consensus::{
metrics::{ChannelMetrics, ConsensusMetrics},
Consensus,
};
use crypto::KeyPair;
use crypto::PublicKey;
use crypto::{KeyPair, PublicKey};
use executor::{BatchExecutionState, Executor, SubscriberResult};
use fastcrypto::traits::{KeyPair as _, VerifyingKey};
use primary::{BlockCommand, NetworkModel, PayloadToken, Primary, PrimaryChannelMetrics};
Expand Down
3 changes: 1 addition & 2 deletions node/tests/reconfigure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ use arc_swap::ArcSwap;
use bytes::Bytes;
use config::{Committee, Parameters};
use consensus::ConsensusOutput;
use crypto::KeyPair;
use crypto::PublicKey;
use crypto::{KeyPair, PublicKey};
use executor::{
ExecutionIndices, ExecutionState, ExecutionStateError, SingleExecutionState, SingleExecutor,
};
Expand Down
3 changes: 1 addition & 2 deletions primary/src/aggregators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// SPDX-License-Identifier: Apache-2.0

use config::{Committee, Stake};
use crypto::PublicKey;
use crypto::Signature;
use crypto::{PublicKey, Signature};
use fastcrypto::traits::EncodeDecodeBase64;
use std::collections::HashSet;
use types::{
Expand Down
3 changes: 1 addition & 2 deletions primary/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ use crate::{
};
use async_recursion::async_recursion;
use config::{Committee, Epoch};
use crypto::PublicKey;
use crypto::Signature;
use crypto::{PublicKey, Signature};
use fastcrypto::{Hash as _, SignatureService};
use network::{CancelOnDropHandler, MessageResult, PrimaryNetwork, ReliableNetwork};
use std::{
Expand Down
3 changes: 1 addition & 2 deletions primary/src/primary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ use crate::{
use async_trait::async_trait;
use config::{Parameters, SharedCommittee, WorkerId, WorkerInfo};
use consensus::dag::Dag;
use crypto::PublicKey;
use crypto::Signature;
use crypto::{PublicKey, Signature};
use fastcrypto::{
traits::{EncodeDecodeBase64, Signer},
SignatureService,
Expand Down
3 changes: 1 addition & 2 deletions primary/src/proposer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// SPDX-License-Identifier: Apache-2.0
use crate::{metrics::PrimaryMetrics, NetworkModel};
use config::{Committee, Epoch, WorkerId};
use crypto::PublicKey;
use crypto::Signature;
use crypto::{PublicKey, Signature};
use fastcrypto::{Digest, Hash as _, SignatureService};
use std::{cmp::Ordering, sync::Arc};
use tokio::{
Expand Down
3 changes: 1 addition & 2 deletions primary/tests/integration_tests_validator_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ use arc_swap::ArcSwap;
// SPDX-License-Identifier: Apache-2.0
use config::{Parameters, WorkerId};
use consensus::{dag::Dag, metrics::ConsensusMetrics};
use crypto::KeyPair;
use crypto::PublicKey;
use crypto::{KeyPair, PublicKey};
use fastcrypto::{traits::KeyPair as _, Hash};
use indexmap::IndexMap;
use network::metrics::WorkerNetworkMetrics;
Expand Down
3 changes: 1 addition & 2 deletions test_utils/src/cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
use crate::{committee, keys, temp_dir};
use arc_swap::ArcSwap;
use config::{Committee, Parameters, SharedCommittee, WorkerId};
use crypto::KeyPair;
use crypto::PublicKey;
use crypto::{KeyPair, PublicKey};
use executor::{SerializedTransaction, SingleExecutor, SubscriberResult, DEFAULT_CHANNEL_SIZE};
use fastcrypto::traits::KeyPair as _;
use itertools::Itertools;
Expand Down
3 changes: 1 addition & 2 deletions test_utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
use config::{
utils::get_available_port, Authority, Committee, Epoch, PrimaryAddresses, WorkerId, WorkerInfo,
};
use crypto::PublicKey;
use crypto::{KeyPair, Signature};
use crypto::{KeyPair, PublicKey, Signature};
use fastcrypto::{
traits::{KeyPair as _, Signer as _},
Digest, Hash as _,
Expand Down
3 changes: 1 addition & 2 deletions types/src/primary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ use crate::{
use blake2::{digest::Update, VarBlake2b};
use bytes::Bytes;
use config::{Committee, Epoch, WorkerId, WorkerInfo};
use crypto::PublicKey;
use crypto::Signature;
use crypto::{PublicKey, Signature};
use dag::node_dag::Affiliated;
use derive_builder::Builder;
use fastcrypto::{
Expand Down

0 comments on commit e1c068e

Please sign in to comment.