mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-02 07:21:08 +00:00
Merge branch 'fetch-one-hang' of https://github.com/Freax13/sqlx into Freax13-fetch-one-hang
This commit is contained in:
commit
476b9308f2
@ -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::<MySql>().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(())
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user