From: Arik Sosman Date: Wed, 24 Apr 2024 23:51:57 +0000 (-0700) Subject: Don't panic while panicking. X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=a0dbebe49cd7c472860d74054a3678dc25de2fcf;p=rapid-gossip-sync-server Don't panic while panicking. --- diff --git a/src/tests/mod.rs b/src/tests/mod.rs index cbacca6..dbe5a52 100644 --- a/src/tests/mod.rs +++ b/src/tests/mod.rs @@ -136,6 +136,9 @@ impl Drop for SchemaSanitizer { IS_TEST_SCHEMA_CLEAN.with(|cleanliness_reference| { let is_clean_option = cleanliness_reference.borrow(); if let Some(is_clean) = *is_clean_option { + if std::thread::panicking() { + return; + } assert_eq!(is_clean, true); } });