Skip to content

Get the FakeNetwork via OkHttp's existing Platform thing - #9654

Merged
swankjesse merged 2 commits into
mainfrom
jwilson.0811.fake_via_platform
Aug 12, 2026
Merged

Get the FakeNetwork via OkHttp's existing Platform thing#9654
swankjesse merged 2 commits into
mainfrom
jwilson.0811.fake_via_platform

Conversation

@swankjesse

Copy link
Copy Markdown
Collaborator

No description provided.

}
private val handshakeCertificates = platformRule.localhostHandshakeCertificates()

// We can't create these until after platformRule runs. Sigh.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the fix for this is to do a small bit of DI in PlatformRule


private fun startTlsServer(): InetSocketAddress {
val serverSocketFactory = ServerSocketFactory.getDefault()
val serverSocketFactory = Platform.get().serverSocketFactory

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall these seem like a net positive.

@swankjesse
swankjesse merged commit a4a1c5d into main Aug 12, 2026
23 of 26 checks passed
@swankjesse
swankjesse deleted the jwilson.0811.fake_via_platform branch August 12, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants