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
[#3017] Remove producer metrics when tenant is deleted #3038
[#3017] Remove producer metrics when tenant is deleted #3038
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't it make sense to add test cases that actually verify that the metrics are being removed?
Yes, I can add an integration test here. |
integration test? I was talking about the unit tests ... |
Do you mean unit tests for testing whether |
I was referring to the former. Or isn't that helpful? |
070781f
to
79feaa5
Compare
Testing the actual invocation here would be quite cumbersome. I've added a basic test regarding consumer registration though. |
*/ | ||
@Test | ||
@Timeout(value = 10, timeUnit = TimeUnit.SECONDS) | ||
public void testProducerTopicMetricsGetRemoved() throws InterruptedException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't it make more sense to test this in the context of actually deleting a tenant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a test with a different scope then. But I'm fine with adding a combined integration test like that. I've created KafkaBasedEventSenderIT
now (and removed KafkaProducerHelperIT
).
79feaa5
to
58ee8d3
Compare
@calohmn Did you change anything with your latest push? |
@sophokles73 Only a minor improvement in |
Kafka producer metrics regarding the telemetry, event and command-response topics of a tenant are removed when that tenant got deleted. Signed-off-by: Carsten Lohmann <carsten.lohmann@bosch.io>
58ee8d3
to
5c97420
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if the current integration test has more value than a simple unit test that verifies the removal of the metrics in the Kafka client. Thus, I (still) wonder why we need an IT at all. But if you want to keep it, by my guest ...
Testing of the actual removal of metrics can only be done with a proper |
This fixes #3017:
Kafka producer metrics regarding the telemetry, event and command-response topics of a tenant are removed when that
tenant got deleted.