about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/database/postgres/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/database/postgres/mod.rs b/src/database/postgres/mod.rs
index b705eed..8d67bb4 100644
--- a/src/database/postgres/mod.rs
+++ b/src/database/postgres/mod.rs
@@ -206,7 +206,10 @@ WHERE
 
         let new_post = {
             let mut post = old_post.clone();
+            #[cfg(not(test))] // Tests use the current-thread runtime.
             tokio::task::block_in_place(|| f(&mut post));
+            #[cfg(test)]
+            f(&mut post);
 
             post
         };