Skip to content

Commit

Permalink
Fix sporadic test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
trask committed Jan 20, 2025
1 parent 258befe commit 13ae4fb
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,25 @@ jobs:
test-java-version:
- 8
- 11
- 11
- 11
- 11
- 11
- 11
- 11
- 11
- 11
- 11
- 11
- 11
- 11
- 11
- 11
- 11
- 11
- 11
- 11
- 11
- 17
- 20
fail-fast: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ private AttributesAssert mockServerResponse() {
}

@NotNull
@SuppressWarnings("SystemOut")
private AttributesAssert createResource(Supplier<Optional<String>> client) {
String response = client.get().orElse(null);
System.out.println("response: " + response);
client = () -> Optional.ofNullable(response);
Resource resource = getResourceProvider(client).createResource(null);
return OpenTelemetryAssertions.assertThat(resource.getAttributes());
}
Expand Down
4 changes: 1 addition & 3 deletions buildSrc/src/main/kotlin/otel.java-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ tasks {

testLogging {
exceptionFormat = TestExceptionFormat.FULL
showExceptions = true
showCauses = true
showStackTraces = true
showStandardStreams = true
}
}

Expand Down
2 changes: 1 addition & 1 deletion dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ val DEPENDENCIES = listOf(
"com.google.code.findbugs:jsr305:3.0.2",
"com.squareup.okhttp3:okhttp:4.12.0",
"com.uber.nullaway:nullaway:0.12.3",
"org.assertj:assertj-core:3.27.3",
"org.assertj:assertj-core:3.27.1",
"org.awaitility:awaitility:4.2.2",
"org.bouncycastle:bcpkix-jdk15on:1.70",
"org.junit-pioneer:junit-pioneer:1.9.1",
Expand Down

0 comments on commit 13ae4fb

Please sign in to comment.