[Tests] Introduce client-server integration tests - #419
Merged
chr-hertel merged 3 commits intoAug 15, 2026
Merged
Conversation
chr-hertel
requested review from
CodeWithKyrian,
Nyholm and
soyuka
as code owners
August 14, 2026 23:13
* Add an in-process loopback that connects a real client transport to a real server transport, draining both Fiber loops in one synchronous pass instead of polling. A stalled exchange fails where it happened rather than hanging. * Cover protocol version negotiation across both implementations, where the unit tests only ever drive one side against a canned counter-offer. * Cover the server-to-client round-trips end to end: elicitation, sampling, roots, plus progress and logging notifications. * Add the `integration` test suite and a `make integration-tests` target.
The unit job pins `--testsuite=unit`, so the new suite would never have run on GitHub. It goes in that job rather than its own: the loopback leans on Fibers, and the matrix is what covers them down to the PHP 8.1 floor.
chr-hertel
force-pushed
the
client-server-integration-tests
branch
from
August 14, 2026 23:45
43a0828 to
0413e9f
Compare
Replaces the in-process loopback with the setup from examples/client: the client spawns a fixture server over the real StdioTransport, so the tests exercise the shipped transports and no longer nest both sides' Fibers. Moves the suite into its own CI job, matrixed over PHP 8.1-8.5.
chr-hertel
force-pushed
the
client-server-integration-tests
branch
from
August 15, 2026 00:20
fb6268b to
867d25b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every other suite mocks one side of the conversation. This one runs a real client against a real server, so what it covers is the agreement between the two halves rather than either half against an expectation of the other.
The setup
The same wiring as
examples/client: the client spawns a server script over the realStdioTransportand the two talk across its pipes. No test doubles on either side, and the transports carrying the exchange are the ones users get — framing, buffering and process lifecycle included.The servers live in
tests/Integration/Fixture, one script per scenario, written the wayexamples/serverwrites them.HandshakeTestpins the server's revision through the environment, since that is a property of the process here.Client timeouts are pinned to 5s, so a stalled exchange fails the test instead of hanging the suite.
Coverage
27 tests in ~3s. Runs as its own CI job over PHP 8.1–8.5, in parallel with the rest of the pipeline;
make integration-testsruns it locally.