diff --git a/scylla/src/transport/connection.rs b/scylla/src/transport/connection.rs index 8429e5aec1..de79c5d130 100644 --- a/scylla/src/transport/connection.rs +++ b/scylla/src/transport/connection.rs @@ -1833,6 +1833,7 @@ mod tests { use super::ConnectionConfig; use crate::query::Query; use crate::transport::connection::open_connection; + use crate::transport::connection::QueryResponse; use crate::transport::node::ResolvedContactPoint; use crate::transport::topology::UntranslatedEndpoint; use crate::utils::test_utils::unique_keyspace_name; @@ -2024,18 +2025,22 @@ mod tests { let q = Query::new("INSERT INTO t (p, v) VALUES (?, ?)"); let conn = conn.clone(); async move { - conn.query(&q, (j, vec![j as u8; j as usize]), None) + let response: QueryResponse = conn + .query(&q, (j, vec![j as u8; j as usize]), None) .await - .unwrap() + .unwrap(); + // QueryResponse might contain an error - make sure that there were no errors + let _nonerror_response = + response.into_non_error_query_response().unwrap(); } }); - futures::future::join_all(futs).await; + let _joined: Vec<()> = futures::future::join_all(futs).await; })); tokio::task::yield_now().await; } - futures::future::join_all(futs).await; + let _joined: Vec<()> = futures::future::try_join_all(futs).await.unwrap(); // Check that everything was written properly let range_end = arithmetic_sequence_sum(NUM_BATCHES);