Skip to content

Commit

Permalink
Merge pull request #834 from cvybhu/colaerror
Browse files Browse the repository at this point in the history
test_coalescing: improve error handling
  • Loading branch information
piodul authored Oct 23, 2023
2 parents 2641d1b + d532dd9 commit 535c724
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions scylla/src/transport/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 535c724

Please sign in to comment.