From 2d9a055fb90747bef2c40e33314504eac5dad54e Mon Sep 17 00:00:00 2001 From: Tamo Date: Thu, 18 Jul 2024 12:04:09 +0200 Subject: [PATCH] stops snapshotting in advance_till when we don't need to --- index-scheduler/src/lib.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index c9ea70bb8..f91cf955a 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -2000,11 +2000,13 @@ mod tests { fn advance_till(&mut self, breakpoints: impl IntoIterator) { for breakpoint in breakpoints { let b = self.advance(); - let state = snapshot_index_scheduler(&self.index_scheduler); assert_eq!( - b, breakpoint, - "Was expecting the breakpoint `{:?}` but instead got `{:?}`.\n{state}", - breakpoint, b + b, + breakpoint, + "Was expecting the breakpoint `{:?}` but instead got `{:?}`.\n{}", + breakpoint, + b, + snapshot_index_scheduler(&self.index_scheduler) ); } } @@ -2028,7 +2030,6 @@ mod tests { // Wait for one successful batch. #[track_caller] fn advance_one_successful_batch(&mut self) { - self.index_scheduler.assert_internally_consistent(); self.advance_till([Start, BatchCreated]); loop { match self.advance() { @@ -2047,7 +2048,6 @@ mod tests { } self.advance_till([AfterProcessing]); - self.index_scheduler.assert_internally_consistent(); } // Wait for one failed batch.