THRIFT-2151: Add PHP persistent socket close regression coverage - #3796
Merged
Conversation
sveneld
force-pushed
the
THRIFT-2151
branch
2 times, most recently
from
September 11, 2026 09:15
7280d29 to
a5bc934
Compare
sveneld
marked this pull request as ready for review
September 11, 2026 09:42
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The persistent-socket regression test does not yet verify closure of the underlying resource.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds PHP regression coverage for persistent socket closure and strengthens PHPUnit warning handling.
Changes:
- Adds persistent
TSocket::close()coverage and corrects socket test fixtures. - Completes socket-pool mocks and retry logging expectations.
- Aligns transport fixture signatures.
- Configures PHPUnit to continue after warnings while failing on them.
File summaries
| File | Description |
|---|---|
lib/php/test/Unit/Lib/Transport/TSocketTest.php |
Updates socket tests and adds persistent close coverage. |
lib/php/test/Unit/Lib/Transport/TSocketPoolTest.php |
Completes APCu responses and retry logging assertions. |
lib/php/test/Unit/Lib/Transport/Fixture/BufferedReadTransport.php |
Adds typed transport method signatures. |
lib/php/phpunit.xml |
Continues after warnings while failing the suite. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Client: php Generated-by: OpenAI Codex GPT-5 <noreply@openai.com>
sveneld
force-pushed
the
THRIFT-2151
branch
from
September 11, 2026 09:52
a5bc934 to
8f4e9da
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.
Summary
TSocket::close()effective for persistent sockets (THRIFT-2151).errstrfield.TSocketPoolTest, check that each expected fetch has a result, and expect the error log from the first failed connection attempt before a successful retry.BufferedReadTransporttest fixture with the typed transport interface.Why Include the Test Harness Fixes?
The upstream PHP 8.4 CI run after #3792 reported success after executing only 689 of 947 tests:
stopOnWarningstopped the suite before the socket tests, while warnings did not cause a failing exit code. These test-only corrections let the persistent socket regression run as part of the full suite instead of hiding behind an earlier warning.Testing
TSocketPoolTest: 20 tests, 249 assertions, no warnings or failures.git diff --checkpassed.make styleis blocked by stale local Autotools configuration referencing the removed Swift directory.Generated-by: OpenAI Codex GPT-5 noreply@openai.com