Skip to content

Commit 57d73cd

Browse files
committed
Replace copied bootstrap packages with access to BootstrapPackagesHolder
1 parent 67b1d40 commit 57d73cd

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

testing-common/integration-tests/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ dependencies {
88

99
testCompileOnly(project(":instrumentation-api"))
1010
testCompileOnly(project(":javaagent-tooling"))
11+
testCompileOnly(project(":javaagent-bootstrap"))
1112
testCompileOnly(project(":javaagent-extension-api"))
1213
testCompileOnly(project(":muzzle"))
1314

testing-common/integration-tests/src/test/groovy/AgentInstrumentationSpecificationTest.groovy

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import com.google.common.reflect.ClassPath
77
import io.opentelemetry.instrumentation.test.AgentInstrumentationSpecification
88
import io.opentelemetry.instrumentation.test.utils.ClasspathUtils
9-
import io.opentelemetry.javaagent.tooling.Constants
9+
import io.opentelemetry.javaagent.bootstrap.BootstrapPackagePrefixesHolder
1010
import org.slf4j.LoggerFactory
1111

1212
import java.util.concurrent.TimeoutException
@@ -17,12 +17,7 @@ import java.util.concurrent.TimeoutException
1717
class AgentInstrumentationSpecificationTest extends AgentInstrumentationSpecification {
1818
private static final ClassLoader BOOTSTRAP_CLASSLOADER = null
1919

20-
/**
21-
* Copy of {@link Constants#BOOTSTRAP_PACKAGE_PREFIXES} because the Constants class
22-
* is not accessible from here
23-
*/
24-
public static final List<String> BOOTSTRAP_PACKAGE_PREFIXES =
25-
Arrays.asList("io.opentelemetry.javaagent.bootstrap", "io.opentelemetry.javaagent.shaded")
20+
public static final List<String> BOOTSTRAP_PACKAGE_PREFIXES = BootstrapPackagePrefixesHolder.getBoostrapPackagePrefixes()
2621

2722
def "classpath setup"() {
2823
setup:

0 commit comments

Comments
 (0)