Run coordinator e2e tests one at a time due to usage of mdns causing cross-talk

This commit is contained in:
Luke Parker 2023-08-27 05:40:36 -04:00
parent 775353f8cd
commit 34ffd2fa76
No known key found for this signature in database
4 changed files with 10 additions and 0 deletions

View file

@ -1,4 +1,5 @@
use std::{
sync::Mutex,
time::Duration,
collections::{HashSet, HashMap},
};
@ -235,6 +236,7 @@ pub async fn batch<C: Ciphersuite>(
#[tokio::test]
async fn batch_test() {
let _one_at_a_time = ONE_AT_A_TIME.get_or_init(|| Mutex::new(())).lock();
let (processors, test) = new_test();
test

View file

@ -1,4 +1,5 @@
use std::{
sync::Mutex,
time::{Duration, SystemTime},
collections::HashMap,
};
@ -172,6 +173,7 @@ pub async fn key_gen<C: Ciphersuite>(
#[tokio::test]
async fn key_gen_test() {
let _one_at_a_time = ONE_AT_A_TIME.get_or_init(|| Mutex::new(())).lock();
let (processors, test) = new_test();
test

View file

@ -1,3 +1,5 @@
use std::sync::OnceLock;
use ciphersuite::Ristretto;
use dockertest::DockerTest;
@ -16,6 +18,8 @@ pub use sign::sign;
pub(crate) const COORDINATORS: usize = 4;
pub(crate) const THRESHOLD: usize = ((COORDINATORS * 2) / 3) + 1;
pub(crate) static ONE_AT_A_TIME: OnceLock<Mutex<()>> = OnceLock::new();
pub(crate) fn new_test() -> (Vec<(Handles, <Ristretto as Ciphersuite>::F)>, DockerTest) {
let mut coordinators = vec![];
let mut test = DockerTest::new();

View file

@ -1,4 +1,5 @@
use std::{
sync::Mutex,
time::Duration,
collections::{HashSet, HashMap},
};
@ -177,6 +178,7 @@ pub async fn sign<C: Ciphersuite>(
#[tokio::test]
async fn sign_test() {
let _one_at_a_time = ONE_AT_A_TIME.get_or_init(|| Mutex::new(())).lock();
let (processors, test) = new_test();
test