Skip to content

Commit 8af9827

Browse files
committed
tomcat test project
1 parent 071416d commit 8af9827

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

instrumentation/servlet/servlet-3.0/testing/src/test/java/io/opentelemetry/javaagent/instrumentation/servlet/v3_0/tomcat/ErrorHandlerValve.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
import org.slf4j.Logger;
1313
import org.slf4j.LoggerFactory;
1414

15-
class ErrorHandlerValve extends ErrorReportValve {
15+
// public, because it's loaded by reflection
16+
public class ErrorHandlerValve extends ErrorReportValve {
1617

1718
private static final Logger logger = LoggerFactory.getLogger(ErrorHandlerValve.class);
1819

instrumentation/servlet/servlet-3.0/testing/src/test/java/io/opentelemetry/javaagent/instrumentation/servlet/v3_0/tomcat/TestAccessLogValve.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
import org.apache.catalina.connector.Response;
1818
import org.apache.catalina.valves.ValveBase;
1919

20-
class TestAccessLogValve extends ValveBase implements AccessLog {
20+
// public, because it's loaded by reflection
21+
public class TestAccessLogValve extends ValveBase implements AccessLog {
2122

2223
public final List<Map.Entry<String, String>> getLoggedIds() {
2324
return loggedIds;

instrumentation/servlet/servlet-5.0/tomcat-testing/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ plugins {
33
}
44

55
dependencies {
6+
testInstrumentation(project(":instrumentation:jetty:jetty-11.0:javaagent"))
67
testImplementation(project(":instrumentation:servlet:servlet-5.0:testing"))
78

89
testLibrary("org.apache.tomcat.embed:tomcat-embed-core:10.0.0")

instrumentation/servlet/servlet-5.0/tomcat-testing/src/test/java/io/opentelemetry/javaagent/instrumentation/servlet/v5_0/tomcat/ErrorHandlerValve.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
import org.slf4j.Logger;
1313
import org.slf4j.LoggerFactory;
1414

15-
class ErrorHandlerValve extends ErrorReportValve {
15+
// public, because it's loaded by reflection
16+
public class ErrorHandlerValve extends ErrorReportValve {
1617

1718
private static final Logger logger = LoggerFactory.getLogger(ErrorHandlerValve.class);
1819

instrumentation/servlet/servlet-5.0/tomcat-testing/src/test/java/io/opentelemetry/javaagent/instrumentation/servlet/v5_0/tomcat/TestAccessLogValve.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
import org.apache.catalina.connector.Response;
1818
import org.apache.catalina.valves.ValveBase;
1919

20-
class TestAccessLogValve extends ValveBase implements AccessLog {
20+
// public, because it's loaded by reflection
21+
public class TestAccessLogValve extends ValveBase implements AccessLog {
2122

2223
public final List<Map.Entry<String, String>> getLoggedIds() {
2324
return loggedIds;

0 commit comments

Comments
 (0)