Skip to content
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

Update tests to close any server sockets #111

Draft
wants to merge 1 commit into
base: 1.x
Choose a base branch
from

Conversation

dinooo13
Copy link

Close open connections in tests to prevent them from looping in the async update.

Based on reactphp/socket#283 and clue/reactphp-docker#79

Ref: #110

@dinooo13
Copy link
Author

I closed the sockets but it seems thats not enough to fix it with the async changes. Do you have any ideas?

@clue clue added this to the v1.5.0 milestone Oct 22, 2022
@clue
Copy link
Owner

clue commented Oct 22, 2022

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();
    }

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.

2 participants