From a739a68a2d6091c68d2a1390d971b7baf298b61d Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Thu, 2 Jan 2025 21:09:26 +0800 Subject: [PATCH] Skip delete Signed-off-by: Xuanwo --- core/tests/behavior/utils.rs | 5 +++++ 1 file changed, 5 insertions(+) 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; }