From 9d503d253b3aae7a6d20f01cbcf437b2f2647698 Mon Sep 17 00:00:00 2001 From: Ruediger Klaehn Date: Wed, 4 Dec 2024 17:32:05 +0200 Subject: [PATCH] give eviction more time --- iroh-dns-server/src/lib.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/iroh-dns-server/src/lib.rs b/iroh-dns-server/src/lib.rs index 6afeb939bd..1c7bcc7492 100644 --- a/iroh-dns-server/src/lib.rs +++ b/iroh-dns-server/src/lib.rs @@ -212,9 +212,14 @@ mod tests { .await?; tokio::time::sleep(Duration::from_secs(1)).await; - let entry = store.get_signed_packet(&key).await?; - assert!(entry.is_none()); - Ok(()) + for _ in 0..10 { + let entry = store.get_signed_packet(&key).await?; + if entry.is_none() { + return Ok(()); + } + tokio::time::sleep(Duration::from_secs(1)).await; + } + panic!("store did not evict packet"); } #[tokio::test]