mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-09 22:48:54 +01:00
stops snapshotting in advance_till when we don't need to
This commit is contained in:
parent
110dc01f40
commit
2d9a055fb9
@ -2000,11 +2000,13 @@ mod tests {
|
|||||||
fn advance_till(&mut self, breakpoints: impl IntoIterator<Item = Breakpoint>) {
|
fn advance_till(&mut self, breakpoints: impl IntoIterator<Item = Breakpoint>) {
|
||||||
for breakpoint in breakpoints {
|
for breakpoint in breakpoints {
|
||||||
let b = self.advance();
|
let b = self.advance();
|
||||||
let state = snapshot_index_scheduler(&self.index_scheduler);
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
b, breakpoint,
|
b,
|
||||||
"Was expecting the breakpoint `{:?}` but instead got `{:?}`.\n{state}",
|
breakpoint,
|
||||||
breakpoint, b
|
"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.
|
// Wait for one successful batch.
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
fn advance_one_successful_batch(&mut self) {
|
fn advance_one_successful_batch(&mut self) {
|
||||||
self.index_scheduler.assert_internally_consistent();
|
|
||||||
self.advance_till([Start, BatchCreated]);
|
self.advance_till([Start, BatchCreated]);
|
||||||
loop {
|
loop {
|
||||||
match self.advance() {
|
match self.advance() {
|
||||||
@ -2047,7 +2048,6 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
self.advance_till([AfterProcessing]);
|
self.advance_till([AfterProcessing]);
|
||||||
self.index_scheduler.assert_internally_consistent();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait for one failed batch.
|
// Wait for one failed batch.
|
||||||
|
Loading…
Reference in New Issue
Block a user