Open tomasol opened 5 months ago
Sorry for the delayed response, but thanks for filing an issue! I'm curious, what connection parameters are you using to connect?
No problem. Here is a more complete example:
async_test!(check_init);
async fn check_init() {
let file = tempfile::NamedTempFile::new().unwrap();
let path = file.path();
let pool = PoolBuilder::new()
.path(path)
.journal_mode(JournalMode::Wal)
// .num_conns(1)
.open()
.await
.unwrap();
}
Running the test in a loop fails within seconds.
while true; do cargo test --workspace check_init || break; done
Note that the file must not exist before the test. The other workaround is to set num_conns(1)
.
Hi, thanks for the library. I am running into an issue during tests, where I am creating a temporary database with a pool:
Occasionally I get an error:
The workaround is to create the file before creating the pool:
Not sure if this is worth fixing or just mentioning in docs.