-
Notifications
You must be signed in to change notification settings - Fork 409
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
Do panic in integration tests if connection can't be established #2577
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2577 +/- ##
==========================================
- Coverage 27.29% 27.28% -0.01%
==========================================
Files 411 411
Lines 20148 20148
==========================================
- Hits 5500 5498 -2
- Misses 14077 14078 +1
- Partials 571 572 +1
Flags with carried forward coverage won't be shown. Click here to find out more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one!
Description
In
integration/setup/listener.go
in thetb.Cleanup
call we wait for a message fromdone
channel. If the connection with the client wasn't established, this message will be never received, as listener is still runing. As a result, the tests are hanging until timeout. This PR fixes this problem by panicking if the connection can't be established.For example, this problem occurred in this #2540 PR, and it was hard to catch the problem with failing integration tests.
Readiness checklist
task all
, and it passed.@FerretDB/core
), Labels, Project and project's Sprint fields.