Skip to content

Commit ffe6187

Browse files
committed
fix test
1 parent 32e7957 commit ffe6187

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

instrumentation/resources/library/src/test/java/io/opentelemetry/instrumentation/resources/internal/DeclarativeConfigTest.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ void endToEnd() {
3131
+ " value: my-service\n"
3232
+ "tracer_provider:\n";
3333

34+
boolean java8 = "1.8".equals(System.getProperty("java.specification.version"));
3435
OpenTelemetrySdk openTelemetrySdk =
3536
FileConfiguration.parseAndCreate(
3637
new ByteArrayInputStream(yaml.getBytes(StandardCharsets.UTF_8)));
@@ -56,7 +57,8 @@ void endToEnd() {
5657
assertThat(attributeKeys).contains("os.description");
5758
assertThat(attributeKeys).contains("os.type");
5859
// ProcessResourceComponentProvider
59-
assertThat(attributeKeys).contains("process.command_line");
60+
assertThat(attributeKeys)
61+
.contains(java8 ? "process.command_line" : "process.command_args");
6062
assertThat(attributeKeys).contains("process.executable.path");
6163
assertThat(attributeKeys).contains("process.pid");
6264
// ProcessRuntimeResourceComponentProvider

0 commit comments

Comments
 (0)