adaptive-alerting icon indicating copy to clipboard operation
adaptive-alerting copied to clipboard

Create kafka-junit test for KafkaAnomalyDetectorManager

Open williewheeler opened this issue 6 years ago • 1 comments

Currently the unit test is based on Kafka's test-utils package, but kafka-junit provides deeper support as it allows us to set up a mock broker with input/output topics that we can use. Update the existing unit test to use kafka-junit.

williewheeler avatar Feb 19 '19 14:02 williewheeler

Not so sure we want to do this after all. On a couple occasions I've run into seeming interactions between tests where disabling one kafka-junit test causes another one to fail:

Connection to node 1 could not be established. Broker may not be available.

This could easily be a matter of my inexperience with kafka-junit.

Might make more sense to use the Kafka Streams test framework, which doesn't spin up a broker, and save the broker stuff for integration tests.

https://kafka.apache.org/11/documentation/streams/developer-guide/testing.html

@adriancole Do you have an opinion here?

williewheeler avatar Apr 03 '19 03:04 williewheeler