From e257710961fc65d7f305e58c9ad41566eeebe65c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Wed, 30 Aug 2023 18:03:24 +0200 Subject: [PATCH] WIP fix the tests --- index-scheduler/src/insta_snapshot.rs | 1 + index-scheduler/src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/index-scheduler/src/insta_snapshot.rs b/index-scheduler/src/insta_snapshot.rs index afcfdb270..5943b2319 100644 --- a/index-scheduler/src/insta_snapshot.rs +++ b/index-scheduler/src/insta_snapshot.rs @@ -38,6 +38,7 @@ pub fn snapshot_index_scheduler(scheduler: &IndexScheduler) -> String { test_breakpoint_sdr: _, planned_failures: _, run_loop_iteration: _, + zookeeper: _, } = scheduler; let rtxn = env.read_txn().unwrap(); diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index e9ae84fff..45a1eb481 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -608,13 +608,12 @@ impl IndexScheduler { /// only once per index scheduler. fn run(&self) { #[cfg(test)] - run.breakpoint(Breakpoint::Init); + self.breakpoint(Breakpoint::Init); let latch = match self.zookeeper.clone() { Some(zookeeper) => { let id = Uuid::new_v4().to_string(); let latch = LeaderLatch::new(zookeeper.clone(), id, "/election".to_string()); - latch.start().unwrap(); let this = self.private_clone(); zookeeper @@ -1941,6 +1940,7 @@ mod tests { autobatching_enabled: true, max_number_of_tasks: 1_000_000, instance_features: Default::default(), + zookeeper: None, }; configuration(&mut options);