From eb7e4e5c1c8d63cc837c0f50615f305ece198ad5 Mon Sep 17 00:00:00 2001 From: Akira Hayakawa Date: Wed, 30 Oct 2024 03:13:34 +0000 Subject: [PATCH 1/2] test: increase threads to 8 --- tests/env/src/lib.rs | 1 + tests/sorock-tests/tests/6_persistency.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/env/src/lib.rs b/tests/env/src/lib.rs index 41b76406..62887c1e 100644 --- a/tests/env/src/lib.rs +++ b/tests/env/src/lib.rs @@ -91,6 +91,7 @@ impl Node { .name(nd_tag.clone()) .spawn(move || { let runtime = tokio::runtime::Builder::new_multi_thread() + .worker_threads(8) .thread_name(nd_tag) .enable_all() .build() diff --git a/tests/sorock-tests/tests/6_persistency.rs b/tests/sorock-tests/tests/6_persistency.rs index cc7d0f6b..87259f30 100644 --- a/tests/sorock-tests/tests/6_persistency.rs +++ b/tests/sorock-tests/tests/6_persistency.rs @@ -36,7 +36,7 @@ async fn n3_restore() -> Result<()> { cluster.env().add_node(1); cluster.env().check_connectivity(1).await?; // Wait for election. - tokio::time::sleep(Duration::from_secs(30)).await; + tokio::time::sleep(Duration::from_secs(10)).await; assert_eq!(cluster.user(1).read(0).await?, cur_state); Ok(()) From 4fc645414022fdd27e23c1b38d4b3d0aa1681ba4 Mon Sep 17 00:00:00 2001 From: Akira Hayakawa Date: Wed, 30 Oct 2024 21:24:23 +0900 Subject: [PATCH 2/2] Revert to redb 2.1 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 403f504e..fd1018b9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ prost = "0.13" prost-build = "0.13" protox = "0.7" rand = "0.8" -redb = "2.2" +redb = "2.1" spin = "0.9" tokio = "1.38" tonic = "0.12"