-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: xxchan <[email protected]>
- Loading branch information
Showing
9 changed files
with
84 additions
and
74 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 was deleted.
Oops, something went wrong.
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,58 @@ | ||
control substitution on | ||
|
||
system ok | ||
rpk topic delete sr_pb_test || true; \\ | ||
(rpk sr subject delete 'sr_pb_test-value' && rpk sr subject delete 'sr_pb_test-value' --permanent) || true; | ||
|
||
system ok | ||
python3 e2e_test/source_inline/kafka/protobuf/pb.py "${RISEDEV_KAFKA_BOOTSTRAP_SERVERS}" "${RISEDEV_SCHEMA_REGISTRY_URL}" "sr_pb_test" 20 user | ||
|
||
# make sure google/protobuf/source_context.proto is NOT in schema registry | ||
system | ||
curl --silent '${RISEDEV_SCHEMA_REGISTRY_URL}' | grep -v 'google/protobuf/source_context.proto' | ||
|
||
# Create a table. | ||
statement ok | ||
create table sr_pb_test with ( | ||
${RISEDEV_KAFKA_WITH_OPTIONS_COMMON}, | ||
topic = 'sr_pb_test', | ||
scan.startup.mode = 'earliest') | ||
FORMAT plain ENCODE protobuf( | ||
schema.registry = '${RISEDEV_SCHEMA_REGISTRY_URL}', | ||
message = 'test.User' | ||
); | ||
|
||
# for multiple schema registry nodes | ||
statement ok | ||
create table sr_pb_test_bk with ( | ||
${RISEDEV_KAFKA_WITH_OPTIONS_COMMON}, | ||
topic = 'sr_pb_test', | ||
scan.startup.mode = 'earliest') | ||
FORMAT plain ENCODE protobuf( | ||
schema.registry = '${RISEDEV_SCHEMA_REGISTRY_URL},${RISEDEV_SCHEMA_REGISTRY_URL}', | ||
message = 'test.User' | ||
); | ||
|
||
# Wait for source | ||
sleep 2s | ||
|
||
# Flush into storage | ||
statement ok | ||
flush; | ||
|
||
query I | ||
select count(*) from sr_pb_test; | ||
---- | ||
20 | ||
|
||
query IT | ||
select min(id), max(id), max((sc).file_name) from sr_pb_test; | ||
---- | ||
0 19 source/context_019.proto | ||
|
||
|
||
statement ok | ||
drop table sr_pb_test; | ||
|
||
statement ok | ||
drop table sr_pb_test_bk; |
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.