-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: move more Kafka tests to source_inline
- Loading branch information
Showing
100 changed files
with
120 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 0 additions & 46 deletions
46
e2e_test/source/basic/nexmark/nexmark_endless_part1.slt.part
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
21 changes: 18 additions & 3 deletions
21
...st/source/basic/temporary_kafka_batch.slt → ...ce_inline/kafka/temporary_kafka_batch.slt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
control substitution on | ||
|
||
system ok | ||
rpk topic delete test_ttl_table_with_con || true | ||
|
||
system ok | ||
rpk topic create test_ttl_table_with_con -p 1 | ||
|
||
system ok | ||
cat <<EOF | rpk topic produce test_ttl_table_with_con -f "%v\n" | ||
{"v1": 1, "v2": "1"} | ||
{"v1": 2, "v2": "22"} | ||
{"v1": 3, "v2": "333"} | ||
{"v1": 4, "v2": "4444"} | ||
EOF | ||
|
||
statement ok | ||
create table t (v1 int, v2 varchar) APPEND ONLY with ( | ||
${RISEDEV_KAFKA_WITH_OPTIONS_COMMON}, | ||
topic = 'test_ttl_table_with_con', | ||
scan.startup.mode = 'earliest', | ||
retention_seconds = 5 | ||
) FORMAT PLAIN ENCODE JSON; | ||
|
||
statement ok | ||
flush; | ||
|
||
# Wait enough time to ensure SourceExecutor consumes all Kafka data. | ||
sleep 1s | ||
|
||
query IT rowsort | ||
select * from t | ||
---- | ||
1 1 | ||
2 22 | ||
3 333 | ||
4 4444 | ||
|
||
statement ok | ||
select pg_sleep(10); | ||
|
||
query I | ||
select * from t; | ||
---- | ||
|
||
statement ok | ||
drop table t; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,10 @@ | ||
> [!NOTE] | ||
> | ||
> Please write new tests according to the style in `e2e_test/source_inline`. | ||
> Don't add new tests here. | ||
> DO NOT ADD NEW TESTS HERE! | ||
> | ||
> See the [connector development guide](http://risingwavelabs.github.io/risingwave/connector/intro.html#end-to-end-tests) for more information about how to test. | ||
Test in this directory needs some prior setup. | ||
|
||
See also `ci/scripts/e2e-source-test.sh`, and `scripts/source` | ||
|
||
## Kafka | ||
|
||
`scripts/source/test_data` contains the data. Filename's convention is `<topic_name>.<n_partitions>`. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,4 +57,4 @@ SELECT * FROM tt1; | |
1 2023-10-23 10:00:00+00:00 | ||
|
||
statement ok | ||
drop table tt1; | ||
drop table tt1; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -201,4 +201,4 @@ statement ok | |
drop table s8 | ||
|
||
statement ok | ||
drop source s9 | ||
drop source s9 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
scripts/source/test_data/cannal_json.1 → ...gacy/kafka/script/test_data/cannal_json.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{"data":[{"id":"1","name":"mike","is_adult":"0","balance":"1000.62","reg_time":"2018-01-01 00:00:01","win_rate":"0.65"}],"database":"demo","es":1668673394000,"id":5,"isDdl":false,"mysqlType":{"id":"int","name":"varchar(40)","is_adult":"boolean","balance":"decimal(10,2)","reg_time":"timestamp","win_rate":"double"},"old":null,"pkNames":null,"sql":"","sqlType":{"id":4,"name":12,"is_adult":-6,"balance":3,"reg_time":93,"win_rate":8},"table":"demo","ts":1668673394788,"type":"INSERT"} | ||
{"data":[{"id":"2","name":"alice","is_adult":"1","balance":"2000.62","reg_time":"2020-01-01 00:00:01","win_rate":"0.55"}],"database":"demo","es":1668673417000,"id":6,"isDdl":false,"mysqlType":{"id":"int","name":"varchar(40)","is_adult":"boolean","balance":"decimal(10,2)","reg_time":"timestamp","win_rate":"double"},"old":null,"pkNames":null,"sql":"","sqlType":{"id":4,"name":12,"is_adult":-6,"balance":3,"reg_time":93,"win_rate":8},"table":"demo","ts":1668673417265,"type":"INSERT"} | ||
{"data":[{"id":"1","name":"mike","is_adult":"0","balance":"1500.62","reg_time":"2018-01-01 00:00:01","win_rate":"0.65"}],"database":"demo","es":1668673476000,"id":7,"isDdl":false,"mysqlType":{"id":"int","name":"varchar(40)","is_adult":"boolean","balance":"decimal(10,2)","reg_time":"timestamp","win_rate":"double"},"old":[{"balance":"1000.62"}],"pkNames":null,"sql":"","sqlType":{"id":4,"name":12,"is_adult":-6,"balance":3,"reg_time":93,"win_rate":8},"table":"demo","ts":1668673476732,"type":"UPDATE"} | ||
{"data":[{"id":"2","name":"alice","is_adult":"1","balance":"2000.62","reg_time":"2020-01-01 00:00:01","win_rate":"0.55"}],"database":"demo","es":1668673493000,"id":8,"isDdl":false,"mysqlType":{"id":"int","name":"varchar(40)","is_adult":"boolean","balance":"decimal(10,2)","reg_time":"timestamp","win_rate":"double"},"old":null,"pkNames":null,"sql":"","sqlType":{"id":4,"name":12,"is_adult":-6,"balance":3,"reg_time":93,"win_rate":8},"table":"demo","ts":1668673493638,"type":"DELETE"} | ||
{"data":[{"id":"2","name":"alice","is_adult":"1","balance":"2000.62","reg_time":"2020-01-01 00:00:01","win_rate":"0.55"}],"database":"demo","es":1668673493000,"id":8,"isDdl":false,"mysqlType":{"id":"int","name":"varchar(40)","is_adult":"boolean","balance":"decimal(10,2)","reg_time":"timestamp","win_rate":"double"},"old":null,"pkNames":null,"sql":"","sqlType":{"id":4,"name":12,"is_adult":-6,"balance":3,"reg_time":93,"win_rate":8},"table":"demo","ts":1668673493638,"type":"DELETE"} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
scripts/source/test_data/json_c.1 → ...ce_legacy/kafka/script/test_data/json_c.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"id": 100, "code": "abc", "timestamp": 1473305798, "xfas": [{"device_model_id": 0, "device_make_id": 200, "ip": "10.0.0.1"}, {"device_model_id": 1, "device_make_id": 400, "ip": "10.0.0.2"}], "contacts": {"phones": ["1xxx", "2xxx"], "emails": ["1xxx", "2xxx"]}, "jsonb": {"blockNumber": 16938734}} | ||
{"id": 100, "code": "abc", "timestamp": 1473305798, "xfas": [{"device_model_id": 0, "device_make_id": 200, "ip": "10.0.0.1"}, {"device_model_id": 1, "device_make_id": 400, "ip": "10.0.0.2"}], "contacts": {"phones": ["1xxx", "2xxx"], "emails": ["1xxx", "2xxx"]}, "jsonb": {"blockNumber": 16938734}} |
2 changes: 1 addition & 1 deletion
2
...ce/test_data/json_schema_without_schema.1 → ...pt/test_data/json_schema_without_schema.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"productId":1,"productName":"An ice sculpture","price":12.5,"tags":["cold","ice"],"dimensions":{"length":7,"width":12,"height":9.5}} | ||
{"productId":1,"productName":"An ice sculpture","price":12.5,"tags":["cold","ice"],"dimensions":{"length":7,"width":12,"height":9.5}} |
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ource/test_data/kafka_1_partition_topic.1 → ...cript/test_data/kafka_1_partition_topic.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{"v1": 1, "v2": "1"} | ||
{"v1": 2, "v2": "22"} | ||
{"v1": 3, "v2": "333"} | ||
{"v1": 4, "v2": "4444"} | ||
{"v1": 4, "v2": "4444"} |
2 changes: 1 addition & 1 deletion
2
...ource/test_data/kafka_2_partition_topic.2 → ...cript/test_data/kafka_2_partition_topic.2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{"v1": 1, "v2": "1"} | ||
{"v1": 2, "v2": "22"} | ||
{"v1": 3, "v2": "333"} | ||
{"v1": 4, "v2": "4444"} | ||
{"v1": 4, "v2": "4444"} |
2 changes: 1 addition & 1 deletion
2
...ource/test_data/kafka_3_partition_topic.3 → ...cript/test_data/kafka_3_partition_topic.3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{"v1": 1, "v2": "1"} | ||
{"v1": 2, "v2": "22"} | ||
{"v1": 3, "v2": "333"} | ||
{"v1": 4, "v2": "4444"} | ||
{"v1": 4, "v2": "4444"} |
Oops, something went wrong.