don't use now private module runtime in tests

This commit is contained in:
Ryan Leckey
2020-03-24 03:09:17 -07:00
parent dcea3f0586
commit f83e0296cc
2 changed files with 10 additions and 2 deletions

View File

@@ -162,7 +162,11 @@ async fn pool_immediately_fails_with_db_error() -> anyhow::Result<()> {
#[cfg_attr(feature = "runtime-async-std", async_std::test)]
#[cfg_attr(feature = "runtime-tokio", tokio::test)]
async fn pool_smoke_test() -> anyhow::Result<()> {
use sqlx_core::runtime::{sleep, spawn, timeout};
#[cfg(feature = "runtime-tokio")]
use tokio::{task::spawn, time::delay_for as sleep, time::timeout};
#[cfg(feature = "runtime-async-std")]
use async_std::{future::timeout, task::sleep, task::spawn};
eprintln!("starting pool");

View File

@@ -253,7 +253,11 @@ async fn it_can_rollback_nested_transactions() -> anyhow::Result<()> {
#[cfg_attr(feature = "runtime-async-std", async_std::test)]
#[cfg_attr(feature = "runtime-tokio", tokio::test)]
async fn pool_smoke_test() -> anyhow::Result<()> {
use sqlx_core::runtime::{sleep, spawn, timeout};
#[cfg(feature = "runtime-tokio")]
use tokio::{task::spawn, time::delay_for as sleep, time::timeout};
#[cfg(feature = "runtime-async-std")]
use async_std::{future::timeout, task::sleep, task::spawn};
eprintln!("starting pool");