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

Fix test case for simulating a closed connection #137

Merged
merged 1 commit into from
Jun 1, 2021

Conversation

lauraseidler
Copy link
Collaborator

This is a proposal to fix the test that's currently blocking #123, #124 and #125.

Tbh I'm not 100% sure if it's the right fix - for some reason, simulating a connection close seems to make hapi fail internally for POST requests, it has nothing to do with this test (the functionality seems to work fine AFAICT). For some reason, it works with GET requests though.

I'm adding a separate route with an artificial delay instead of just hitting GET /something, as otherwise the assertion on the response time being greater than 0 is flaky, as it sometimes is 0, depending on how quick the test runs.

Copy link
Collaborator

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit 73d8a2c into hapijs:master Jun 1, 2021
@mcollina
Copy link
Collaborator

mcollina commented Jun 1, 2021

Would you be happy to help maintaining this library? I'm not using Hapi anymore.

@lauraseidler
Copy link
Collaborator Author

@mcollina potentially - tho I've just started using it, so not sure if I'll stick to it

@coveralls
Copy link

Coverage Status

Coverage increased (+0.003%) to 99.077% when pulling 51def36 on lauraseidler:fix/simulate-close into 44cbdec on pinojs:master.

@mcollina
Copy link
Collaborator

mcollina commented Jun 1, 2021

Let us know! this module needs more love and attention than we can give.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants