Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mouli Mukherjee committed Sep 21, 2023
1 parent 5ba0859 commit c857006
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/testdrive/kafka-avro-sinks-defaults.td
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $ set upsert-keyschema={
"name": "Key",
"fields": [
{"name": "key1", "type": "string"},
{"name": "key2", "type": "long"}
{"name": "key2", "type": ["null", "long"]}
]
}

Expand All @@ -30,15 +30,15 @@ $ set upsert-schema={
"name" : "test",
"fields" : [
{"name":"f1", "type":["null", "string"]},
{"name":"f2", "type":"long"}
{"name":"f2", "type":["long", "null"]}
]
}

$ kafka-create-topic topic=upsert-avro

$ kafka-ingest format=avro topic=upsert-avro key-format=avro key-schema=${upsert-keyschema} schema=${upsert-schema}
{"key1": "fish", "key2": 2} {"f1": {"string": "fish"}, "f2": 1000}
{"key1": "fisch", "key2": 42} {"f1": null, "f2": 1000}
{"key1": "fish", "key2": {"long": 2}} {"f1": {"string": "fish"}, "f2": {"long": 1000}}
{"key1": "fisch", "key2": {"long": 42}} {"f1": null, "f2": {"long": 1000}}

> CREATE CONNECTION kafka_conn
TO KAFKA (BROKER '${testdrive.kafka-addr}');
Expand All @@ -62,7 +62,7 @@ $ kafka-ingest format=avro topic=upsert-avro key-format=avro key-schema=${upsert
ENVELOPE UPSERT

$ schema-registry-verify schema-type=avro subject=testdrive-upsert-input-sink1-${testdrive.seed}-value
{"type":"record","name":"envelope","fields":[{"name":"key1","type":"string"},{"name":"key2","type":"long"},{"name":"f1","type":["null","string"],"default":"null"},{"name":"f2","type":"long"}]}
{"type":"record","name":"envelope","fields":[{"name":"key1","type":"string"},{"name":"key2","type":["null","long"],"default":"null"},{"name":"f1","type":["null","string"],"default":"null"},{"name":"f2","type":["null","long"],"default":"null"}]}


> CREATE SINK upsert_input_sink2 FROM upsert_input
Expand All @@ -75,7 +75,7 @@ $ schema-registry-verify schema-type=avro subject=testdrive-upsert-input-sink1-$
ENVELOPE UPSERT

$ schema-registry-verify schema-type=avro subject=testdrive-upsert-input-sink2-${testdrive.seed}-value
{"type":"record","name":"envelope","fields":[{"name":"key1","type":"string"},{"name":"key2","type":"long"},{"name":"f1","type":["null","string"],"default":"null"},{"name":"f2","type":"long"}]}
{"type":"record","name":"envelope","fields":[{"name":"key1","type":"string"},{"name":"key2","type":["null","long"],"default":"null"},{"name":"f1","type":["null","string"],"default":"null"},{"name":"f2","type":["null","long"],"default":"null"}]}


> CREATE SINK upsert_input_sink3 FROM upsert_input
Expand All @@ -88,7 +88,7 @@ $ schema-registry-verify schema-type=avro subject=testdrive-upsert-input-sink2-$
ENVELOPE UPSERT

$ schema-registry-verify schema-type=avro subject=testdrive-upsert-input-sink3-${testdrive.seed}-value
{"type":"record","name":"envelope","fields":[{"name":"key1","type":"string"},{"name":"key2","type":"long"},{"name":"f1","type":["null","string"]},{"name":"f2","type":"long"}]}
{"type":"record","name":"envelope","fields":[{"name":"key1","type":"string"},{"name":"key2","type":["null","long"]},{"name":"f1","type":["null","string"]},{"name":"f2","type":["null","long"]}]}

> CREATE SINK upsert_input_sink4 FROM upsert_input
INTO KAFKA CONNECTION kafka_conn (TOPIC 'testdrive-upsert-input-sink4-${testdrive.seed}')
Expand All @@ -97,4 +97,4 @@ $ schema-registry-verify schema-type=avro subject=testdrive-upsert-input-sink3-$
ENVELOPE UPSERT

$ schema-registry-verify schema-type=avro subject=testdrive-upsert-input-sink4-${testdrive.seed}-value
{"type":"record","name":"envelope","fields":[{"name":"key1","type":"string"},{"name":"key2","type":"long"},{"name":"f1","type":["null","string"]},{"name":"f2","type":"long"}]}
{"type":"record","name":"envelope","fields":[{"name":"key1","type":"string"},{"name":"key2","type":["null","long"]},{"name":"f1","type":["null","string"]},{"name":"f2","type":["null","long"]}]}

0 comments on commit c857006

Please sign in to comment.