-
-
Notifications
You must be signed in to change notification settings - Fork 515
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 issue #142 #194
Fix issue #142 #194
Conversation
FYI, I updated the test case in the PR to have only one call to |
Ping, @aaugustin. Just wanted to make sure you had seen this. No rush, just hadn't seen an acknowledgment of the diagnosis, etc. |
Rebased, fixed flake8, and added changelog entry. |
This eliminates one of the sleep(0.1)'s.
Rebased. |
Since the bug and the fix are in protocol.py, the test should be in test_protocol.py. Writing a test at a lower level is "easier" (not "easy") because you can control exactly which inputs are fed into the event loop and what happens it what order. See 0ae899c. |
[Fix for issue #142] This issue was quite tricky for me to develop a test case for. The hardest part is that you need to find a way to call cancel on
close()
when it is at this particular line of code. I was led to do that in a roundabout way.I'm open to suggestions on ways to simplify the test or on ways to eliminate the need for sleeps (which could potentially lead to test flakiness, though the sleeps are quite large currently). Or if it's good enough for the time being, that's fine too!