protobuf-wrong-message-count.td 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. $ set-arg-default single-replica-cluster=quickstart
  10. # Test that Protobuf files with too few or too many messages are handled
  11. # correctly.
  12. $ kafka-create-topic topic=too-few partitions=1
  13. $ kafka-create-topic topic=too-many partitions=1
  14. $ schema-registry-publish subject=testdrive-too-few-${testdrive.seed}-value schema-type=protobuf
  15. syntax = "proto3";
  16. $ schema-registry-publish subject=testdrive-too-many-${testdrive.seed}-value schema-type=protobuf
  17. syntax = "proto3";
  18. message Message1 {}
  19. message Message2 {}
  20. > CREATE CONNECTION IF NOT EXISTS csr_conn TO CONFLUENT SCHEMA REGISTRY (
  21. URL '${testdrive.schema-registry-url}'
  22. );
  23. > CREATE CONNECTION kafka_conn
  24. TO KAFKA (BROKER '${testdrive.kafka-addr}', SECURITY PROTOCOL PLAINTEXT);
  25. > CREATE SOURCE fail_too_few
  26. IN CLUSTER ${arg.single-replica-cluster}
  27. FROM KAFKA CONNECTION kafka_conn (TOPIC 'testdrive-too-few-${testdrive.seed}')
  28. ! CREATE TABLE fail_tbl FROM SOURCE fail_too_few (REFERENCE "testdrive-too-few-${testdrive.seed}")
  29. FORMAT PROTOBUF USING CONFLUENT SCHEMA REGISTRY CONNECTION csr_conn
  30. contains:Protobuf schemas with no messages not yet supported
  31. > CREATE SOURCE fail_too_many
  32. IN CLUSTER ${arg.single-replica-cluster}
  33. FROM KAFKA CONNECTION kafka_conn (TOPIC 'testdrive-too-many-${testdrive.seed}')
  34. ! CREATE TABLE fail_tbl FROM SOURCE fail_too_many (REFERENCE "testdrive-too-many-${testdrive.seed}")
  35. FORMAT PROTOBUF USING CONFLUENT SCHEMA REGISTRY CONNECTION csr_conn
  36. contains:Protobuf schemas with multiple messages not yet supported