Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
Use serial to ensure tests do not clash
Browse files Browse the repository at this point in the history
Signed-off-by: Jacinta Ferrant <[email protected]>
  • Loading branch information
jferrant committed Feb 5, 2024
1 parent 278d88e commit 20d7869
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 0 deletions.
81 changes: 81 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions stacks-signer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
wsts = { workspace = true }
rand = { workspace = true }

[dev-dependencies]
serial_test = "3.0.0"

[dependencies.serde_json]
version = "1.0"
features = ["arbitrary_precision", "unbounded_depth"]
Expand Down
3 changes: 3 additions & 0 deletions stacks-signer/src/client/stackerdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,13 @@ mod tests {
TransactionSmartContract, TransactionVersion,
};
use blockstack_lib::util_lib::strings::StacksString;
use serial_test::serial;

use super::*;
use crate::client::tests::{write_response, TestConfig};

#[test]
#[serial]
fn get_signer_transactions_with_retry_should_succeed() {
let mut config = TestConfig::new();
let sk = StacksPrivateKey::new();
Expand Down Expand Up @@ -226,6 +228,7 @@ mod tests {
}

#[test]
#[serial]
fn send_signer_message_with_retry_should_succeed() {
let mut config = TestConfig::new();
let sk = StacksPrivateKey::new();
Expand Down
3 changes: 3 additions & 0 deletions stacks-signer/src/runloop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,7 @@ mod tests {
use libsigner::SIGNER_SLOTS_PER_USER;
use rand::distributions::Standard;
use rand::Rng;
use serial_test::serial;
use stacks_common::bitvec::BitVec;
use stacks_common::types::chainstate::{
ConsensusHash, StacksBlockId, StacksPrivateKey, TrieHash,
Expand Down Expand Up @@ -1192,6 +1193,7 @@ mod tests {
}

#[test]
#[serial]
fn get_expected_transactions_should_filter_invalid_transactions() {
// Create a runloop of a valid signer
let config = Config::load_from_file("./src/tests/conf/signer-0.toml").unwrap();
Expand Down Expand Up @@ -1298,6 +1300,7 @@ mod tests {
}

#[test]
#[serial]
fn verify_transactions_valid() {
let config = Config::load_from_file("./src/tests/conf/signer-0.toml").unwrap();
let mut runloop: RunLoop<FireCoordinator<v2::Aggregator>> = RunLoop::from(&config);
Expand Down

0 comments on commit 20d7869

Please sign in to comment.