WIP fix the tests

This commit is contained in:
Clément Renault 2023-08-30 18:03:24 +02:00
parent 9dd4423054
commit e257710961
No known key found for this signature in database
GPG Key ID: F250A4C4E3AE5F5F
2 changed files with 3 additions and 2 deletions

View File

@ -38,6 +38,7 @@ pub fn snapshot_index_scheduler(scheduler: &IndexScheduler) -> String {
test_breakpoint_sdr: _, test_breakpoint_sdr: _,
planned_failures: _, planned_failures: _,
run_loop_iteration: _, run_loop_iteration: _,
zookeeper: _,
} = scheduler; } = scheduler;
let rtxn = env.read_txn().unwrap(); let rtxn = env.read_txn().unwrap();

View File

@ -608,13 +608,12 @@ impl IndexScheduler {
/// only once per index scheduler. /// only once per index scheduler.
fn run(&self) { fn run(&self) {
#[cfg(test)] #[cfg(test)]
run.breakpoint(Breakpoint::Init); self.breakpoint(Breakpoint::Init);
let latch = match self.zookeeper.clone() { let latch = match self.zookeeper.clone() {
Some(zookeeper) => { Some(zookeeper) => {
let id = Uuid::new_v4().to_string(); let id = Uuid::new_v4().to_string();
let latch = LeaderLatch::new(zookeeper.clone(), id, "/election".to_string()); let latch = LeaderLatch::new(zookeeper.clone(), id, "/election".to_string());
latch.start().unwrap();
let this = self.private_clone(); let this = self.private_clone();
zookeeper zookeeper
@ -1941,6 +1940,7 @@ mod tests {
autobatching_enabled: true, autobatching_enabled: true,
max_number_of_tasks: 1_000_000, max_number_of_tasks: 1_000_000,
instance_features: Default::default(), instance_features: Default::default(),
zookeeper: None,
}; };
configuration(&mut options); configuration(&mut options);