diff --git a/tests/mysql.rs b/tests/mysql.rs index 6c059a6f..c6e17e9a 100644 --- a/tests/mysql.rs +++ b/tests/mysql.rs @@ -210,3 +210,21 @@ async fn pool_smoke_test() -> anyhow::Result<()> { Ok(()) } + +#[cfg_attr(feature = "runtime-async-std", async_std::test)] +#[cfg_attr(feature = "runtime-tokio", tokio::test)] +async fn test_fetch_one_and_ping() -> anyhow::Result<()> { + let mut conn = new::().await?; + + let (_id,): (i32,) = sqlx::query_as("SELECT 1 as id") + .fetch_one(&mut conn) + .await?; + + conn.ping().await?; + + let (_id,): (i32,) = sqlx::query_as("SELECT 1 as id") + .fetch_one(&mut conn) + .await?; + + Ok(()) +}