Skip to content

Commit

Permalink
test(connector): add cassandra/scyllabd-sink compatible test (#14709)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuefengze authored Jan 22, 2024
1 parent 732e582 commit f8a4c53
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 2 deletions.
24 changes: 24 additions & 0 deletions integration_tests/cassandra-and-scylladb-sink/create_sink.sql
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,27 @@ FROM
cassandra.table = 'demo_bhv_table',
cassandra.datacenter = 'datacenter1',
);

CREATE SINK cassandra_types_sink
FROM
cassandra_types WITH (
connector = 'cassandra',
type = 'append-only',
force_append_only='true',
cassandra.url = 'cassandra:9042',
cassandra.keyspace = 'demo',
cassandra.table = 'cassandra_types',
cassandra.datacenter = 'datacenter1',
);

CREATE SINK scylladb_types_sink
FROM
cassandra_types WITH (
connector = 'cassandra',
type = 'append-only',
force_append_only='true',
cassandra.url = 'scylladb:9042',
cassandra.keyspace = 'demo',
cassandra.table = 'cassandra_types',
cassandra.datacenter = 'datacenter1',
);
24 changes: 24 additions & 0 deletions integration_tests/cassandra-and-scylladb-sink/create_source.sql

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion integration_tests/cassandra-and-scylladb-sink/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -euo pipefail

# wait for cassandra and scylladb to start up
sleep 60
sleep 30

# setup cassandra
docker compose exec cassandra cqlsh -f prepare_cassandra_and_scylladb.sql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,20 @@ CREATE table demo_bhv_table(
target_id text,
event_timestamp timestamp,
);

CREATE table cassandra_types (
types_id int primary key,
c_boolean boolean,
c_smallint smallint,
c_integer int,
c_bigint bigint,
c_decimal decimal,
c_real float,
c_double_precision double,
c_varchar text,
c_bytea blob,
c_date date,
c_time time,
c_timestamptz timestamp,
c_interval duration
);
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

sleep(30)

relations = ['demo.demo_bhv_table']
relations = ['demo.demo_bhv_table', 'demo.cassandra_types']

dbs = ['cassandra', 'scylladb']
failed_cases = []
Expand Down

0 comments on commit f8a4c53

Please sign in to comment.