Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
Expand All @@ -24,7 +24,7 @@
*/
package co.elastic.apm.servlet;

import org.junit.jupiter.api.Test;
import org.junit.Test;

import javax.annotation.Nullable;
import java.io.File;
Expand All @@ -46,11 +46,6 @@ static String getPathToAttacher() {
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/");
Expand All @@ -61,7 +56,7 @@ private static String getTargetJar(String project, String classifier) {
}

@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))) {
Expand All @@ -70,7 +65,10 @@ void testEverythingIsShaded() throws IOException {
.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();
}
}
Expand Down