We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
sqlite
1 parent d1e2e9e commit 467f52bCopy full SHA for 467f52b
tests/sync_wrapper.rs
@@ -4,6 +4,17 @@ use diesel_async::async_connection_wrapper::AsyncConnectionWrapper;
4
5
#[test]
6
fn test_sync_wrapper() {
7
+ // The runtime is required for the `sqlite` implementation to be able to use
8
+ // `spawn_blocking()`. This is not required for `postgres` or `mysql`.
9
+ #[cfg(feature = "sqlite")]
10
+ let rt = tokio::runtime::Builder::new_current_thread()
11
+ .enable_io()
12
+ .build()
13
+ .unwrap();
14
+
15
16
+ let _guard = rt.enter();
17
18
let db_url = std::env::var("DATABASE_URL").unwrap();
19
let mut conn = AsyncConnectionWrapper::<crate::TestConnection>::establish(&db_url).unwrap();
20
0 commit comments