mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-19 08:39:44 +00:00
add test for fetch one messing up stream states
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user