vamossagar12 commented on code in PR #15642:
URL: https://github.com/apache/kafka/pull/15642#discussion_r1547506743
##########
connect/runtime/src/test/java/org/apache/kafka/connect/integration/ConnectorValidationIntegrationTest.java:
##########
@@ -343,7 +346,7 @@ public void
testConnectorHasConverterWithNoSuitableConstructor() throws Interrup
@Test
public void testConnectorHasConverterThatThrowsExceptionOnInstantiation()
throws InterruptedException {
Map<String, String> config = defaultSinkConnectorProps();
- config.put(KEY_CONVERTER_CLASS_CONFIG,
TestConverterWithConstructorThatThrowsException.class.getName());
+ config.put(KEY_CONVERTER_CLASS_CONFIG,
TestPlugins.TestPlugin.ALWAYS_THROW_EXCEPTION.className());
Review Comment:
We could probably use `BAD_PACKAGING_DEFAULT_CONSTRUCTOR_THROWS_CONNECTOR`
and in `testConnectorHasHeaderConverterThatThrowsExceptionOnInstantiation` as
well?
##########
connect/runtime/src/test/java/org/apache/kafka/connect/integration/ConnectorValidationIntegrationTest.java:
##########
@@ -69,6 +69,9 @@ public static void setup() {
Map<String, String> workerProps = new HashMap<>();
workerProps.put(GROUP_ID_CONFIG, WORKER_GROUP_ID);
+ // Work around a circular-dependency in TestPlugins.
+ TestPlugins.pluginPath();
Review Comment:
Why do we need this?
##########
connect/runtime/src/test/java/org/apache/kafka/connect/integration/ConnectorValidationIntegrationTest.java:
##########
@@ -331,7 +334,7 @@ public void testConnectorHasAbstractConverter() throws
InterruptedException {
@Test
public void testConnectorHasConverterWithNoSuitableConstructor() throws
InterruptedException {
Map<String, String> config = defaultSinkConnectorProps();
- config.put(KEY_CONVERTER_CLASS_CONFIG,
TestConverterWithPrivateConstructor.class.getName());
+ config.put(KEY_CONVERTER_CLASS_CONFIG,
TestPlugins.TestPlugin.ALWAYS_THROW_EXCEPTION.className());
Review Comment:
I think we should use `BAD_PACKAGING_DEFAULT_CONSTRUCTOR_PRIVATE_CONNECTOR`
in this case as well?
--
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]