Skip to content

Commit abdaef8

Browse files
committed
Fix sporadic CI failures by excluding Netty buffer classes from JaCoCo
- Exclude io/netty/buffer/*Event* classes from JaCoCo instrumentation - This prevents instrumentation conflicts that cause sporadic test failures - These classes are already instrumented by OpenTelemetry agents and attempting to instrument them again with JaCoCo causes IllegalClassFormatException - Affects tests like SimpleHttpClientTest goodCert and others using Armeria that depend on Netty buffer management
1 parent 194aa2e commit abdaef8

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/stress-test-the-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
name: Test
1515
runs-on: ${{ matrix.os }}
1616
strategy:
17-
fail-fast: false
1817
matrix:
1918
os:
2019
- windows-latest
2120
test-java-version:
2221
- 8
2322
run-number: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
23+
fail-fast: false
2424
steps:
2525
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2626

buildSrc/src/main/kotlin/otel.java-conventions.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import io.opentelemetry.gradle.OtelJavaExtension
22
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
3+
import org.gradle.testing.jacoco.tasks.JacocoTaskExtension
34

45
plugins {
56
`java-library`
@@ -70,6 +71,12 @@ tasks {
7071
exceptionFormat = TestExceptionFormat.FULL
7172
showStandardStreams = true
7273
}
74+
75+
// Configure JaCoCo agent to exclude problematic Netty buffer classes that can cause
76+
// instrumentation conflicts and sporadic test failures
77+
configure<JacocoTaskExtension> {
78+
excludes = listOf("**/io/netty/buffer/*Event*")
79+
}
7380
}
7481

7582
withType<Javadoc>().configureEach {

0 commit comments

Comments
 (0)