Run integration tests against Java 19
MODIFY
.github/workflows/reusable-test.yml
.github/workflows/reusable-test.yml
@@ -26,10 +26,13 @@ jobs:
- 8
- 11
- 17
- - 18
+ - 19
vm:
- hotspot
- openj9
+ exclude:
+ - test-java-version: 19
+ vm: openj9
fail-fast: false
steps:
- uses: actions/checkout@v3
@@ -38,7 +41,8 @@ jobs:
name: Set up JDK ${{ matrix.test-java-version }}-${{ matrix.vm }} for running tests
uses: actions/setup-java@v3
with:
- distribution: ${{ matrix.vm == 'hotspot' && 'temurin' || 'adopt-openj9'}}
+ # using zulu because it has "ea" builds available that we can test against
+ distribution: ${{ matrix.vm == 'hotspot' && 'zulu' || 'adopt-openj9'}}
java-version: ${{ matrix.test-java-version }}
- name: Set up JDK for running Gradle

MODIFY
conventions/src/main/kotlin/otel.jacoco-conventions.gradle.kts
conventions/src/main/kotlin/otel.jacoco-conventions.gradle.kts
@@ -3,7 +3,7 @@ plugins {
}
jacoco {
- toolVersion = "0.8.7"
+ toolVersion = "0.8.8"
}
tasks {

MODIFY
instrumentation/log4j/log4j-appender-1.2/javaagent/src/test/groovy/Log4j1Test.groovy
instrumentation/log4j/log4j-appender-1.2/javaagent/src/test/groovy/Log4j1Test.groovy
@@ -9,6 +9,7 @@ import io.opentelemetry.sdk.logs.data.Severity
import io.opentelemetry.semconv.trace.attributes.SemanticAttributes
import org.apache.log4j.Logger
import org.apache.log4j.MDC
+import org.apache.log4j.helpers.Loader
import spock.lang.Unroll
import static org.assertj.core.api.Assertions.assertThat
@@ -16,6 +17,14 @@ import static org.awaitility.Awaitility.await
class Log4j1Test extends AgentInstrumentationSpecification {
+ static {
+ // this is needed because log4j1 incorrectly thinks the initial releases of Java 10-19
+ // (which have no '.' in their versions since there is no minor version) are Java 1.1,
+ // which is before ThreadLocal was introduced and so log4j1 disables MDC functionality
+ // (and the MDC tests below fail)
+ Loader.java1 = false
+ }
+
private static final Logger logger = Logger.getLogger("abc")
@Unroll

MODIFY
instrumentation/spring/spring-integration-4.1/testing/src/main/groovy/AbstractComplexPropagationTest.groovy
instrumentation/spring/spring-integration-4.1/testing/src/main/groovy/AbstractComplexPropagationTest.groovy
@@ -110,7 +110,7 @@ abstract class AbstractComplexPropagationTest extends InstrumentationSpecificati
new LinkedBlockingQueue<Payload>()
}
- @Bean
+ @Bean(destroyMethod = "shutdownNow")
ExecutorService consumerThread() {
Executors.newSingleThreadExecutor()
}

Run integration tests against Java 19 (#6690)

Co-authored-by: Lauri Tulmin <tulmin@gmail.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>