Savonitar commented on code in PR #213:
URL: 
https://github.com/apache/flink-connector-kafka/pull/213#discussion_r2717519689


##########
flink-connector-kafka-e2e-tests/flink-end-to-end-tests-common-kafka/src/test/java/org/apache/flink/tests/util/kafka/KafkaSinkE2ECase.java:
##########
@@ -50,13 +50,15 @@ public class KafkaSinkE2ECase extends 
SinkTestSuiteBase<String> {
     // Defines TestEnvironment
     @TestEnv FlinkContainerTestEnvironment flink = new 
FlinkContainerTestEnvironment(1, 6);
 
+    private final TestKafkaContainer kafkaContainer =
+            new 
TestKafkaContainer(DockerImageVersions.KAFKA).withNetworkAliases(KAFKA_HOSTNAME);
+
     // Defines ConnectorExternalSystem
+    @SuppressWarnings({"rawtypes", "unchecked"})
     @TestExternalSystem
-    DefaultContainerizedExternalSystem<KafkaContainer> kafka =
+    DefaultContainerizedExternalSystem kafka =

Review Comment:
   The migration to `TestKafkaContainer` introduced a problem:
     - TestKafkaContainer.getContainer() returns GenericContainer<?> (since it 
wraps **either** `KafkaContainer` or `ConfluentKafkaContainer`)
     - DefaultContainerizedExternalSystem has constraint: <C extends 
GenericContainer<C>> (recursive generic bound)
     - We cannot use DefaultContainerizedExternalSystem<GenericContainer<?>> 
because GenericContainer<?> doesn't satisfy C extends GenericContainer<C>
   
   I've parameterized DefaultContainerizedExternalSystem with wildcard <?> to 
improve that. 



-- 
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]

Reply via email to