Run integration tests against Java 19 (#6690)

Co-authored-by: Lauri Tulmin <tulmin@gmail.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
This commit is contained in:
Trask Stalnaker 2022-09-24 12:31:15 -07:00 committed by GitHub
parent 878dfc35af
commit 5e2df2b81f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 4 deletions

View File

@ -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

View File

@ -3,7 +3,7 @@ plugins {
}
jacoco {
toolVersion = "0.8.7"
toolVersion = "0.8.8"
}
tasks {

View File

@ -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

View File

@ -110,7 +110,7 @@ abstract class AbstractComplexPropagationTest extends InstrumentationSpecificati
new LinkedBlockingQueue<Payload>()
}
@Bean
@Bean(destroyMethod = "shutdownNow")
ExecutorService consumerThread() {
Executors.newSingleThreadExecutor()
}