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
Update Cruise Control system tests #9574
Conversation
af48ba7
to
c7e8739
Compare
Signed-off-by: Kyle Liberti <kliberti@redhat.com>
@@ -256,6 +261,23 @@ void testConfigurationPerformanceOptions(ExtensionContext extensionContext) thro | |||
assertThat(containerConfiguration, hasEntry(key, value.toString()))); | |||
} | |||
|
|||
@ParallelNamespaceTest | |||
void testKafkaRebalanceAutoApprovalMechanism(ExtensionContext extensionContext) { |
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 don't follow why you moved this here. This test seems to not be related to the other tests in this class. It tests the Cruise Control API (which is the KafkaRebalance resource). So it should have stayed where it was?
(Leaving aside that at least some tests in this class look like they should be unit tests and not system tests)
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 don't follow why you moved this here. This test seems to not be related to the other tests in this class. It tests the Cruise Control API (which is the KafkaRebalance resource). So it should have stayed where it was?
Whoops, I meant to move that in the CruiseControlST
class. It seemed that the CruiseControlST
class has tests related to the KafkaRebalance
resource where as the CruiseControlApiST
class seemed to contain tests for hitting/testing the CC API directly.
(Leaving aside that at least some tests in this class look like they should be unit tests and not system tests)
I'll investigate this class to to see what can be removed
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.
Yeah, that makes sense I guess.
LOGGER.info("Verifying that {} REST API is available", CRUISE_CONTROL_NAME); | ||
CruiseControlUtils.ApiResult response = CruiseControlUtils.callApi(testStorage.getNamespaceName(), CruiseControlUtils.HttpMethod.GET, CruiseControlEndpoints.STATE); |
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.
So, what exactly does this whole test test? And why is it not suported in KRaft mode? I guess that question applies to more of the tests in this class.
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.
So, what exactly does this whole test test?
This is just to test basic CC API functionality, that you can get the state, execute rebalances, stop proposal execution, get user task list containing the previously executed tasks
And why is it not suported in KRaft mode?
Appears to be an oversight, let me clean that up
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.
Do we really need to test these? I would expect that those are:
- Tested by Cruise Controls own tests
- Used in the KafkaRebalance tests
So I would expect here more or less just some check that we unlocked the REST API. But not detailed tests of different CC fetures.
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.
So I would expect here more or less just some check that we unlocked the REST API. But not detailed tests of different CC fetures.
Yeah that sounds fair to me, I'll take a stab at it with the next commit
Signed-off-by: Kyle Liberti <kliberti@redhat.com>
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Kyle Liberti <kliberti@redhat.com>
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.
Thanks for the clean-up, I have just one nit in indent.
systemtest/src/test/java/io/strimzi/systemtest/cruisecontrol/CruiseControlST.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Lukáš Král <53821852+im-konge@users.noreply.github.com> Signed-off-by: Kyle Liberti <kliberti@redhat.com>
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -62,158 +51,29 @@ public class CruiseControlConfigurationST extends AbstractST { | |||
private static final Logger LOGGER = LogManager.getLogger(CruiseControlConfigurationST.class); | |||
|
|||
@ParallelNamespaceTest | |||
void testDeployAndUnDeployCruiseControl(ExtensionContext extensionContext) throws IOException { | |||
void testMetricReporterConfigurationInKafka(ExtensionContext extensionContext) throws IOException { |
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.
This test seems to be failing. Also, I'm not sure why you made the changes you did here.
The original code seemed to be at least checking that the CC pod is removed and that rolling updates to do it were properly happening here. You now just check a config mpa with generated configuration. That is done in the unit tests already and does not need a system test. So we should either reintroduce the original logic or we can remove it completely.
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.
Reverted to how it was before
/** | ||
* metrics | ||
*/ | ||
METRICS("/metrics"); |
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.
metrics
=> Metrics
if we want to keep this. But I'm not sure it is worth to pull this into a production code when it is relevant only to tests.
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.
Removed
Signed-off-by: Kyle Liberti <kliberti@redhat.com>
Signed-off-by: Kyle Liberti <kliberti@redhat.com>
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
Thanks @kyguy |
Type of change
Description
Refactors Cruise Control system tests to remove system tests covered by unit tests and other system tests in attempt to reduce unnecessary test failures and resource usage.
Checklist
Please go through this checklist and make sure all applicable tasks have been done