From 7227ff9f18155335a54634ec4fba0e4155f2f039 Mon Sep 17 00:00:00 2001 From: Enrico Olivelli Date: Thu, 15 Jul 2021 09:45:57 +0200 Subject: [PATCH] Fix JavaInstanceDepsTest - allow AVRO, Jackson and Apache Commons Compress --- .../pulsar/functions/instance/JavaInstanceDepsTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pulsar-functions/runtime-all/src/test/java/org/apache/pulsar/functions/instance/JavaInstanceDepsTest.java b/pulsar-functions/runtime-all/src/test/java/org/apache/pulsar/functions/instance/JavaInstanceDepsTest.java index 3bdd23f96d98e..826f546999c8a 100644 --- a/pulsar-functions/runtime-all/src/test/java/org/apache/pulsar/functions/instance/JavaInstanceDepsTest.java +++ b/pulsar-functions/runtime-all/src/test/java/org/apache/pulsar/functions/instance/JavaInstanceDepsTest.java @@ -60,11 +60,14 @@ public void testInstanceJarDeps() throws IOException { if (e == null) break; String name = e.getName(); - if (name.endsWith(".class") && !name.startsWith("META-INF")) { + if (name.endsWith(".class") && !name.startsWith("META-INF") && !name.equals("module-info.class")) { // The only classes in the java-instance.jar should be org.apache.pulsar, slf4j, and log4j classes // filter out those classes to see if there are any other classes that should not be allowed if (!name.startsWith("org/apache/pulsar") && !name.startsWith("org/slf4j") + && !name.startsWith("org/apache/avro") + && !name.startsWith("com/fasterxml/jackson") + && !name.startsWith("org/apache/commons/compress") && !name.startsWith("org/apache/logging/slf4j") && !name.startsWith("org/apache/logging/log4j")) { notAllowedClasses.add(name);