diff --git a/core/tests/behavior/utils.rs b/core/tests/behavior/utils.rs index 6d5a30b54f2a..1f4c2410ee36 100644 --- a/core/tests/behavior/utils.rs +++ b/core/tests/behavior/utils.rs @@ -187,6 +187,11 @@ impl Fixture { pub async fn cleanup(&self, op: impl Into) { let op = op.into(); let paths: Vec<_> = mem::take(self.paths.lock().unwrap().as_mut()); + // Don't call delete if paths is empty + if paths.is_empty() { + return; + } + // We try our best to clean up fixtures, but won't panic if failed. let _ = op.delete_iter(paths).await; }