Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cassandra 5 functions #1474

Merged
merged 10 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions shotover-proxy/tests/cassandra_int_tests/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ async fn drop_function(session: &CassandraConnection) {
async fn create_function(session: &CassandraConnection) {
run_query(
session,
"CREATE FUNCTION test_function_keyspace.my_function (a int, b int) RETURNS NULL ON NULL INPUT RETURNS int LANGUAGE javascript AS 'a * b';"
).await;
"CREATE FUNCTION test_function_keyspace.my_function (a int, b int)
RETURNS NULL ON NULL INPUT
RETURNS int
LANGUAGE java
AS $$ return a * b; $$;",
)
.await;

assert_query_result(
session,
Expand Down
28 changes: 4 additions & 24 deletions shotover-proxy/tests/cassandra_int_tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1021,19 +1021,9 @@ async fn cassandra_5(#[case] driver: CassandraDriver) {
.start()
.await;

let connection_creator = || CassandraConnectionBuilder::new("127.0.0.1", 9042, driver).build();

let connection = connection_creator().await;
let connection = || CassandraConnectionBuilder::new("127.0.0.1", 9042, driver).build();

keyspace::test(&connection).await;
table::test(&connection).await;
udt::test(&connection).await;
native_types::test(&connection).await;
collections::test(&connection, driver).await;
prepared_statements_simple::test(&connection, connection_creator, 1).await;
prepared_statements_all::test(&connection, 1).await;
batch_statements::test(&connection).await;
timestamp::test(&connection).await;
standard_test_suite(&connection, driver).await;

shotover.shutdown_and_then_consume_events(&[]).await;
}
Expand All @@ -1047,7 +1037,7 @@ async fn cassandra_5_cluster(#[case] driver: CassandraDriver) {
.start()
.await;

let connection_creator = || async {
let connection = || async {
let mut connection = CassandraConnectionBuilder::new("127.0.0.1", 9042, driver)
.build()
.await;
Expand All @@ -1057,17 +1047,7 @@ async fn cassandra_5_cluster(#[case] driver: CassandraDriver) {
connection
};

let connection = connection_creator().await;

keyspace::test(&connection).await;
table::test(&connection).await;
udt::test(&connection).await;
native_types::test(&connection).await;
collections::test(&connection, driver).await;
prepared_statements_simple::test(&connection, connection_creator, 1).await;
prepared_statements_all::test(&connection, 1).await;
batch_statements::test(&connection).await;
timestamp::test(&connection).await;
standard_test_suite(&connection, driver).await;

shotover.shutdown_and_then_consume_events(&[]).await;
}
Loading