Unit tests push telemetry encode decode#4440
Unit tests push telemetry encode decode#4440Anchit Jain (anchitj) merged 4 commits intodev_kip_714from
Conversation
7ec933e to
3a91abe
Compare
3a91abe to
1f93898
Compare
Milind L (milindl)
left a comment
There was a problem hiding this comment.
mostly looks good, a few comments.
also later on, we should remove the fprintfs and use RD_UT_SAY or something similar, but leaving that in as the function is used for debugging now
| return status; | ||
| } | ||
|
|
||
| void clear_unit_test_data() { |
There was a problem hiding this comment.
Mark these methods 'static' , everything that's used as a helper function for testing, or non-top level test functions, it's best to make static
| unit_test_data.metric_time = 0; | ||
| } | ||
|
|
||
| bool unit_test_telemetry_gauge() { |
There was a problem hiding this comment.
| bool unit_test_telemetry_gauge() { | |
| bool unit_test_telemetry_gauge(void) { |
minor
| RD_UT_PASS(); | ||
| } | ||
|
|
||
| bool unit_test_telemetry_sum() { |
There was a problem hiding this comment.
| bool unit_test_telemetry_sum() { | |
| bool unit_test_telemetry_sum(void) { |
minor
|
|
||
| int unittest_telemetry_decode(void) { | ||
| int fails = 0; | ||
| fails += unit_test_telemetry_gauge(); |
There was a problem hiding this comment.
Both these tests can be turned into one function with a few params, they just differ at one or two places and the rest is the same
| uint64_t metric_time; | ||
| }; | ||
|
|
||
| struct metric_unit_test_data unit_test_data; |
There was a problem hiding this comment.
since we use this global variable only in this file, declare it static.
f5f7521 to
243a4c4
Compare
|
When do you plan to have KIP 714 working? Is there a roadmap published somewhere? |
|
Dimitris Theodorou (@dtheodor) , KIP-714 is not yet accepted by Apache Kafka: https://cwiki.apache.org/confluence/display/KAFKA/KIP-714%3A+Client+metrics+and+observability So, there's no roadmap yet for librdkafka. We need to wait for acceptance and for it to make it to Apache Kafka before we can put it into librdkafka. |
No description provided.