ncliang commented on a change in pull request #10475:
URL: https://github.com/apache/kafka/pull/10475#discussion_r623622054



##########
File path: 
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/isolation/TestPlugins.java
##########
@@ -98,22 +97,56 @@
      * to load internal classes, and samples information about their 
initialization.
      */
     public static final String SERVICE_LOADER = 
"test.plugins.ServiceLoaderPlugin";
+    /**
+     * Class name of a plugin which reads a version string from resource.
+     */
+    public static final String READ_VERSION_FROM_RESOURCE = 
"test.plugins.ReadVersionFromResource";
 
     private static final Logger log = 
LoggerFactory.getLogger(TestPlugins.class);
-    private static final Map<String, File> PLUGIN_JARS;
+    private static final Map<String, PluginJar> PLUGIN_JARS;
     private static final Throwable INITIALIZATION_EXCEPTION;
 
+    private static final class PluginJar {
+        String className;
+        File jarFile;
+
+        public PluginJar(String className, File jarFile) {

Review comment:
       I added the test resource `multiple-plugins-in-jar` to this class so 
that it can be picked up by `DelegatingClassLoaderTest::testLoadingPluginClass` 
to verify both plugins within the jar loaded.

##########
File path: 
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/isolation/TestPlugins.java
##########
@@ -143,16 +176,35 @@ public static void assertAvailable() throws 
AssertionError {
     public static List<String> pluginPath() {

Review comment:
       I'm not sure I understand the concern. The change here is just to have 
the PLUGIN_JARS list be changed to a map with keys being a the resource 
directory. The jar itself is still created in the same, unique, resource 
directory by `createPluginJar` . This list of jar files is also still what is 
returned here in pluginPath .




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to