influxdata / Litmus

testing framework
0 stars 0 forks source link

Method to verify data made it to kafka #107

Closed gshif closed 5 years ago

gshif commented 5 years ago

Need to implement a method to verify data made it to kafka from gateway

gshif commented 5 years ago

The Smoke Test (and other tests as well) would benefit from having a method/function to verify if data was written to kafka. There could be different ways of writing the data, but the one, that is used by Smoke Test, is using gateway write endpoint to write a single point.

Basically, execute one of the kafka's shell commands, kafka-console-consumer.sh, and send data to a log file and later grep the parts of the sent data. The challenge with using this approach is that executing kafka-console-consumer.sh some times crashes the kafka container.

gshif commented 5 years ago

Another way is to use the same `kubectl command, but ... grep for a tag value from a topics directory in the kafka container : https://github.com/influxdata/idpe/pull/1971

gshif commented 5 years ago

Added a step to Smoke Test to verify data point made to kafka using the above method

gshif commented 5 years ago

Gave it up to 10 seconds for data to make it to kafka from gateway in case there is a latency (The threshold was added to a smoke test)