mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Run coordinator e2e tests one at a time due to usage of mdns causing cross-talk
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
use std::{
|
use std::{
|
||||||
|
sync::Mutex,
|
||||||
time::Duration,
|
time::Duration,
|
||||||
collections::{HashSet, HashMap},
|
collections::{HashSet, HashMap},
|
||||||
};
|
};
|
||||||
@@ -235,6 +236,7 @@ pub async fn batch<C: Ciphersuite>(
|
|||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn batch_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();
|
let (processors, test) = new_test();
|
||||||
|
|
||||||
test
|
test
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
use std::{
|
use std::{
|
||||||
|
sync::Mutex,
|
||||||
time::{Duration, SystemTime},
|
time::{Duration, SystemTime},
|
||||||
collections::HashMap,
|
collections::HashMap,
|
||||||
};
|
};
|
||||||
@@ -172,6 +173,7 @@ pub async fn key_gen<C: Ciphersuite>(
|
|||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn key_gen_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();
|
let (processors, test) = new_test();
|
||||||
|
|
||||||
test
|
test
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
use std::sync::OnceLock;
|
||||||
|
|
||||||
use ciphersuite::Ristretto;
|
use ciphersuite::Ristretto;
|
||||||
|
|
||||||
use dockertest::DockerTest;
|
use dockertest::DockerTest;
|
||||||
@@ -16,6 +18,8 @@ pub use sign::sign;
|
|||||||
pub(crate) const COORDINATORS: usize = 4;
|
pub(crate) const COORDINATORS: usize = 4;
|
||||||
pub(crate) const THRESHOLD: usize = ((COORDINATORS * 2) / 3) + 1;
|
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) {
|
pub(crate) fn new_test() -> (Vec<(Handles, <Ristretto as Ciphersuite>::F)>, DockerTest) {
|
||||||
let mut coordinators = vec![];
|
let mut coordinators = vec![];
|
||||||
let mut test = DockerTest::new();
|
let mut test = DockerTest::new();
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
use std::{
|
use std::{
|
||||||
|
sync::Mutex,
|
||||||
time::Duration,
|
time::Duration,
|
||||||
collections::{HashSet, HashMap},
|
collections::{HashSet, HashMap},
|
||||||
};
|
};
|
||||||
@@ -177,6 +178,7 @@ pub async fn sign<C: Ciphersuite>(
|
|||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn sign_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();
|
let (processors, test) = new_test();
|
||||||
|
|
||||||
test
|
test
|
||||||
|
|||||||
Reference in New Issue
Block a user