issue-1184 fixed AgentFileIT test
*/
package co.elastic.apm.servlet;
-import org.junit.jupiter.api.Test;
+import org.junit.Test;
import javax.annotation.Nullable;
import java.io.File;
@@ -46,11 +46,6 @@ public class AgentFileIT {
return getTargetJar("apm-agent-attach", "-standalone");
}
- public static void main(String[] args) {
- System.out.println(getPathToJavaagent());
- System.out.println(getPathToAttacher());
- }
-
@Nullable
private static String getTargetJar(String project, String classifier) {
File agentBuildDir = new File("../../" + project + "/target/");
@@ -61,7 +56,7 @@ public class AgentFileIT {
}
@Test
- void testEverythingIsShaded() throws IOException {
+ public void testEverythingIsShaded() throws IOException {
final String pathToJavaagent = getPathToJavaagent();
assertThat(pathToJavaagent).isNotNull();
try (JarFile agentJar = new JarFile(new File(pathToJavaagent))) {
@@ -70,7 +65,10 @@ public class AgentFileIT {
.map(JarEntry::getName)
.filter(entry -> !entry.startsWith("META-INF/"))
.filter(entry -> !entry.startsWith("co/"))
- .filter(entry -> !entry.startsWith("schema/")))
+ .filter(entry -> !entry.startsWith("schema/"))
+ .filter(entry -> !entry.startsWith("asyncprofiler/"))
+ .filter(entry -> !entry.startsWith("ElasticApmLog4j-"))
+ .filter(entry -> !entry.startsWith("elasticapmlog4j2.component.properties")))
.isEmpty();
}
}
