Skip to content

Commit d8b71f9

Browse files
committed
Test on Windows
1 parent 1951761 commit d8b71f9

File tree

2 files changed

+31
-1
lines changed
  • .github/workflows
  • instrumentation/async-http-client/async-http-client-1.8/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/asynchttpclient/v1_8

2 files changed

+31
-1
lines changed

.github/workflows/build-common.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,11 @@ jobs:
238238

239239
test:
240240
name: test${{ matrix.test-partition }} (${{ matrix.test-java-version }}, ${{ matrix.vm }}, indy ${{ matrix.test-indy }})
241-
runs-on: ubuntu-latest
241+
runs-on: ${{ matrix.os }}
242242
strategy:
243243
matrix:
244+
os:
245+
- ubuntu-latest
244246
test-java-version:
245247
- 8
246248
- 11
@@ -259,6 +261,27 @@ jobs:
259261
test-indy:
260262
- false
261263
- true
264+
include:
265+
- os: windows-latest
266+
test-java-version: 25
267+
vm: hotspot
268+
test-partition: 0
269+
test-indy: false
270+
- os: windows-latest
271+
test-java-version: 25
272+
vm: hotspot
273+
test-partition: 1
274+
test-indy: false
275+
- os: windows-latest
276+
test-java-version: 25
277+
vm: hotspot
278+
test-partition: 2
279+
test-indy: false
280+
- os: windows-latest
281+
test-java-version: 25
282+
vm: hotspot
283+
test-partition: 3
284+
test-indy: false
262285
exclude:
263286
- vm: ${{ inputs.skip-openj9-tests && 'openj9' || '' }}
264287
- test-java-version: 25-deny-unsafe

instrumentation/async-http-client/async-http-client-1.8/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/asynchttpclient/v1_8/AsyncHttpClientTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import java.util.Map;
2626
import java.util.Set;
2727
import java.util.concurrent.ExecutionException;
28+
import org.junit.jupiter.api.condition.OS;
2829
import org.junit.jupiter.api.extension.RegisterExtension;
2930

3031
class AsyncHttpClientTest extends AbstractHttpClientTest<Request> {
@@ -109,6 +110,12 @@ protected void configure(HttpClientTestOptions.Builder optionsBuilder) {
109110
optionsBuilder.disableTestReadTimeout();
110111
}
111112

113+
// On Windows, non-routable addresses timeout instead of failing fast, causing test timeout
114+
// before the HTTP client can create a span, resulting in only the parent span.
115+
if (OS.WINDOWS.isCurrentOs()) {
116+
optionsBuilder.disableTestRemoteConnection();
117+
}
118+
112119
optionsBuilder.setHttpAttributes(
113120
endpoint -> {
114121
Set<AttributeKey<?>> attributes =

0 commit comments

Comments
 (0)