-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write integration tests for data conversions for schema #77
Comments
@ikbalkaya I provided a few pointers for how we might do this in our internal Slack channel, can you perhaps explain here the things you tried and what you couldn't quite get to work, so that anyone picking this up in future can build off the learnings you made? |
@lmars I tried to summarize my findings and some potential options we can try - hopefully it is clear |
@ikbalkaya here are the pointers I provided in the Slack channel: With regards to starting a schema registry:
and with regards to producing Avro-encoded data:
Did you try out any of these approaches? |
@lmars I tried both and wasn't able to combine all elements together. As far as I remember for |
Currently we use
EmbeddedConnectCluster
to run our integration tests. This provides a way to run tests without having to provision an external cluster for tests.However it looks like it is currently not possible to exchange data with schema registry - and it doesn't seem to be possible to produce data with a schema (Avro schema in the case I tried)
While trying to find a way to write unit tests I found myself using classess here https://github.com/confluentinc/schema-registry it is easy to serialize, deserialize and convert messages with Avro using this repo as it contains the
AvroConverter
itself. It also hasMockSchemaRegistryClient
that can be used to exchange schema between producers and consumers for unit tests.I think this particular repo can be further checked to see if there are embedded classes / utilities that provide ability to wire up schemas with producers and connectors and also some utilities that provide a way to send a data with schema to Kafka.
It is also worth to check whether we can use
MockSchemaRegistryClient
in our current test setup┆Issue is synchronized with this Jira Uncategorised by Unito
The text was updated successfully, but these errors were encountered: