mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-19 08:39:44 +00:00
Shut down statement worker in Sqlite Connection::close (#1453)
* add explicit shutdown of sqlite statement worker in Connection::close() Signed-off-by: Andrew Whitehead <cywolf@gmail.com> * test sqlite database close method Signed-off-by: Andrew Whitehead <cywolf@gmail.com> * await worker shutdown after dropping SqliteConnection Signed-off-by: Andrew Whitehead <cywolf@gmail.com> * restore explicit drop Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
This commit is contained in:
@@ -206,7 +206,8 @@ async fn it_executes_with_pool() -> anyhow::Result<()> {
|
||||
async fn it_opens_in_memory() -> anyhow::Result<()> {
|
||||
// If the filename is ":memory:", then a private, temporary in-memory database
|
||||
// is created for the connection.
|
||||
let _ = SqliteConnection::connect(":memory:").await?;
|
||||
let conn = SqliteConnection::connect(":memory:").await?;
|
||||
conn.close().await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -215,7 +216,8 @@ async fn it_opens_in_memory() -> anyhow::Result<()> {
|
||||
async fn it_opens_temp_on_disk() -> anyhow::Result<()> {
|
||||
// If the filename is an empty string, then a private, temporary on-disk database will
|
||||
// be created.
|
||||
let _ = SqliteConnection::connect("").await?;
|
||||
let conn = SqliteConnection::connect("").await?;
|
||||
conn.close().await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user