]> git.bitcoin.ninja Git - rapid-gossip-sync-server/commitdiff
Don't panic while panicking.
authorArik Sosman <git@arik.io>
Wed, 24 Apr 2024 23:51:57 +0000 (16:51 -0700)
committerArik Sosman <git@arik.io>
Wed, 8 May 2024 08:07:38 +0000 (01:07 -0700)
src/tests/mod.rs

index cbacca66e4a00d75ae828788aad2f7013cec4347..dbe5a52abdebce26e024eedefdf21865ea4b3c60 100644 (file)
@@ -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);
                        }
                });