kamalcph commented on PR #17492:
URL: https://github.com/apache/kafka/pull/17492#issuecomment-2422144959
I've filed KAFKA-17830 to track adding the unit tests separately for init
failure cases and unblock this patch as it fixes the deadlock in the CI run.
> Ideally, RemoteLogMetadataManagerTestUtils should have been written in
such as way to allow consumers to test for pre initialization cases as well.
Instead of refactoring the existing method in
RemoteLogMetadataManagerTestUtils class, we can directly update it in the test:
(eg)
```java
@ClusterTest
public void testInitializationFailure() throws IOException,
InterruptedException {
try (TopicBasedRemoteLogMetadataManager rlmm = new
TopicBasedRemoteLogMetadataManager()) {
// configure rlmm such that it throws exception during initialization
Map<String, String> configs = new HashMap<>();
rlmm.configure(configs);
TestUtils.waitForCondition(rlmm::isInitializationFailed,
"Initialization should fail");
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]