reactphp-socks
reactphp-socks copied to clipboard
Update tests to close any server sockets
Close open connections in tests to prevent them from looping in the async update.
Based on https://github.com/reactphp/socket/pull/283 and https://github.com/clue/reactphp-docker/pull/79
Ref: https://github.com/clue/reactphp-socks/pull/110
I closed the sockets but it seems thats not enough to fix it with the async changes. Do you have any ideas?
I closed the sockets but it seems thats not enough to fix it with the async changes. Do you have any ideas?
New ways to inspect the loop are currently being discussed in https://github.com/orgs/reactphp/discussions/472#discussioncomment-3895536, perhaps you want to join the discussion?
As a quick hack, you can add the following dummy test case that would return instantly if the loop has nothing to do, but keep running forever if there are any leftovers from previous tests. You can then move this around in your test suite and check which test cases cause leftovers to help isolate the problem.
public function testA()
{
Loop::run();
}