Skip to content

Commit fe094dc

Browse files
test sqlite database close method
Signed-off-by: Andrew Whitehead <[email protected]>
1 parent 00def86 commit fe094dc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/sqlite/sqlite.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ async fn it_executes_with_pool() -> anyhow::Result<()> {
206206
async fn it_opens_in_memory() -> anyhow::Result<()> {
207207
// If the filename is ":memory:", then a private, temporary in-memory database
208208
// is created for the connection.
209-
let _ = SqliteConnection::connect(":memory:").await?;
209+
let conn = SqliteConnection::connect(":memory:").await?;
210+
conn.close().await?;
210211

211212
Ok(())
212213
}
@@ -215,7 +216,8 @@ async fn it_opens_in_memory() -> anyhow::Result<()> {
215216
async fn it_opens_temp_on_disk() -> anyhow::Result<()> {
216217
// If the filename is an empty string, then a private, temporary on-disk database will
217218
// be created.
218-
let _ = SqliteConnection::connect("").await?;
219+
let conn = SqliteConnection::connect("").await?;
220+
conn.close().await?;
219221

220222
Ok(())
221223
}

0 commit comments

Comments
 (0)