Skip to content

Commit

Permalink
re-enable tests (#871)
Browse files Browse the repository at this point in the history
  • Loading branch information
conorbros committed Oct 25, 2022
1 parent fcc5de6 commit f6de0ca
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions shotover-proxy/tests/cassandra_int_tests/prepared_statements.rs
Expand Up @@ -80,28 +80,26 @@ async fn select_cross_connection<Fut>(
async fn use_statement(session: &CassandraConnection) {
// Create prepared command with the correct keyspace
run_query(session, "USE test_prepare_statements;").await;
let _prepared = session
let prepared = session
.prepare("INSERT INTO table_1 (id) VALUES (?);")
.await;

// change the keyspace to be incorrect
run_query(session, "USE test_prepare_statements_empty;").await;

// TODO: Somehow executing the query fails when run through shotover but succeeds when run directly against cassandra
// We should investigate and fix the issue in shotover
// observe query completing against the original keyspace without errors
// assert_eq!(
// session.execute_prepared(&prepared, 358),
// Vec::<Vec<ResultValue>>::new()
// );

// // observe that the query succeeded despite the keyspace being incorrect at the time.
// assert_query_result(
// session,
// "SELECT id FROM test_prepare_statements.table_1 WHERE id = 358;",
// &[&[ResultValue::Int(358)]],
// )
// .await;
assert_eq!(
session.execute_prepared(&prepared, 358).await,
Vec::<Vec<ResultValue>>::new()
);

// observe that the query succeeded despite the keyspace being incorrect at the time.
assert_query_result(
session,
"SELECT id FROM test_prepare_statements.table_1 WHERE id = 358;",
&[&[ResultValue::Int(358)]],
)
.await;
}

pub async fn test<Fut>(session: &CassandraConnection, connection_creator: impl Fn() -> Fut)
Expand Down

0 comments on commit f6de0ca

Please sign in to comment.