Skip to content

[pull] master from square:master #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open

[pull] master from square:master #111

wants to merge 36 commits into from

Conversation

pull[bot]
Copy link

@pull pull bot commented Jun 7, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

yschimke and others added 2 commits June 7, 2025 11:09
If Robolectric not active, then unit tests for Android will fail annoyingly.
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@pull pull bot added the ⤵️ pull label Jun 7, 2025
renovate bot and others added 22 commits June 9, 2025 23:17
…ugin to v2.1.21-2.0.2 (#8847)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…8848)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
….13.0.0 (#8851)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Change MockWebServer to use Okio's new Socket interface

This replaces the Stream interface introduced in a recent
alpha release.

* apiDump

* Only buffer once

---------

Co-authored-by: Jesse Wilson <[email protected]>
Also remove @ExperimentalOkHttpApi in a few places.

Also rename 'shutdown' to 'close' in MockWebServer
and Dispatcher.

Also rename QueueDispatcher.enqueueResponse() to
QueueDispatcher.enqueue.

Co-authored-by: Jesse Wilson <[email protected]>
* Change RecordedRequest.body to a ByteString

Immutable is good.

* apiDump

---------

Co-authored-by: Jesse Wilson <[email protected]>
* Fix a liveness bug in MockWebServer

It was possible to configure delays that would be honored
after MockWebServer was shut down. With this fix any
delay will be abandoned once the server is closed.

* Update mockwebserver/src/main/kotlin/mockwebserver3/internal/SleepNanos.kt

Co-authored-by: Jake Wharton <[email protected]>

---------

Co-authored-by: Jesse Wilson <[email protected]>
Co-authored-by: Jake Wharton <[email protected]>
* Decompose the request line into individual properties

Replace the 'path' property with the URL's encodedPath
property.

Rename the 'requestUrl' property to 'url'.

* Spotless

* Fix up DnsOverHttpsTest

* Fix some test failures
* Change some MockWebServer ergonomics

Now calling MockWebServer.port and similar functions will
not implicity start the server. It is instead necessary to
explicitly call the start() function.

The problem with the old behavior was that reading the
port field could fail with an IOException, which is weird
behavior for reading a property.

* Fixup test

* Fix another test

---------

Co-authored-by: Jesse Wilson <[email protected]>
* New @startstop extension for JUnit 5

This is a new take on our JUnit 5 extension. Rather than creating and managing
the MockWebServer instance in the extension, we let the user create it and all
the extension does is manage the lifecycle.

Note that this annotation doesn't require any external configuration - it doesn't
need a system-property to opt-into 'automatic' extensions, and it doesn't require
a class-level extension either.

* apiDump

---------

Co-authored-by: Jesse Wilson <[email protected]>
* New @startstop extension for JUnit 5

This is a new take on our JUnit 5 extension. Rather than creating and managing
the MockWebServer instance in the extension, we let the user create it and all
the extension does is manage the lifecycle.

Note that this annotation doesn't require any external configuration - it doesn't
need a system-property to opt-into 'automatic' extensions, and it doesn't require
a class-level extension either.

* apiDump

* Switch to @startstop for JUnit 5 tests

* Fixup visibility

---------

Co-authored-by: Jesse Wilson <[email protected]>
* New @startstop extension for JUnit 5

This is a new take on our JUnit 5 extension. Rather than creating and managing
the MockWebServer instance in the extension, we let the user create it and all
the extension does is manage the lifecycle.

Note that this annotation doesn't require any external configuration - it doesn't
need a system-property to opt-into 'automatic' extensions, and it doesn't require
a class-level extension either.

* apiDump

* Switch to @startstop for JUnit 5 tests

* Fixup visibility

* Drop the parameters-based JUnit 5 extension

I think the @startstop one is sufficient.

---------

Co-authored-by: Jesse Wilson <[email protected]>
* Permit RecordedRequest.body to be null or empty

Null if we didn't capture a body, and empty if we
captured an empty body.

* Track API change

* Fixup more tests

* spotless

---------

Co-authored-by: Jesse Wilson <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
They're stable now.

Co-authored-by: Jesse Wilson <[email protected]>
Also rename 'sequenceNumber' to 'exchangeIndex'.
This may be useful to test features like connection
reuse.

Co-authored-by: Jesse Wilson <[email protected]>
* Replace SocketPolicy with a new type, SocketEffect

SocketPolicy encapsulated two things:
 - a trigger (request start, response body, etc)
 - an effect (close the socket, close the stream, stall, etc.)

It also had some special cases for effects like
failing the TLS handshake.

With this PR there's a new class, SocketEffect, that determines
what to do. It's assigned to one of 5 fields for different
triggers.

# Conflicts:
#	mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

* apiDump

* Track API change

* Track more API changes

* Spotless

---------

Co-authored-by: Jesse Wilson <[email protected]>
renovate bot and others added 4 commits June 21, 2025 10:51
* Update dependency org.robolectric:robolectric to v4.15
* Skip test on early robolectric

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Yuri Schimke <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Change RecordedRequest.chunkSizes to be nullable

Now that it's all Kotlin we can usefully distinguish
between null (not chunked) and empty list (chunked with
zero bytes).

Also remove the experimental annotation from RecordedRequest
and delete the experimental annotation.

* apiDump

---------

Co-authored-by: Jesse Wilson <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot and others added 8 commits June 22, 2025 15:00
….0 (#8875)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
as old link points to 404 now.
…8879)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Update dependency org.junit.platform:junit-platform-console to v1.13.2

* Update dependency org.junit.vintage:junit-vintage-engine to v5.13.2 (#8882)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants