Skip to content

Commit

Permalink
drop pool beforehand
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed Feb 22, 2025
1 parent e857490 commit 79746a0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/kitsune-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ where
.await
.expect("Failed to connect to database");

provide_resource(pool, func, async |_pool| {
provide_resource(pool, func, async |pool| {
// close all existing connections to the database
drop(pool);

// force deletion just in case we missed something. it's whatever.
admin_conn
.batch_execute(&format!("DROP DATABASE {db_name} WITH (FORCE)"))
.await
Expand Down

0 comments on commit 79746a0

Please sign in to comment.