Skip to content

Commit

Permalink
Merge pull request #4473 from stacks-network/4472-race-condition-in-s…
Browse files Browse the repository at this point in the history
…tacks-signer-client-tests

Fix race condition in stacks signer client tests
  • Loading branch information
netrome authored Mar 4, 2024
2 parents 0a4a6d3 + ac03fc7 commit 0910eed
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 99 deletions.
78 changes: 0 additions & 78 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion stacks-signer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ wsts = { workspace = true }
rand = { workspace = true }

[dev-dependencies]
serial_test = "3.0.0"
clarity = { path = "../clarity", features = ["testing"] }

[dependencies.serde_json]
Expand Down
5 changes: 1 addition & 4 deletions stacks-signer/src/client/stackerdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,12 @@ mod tests {
TransactionSmartContract, TransactionVersion,
};
use blockstack_lib::util_lib::strings::StacksString;
use serial_test::serial;

use super::*;
use crate::client::tests::{generate_signer_config, mock_server_from_config, write_response};
use crate::config::GlobalConfig;

#[test]
#[serial]
fn get_signer_transactions_with_retry_should_succeed() {
let config = GlobalConfig::load_from_file("./src/tests/conf/signer-0.toml").unwrap();
let signer_config = generate_signer_config(&config, 5, 20);
Expand Down Expand Up @@ -320,9 +318,8 @@ mod tests {
}

#[test]
#[serial]
fn send_signer_message_with_retry_should_succeed() {
let config = GlobalConfig::load_from_file("./src/tests/conf/signer-0.toml").unwrap();
let config = GlobalConfig::load_from_file("./src/tests/conf/signer-1.toml").unwrap();
let signer_config = generate_signer_config(&config, 5, 20);
let mut stackerdb = StackerDB::from(&signer_config);

Expand Down
3 changes: 0 additions & 3 deletions stacks-signer/src/client/stacks_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,6 @@ mod tests {
use blockstack_lib::chainstate::stacks::ThresholdSignature;
use rand::thread_rng;
use rand_core::RngCore;
use serial_test::serial;
use stacks_common::bitvec::BitVec;
use stacks_common::consts::{CHAIN_ID_TESTNET, SIGNER_SLOTS_PER_USER};
use stacks_common::types::chainstate::{ConsensusHash, StacksBlockId, TrieHash};
Expand Down Expand Up @@ -837,7 +836,6 @@ mod tests {

#[ignore]
#[test]
#[serial]
fn build_vote_for_aggregate_public_key_should_succeed() {
let mock = MockServerClient::new();
let point = Point::from(Scalar::random(&mut rand::thread_rng()));
Expand All @@ -861,7 +859,6 @@ mod tests {

#[ignore]
#[test]
#[serial]
fn broadcast_vote_for_aggregate_public_key_should_succeed() {
let mock = MockServerClient::new();
let point = Point::from(Scalar::random(&mut rand::thread_rng()));
Expand Down
1 change: 0 additions & 1 deletion stacks-signer/src/tests/conf/signer-0.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

stacks_private_key = "6a1fc1a3183018c6d79a4e11e154d2bdad2d89ac8bc1b0a021de8b4d28774fbb01"
node_host = "127.0.0.1:20443"
endpoint = "localhost:30000"
Expand Down
3 changes: 1 addition & 2 deletions stacks-signer/src/tests/conf/signer-1.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

stacks_private_key = "126e916e77359ccf521e168feea1fcb9626c59dc375cae00c7464303381c7dff01"
node_host = "127.0.0.1:20443"
node_host = "127.0.0.1:20444"
endpoint = "localhost:30001"
network = "testnet"
5 changes: 0 additions & 5 deletions stacks-signer/src/tests/conf/signer-2.toml

This file was deleted.

5 changes: 0 additions & 5 deletions stacks-signer/src/tests/conf/signer-3.toml

This file was deleted.

0 comments on commit 0910eed

Please sign in to comment.