Skip to content
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

Rack awareness tests should not rely on the internal files #10663

Open
scholzj opened this issue Oct 2, 2024 · 2 comments
Open

Rack awareness tests should not rely on the internal files #10663

scholzj opened this issue Oct 2, 2024 · 2 comments
Assignees

Comments

@scholzj
Copy link
Member

scholzj commented Oct 2, 2024

The RackAwarenessST tests currently rely on the internal implementation details (lines 121-124 at the time of opening this issue):

        String rackIdOut = cmdKubeClient(testStorage.getNamespaceName()).execInPod(podName, "/bin/bash", "-c", "cat /opt/kafka/init/rack.id").out().trim();
        String brokerRackOut = cmdKubeClient(testStorage.getNamespaceName()).execInPod(podName, "/bin/bash", "-c", "cat /tmp/strimzi.properties | grep broker.rack").out().trim();
        assertThat(rackIdOut.trim().contains(hostname), is(true));
        assertThat(brokerRackOut.contains("broker.rack=" + hostname), is(true));

This relies on the internal implementation of how the rack information is passed to the Kafka container, how it is loaded and where the configs are stored. This should instead do a black box testing and use the KAfka Admin API to query the nodes rack to make sure the Kafka nodes are properly configured.

@im-konge
Copy link
Member

im-konge commented Oct 3, 2024

Thanks, this makes sense. I will have a look.

@ppatierno
Copy link
Member

Triaged 03.10.2024: thanks to @im-konge for volunteering to look into this.

@im-konge im-konge self-assigned this Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants