Skip to content

Suppress spurious MockWebServer crash warnings in CI logs#7357

Merged
timtebeek merged 1 commit intomainfrom
tim/fix-ci-warnings
Apr 12, 2026
Merged

Suppress spurious MockWebServer crash warnings in CI logs#7357
timtebeek merged 1 commit intomainfrom
tim/fix-ci-warnings

Conversation

@timtebeek
Copy link
Copy Markdown
Member

Summary

  • Route java.util.logging through SLF4J via the jul-to-slf4j bridge, which discards output through the existing slf4j-nop binding in tests
  • This suppresses StringIndexOutOfBoundsException crash logs from MockWebServer when normalizeRepository() probes HTTPS on HTTP-only mock servers
  • Fix flaky useHttpWhenHttpsFails test by switching from enqueue to Dispatcher, avoiding TLS probe bytes consuming the single enqueued response

Test plan

  • Verified mirrorsAndAuth, useHttpWhenHttpsFails, latestOrReleaseVersionInDependencyManagement, and systemPropertyTakesPrecedence pass with no MockWebServer crash output
  • Ran useHttpWhenHttpsFails multiple times to confirm flakiness is resolved

Route java.util.logging through SLF4J via jul-to-slf4j bridge, which
discards the output through the existing slf4j-nop binding in tests.
This suppresses StringIndexOutOfBoundsException crash logs from
MockWebServer when normalizeRepository() probes HTTPS on HTTP-only
mock servers. Also fix flaky useHttpWhenHttpsFails test by switching
from enqueue to Dispatcher to avoid TLS probe bytes consuming the
single enqueued response.
@timtebeek
Copy link
Copy Markdown
Member Author

Much cleaner:

> Task :rewrite-maven:test
Generating HTML test report...
Finished generating test html results (0.124 secs) into: /home/runner/work/rewrite/rewrite/rewrite-maven/build/reports/tests/test
Finished generating test XML results (0.026 secs) into: /home/runner/work/rewrite/rewrite/rewrite-maven/build/test-results/test
Stored cache entry for task ':rewrite-maven:test' with cache key 47737dc3eab01540514040f949319ff2
Resolve mutations for :rewrite-maven:check (Thread[#161,Execution worker Thread 2,5,main]) started.
:rewrite-maven:check (Thread[#161,Execution worker Thread 2,5,main]) started.
> Task :rewrite-maven:check
Skipping task ':rewrite-maven:check' as it has no actions.
Resolve mutations for :rewrite-maven:build (Thread[#161,Execution worker Thread 2,5,main]) started.
:rewrite-maven:build (Thread[#161,Execution worker Thread 2,5,main]) started.
> Task :rewrite-maven:build
Skipping task ':rewrite-maven:build' as it has no actions.

@timtebeek timtebeek merged commit 1758f7b into main Apr 12, 2026
1 check passed
@timtebeek timtebeek deleted the tim/fix-ci-warnings branch April 12, 2026 20:48
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant