-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Subsequent removal and addition of a cookie may leave the cookie removed #2084
Comments
Would you make a PR (unittest required)? |
Yes, I'll submit by tomorrow hopefully. |
roganov
added a commit
to roganov/aiohttp
that referenced
this issue
Jul 13, 2017
roganov
added a commit
to roganov/aiohttp
that referenced
this issue
Jul 13, 2017
roganov
added a commit
to roganov/aiohttp
that referenced
this issue
Jul 13, 2017
roganov
added a commit
to roganov/aiohttp
that referenced
this issue
Jul 13, 2017
5 tasks
roganov
added a commit
to roganov/aiohttp
that referenced
this issue
Jul 13, 2017
roganov
added a commit
to roganov/aiohttp
that referenced
this issue
Jul 14, 2017
roganov
added a commit
to roganov/aiohttp
that referenced
this issue
Jul 14, 2017
asvetlov
pushed a commit
that referenced
this issue
Jul 25, 2017
Fixed by #2088 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Long story short
I encountered a flaky test failure when testing login-logout-login and discovered that a login right after a logout may not work, in other words, the authentication cookie may not be set.
This boiled down to the following error in
CookieJar
: for event loops with poor time resolution (in my caseuvloop
), subsequent removal and addition of a cookie may not add the cookie.Here is a test case:
Although it took me quite a bit of time to discover what's going on, it seems there is an extremely simple fix: replace strict comparison (
<
) with non-strict one (<=
) here.I'll provide a PR soon if maintainers agree.
Expected behaviour
Test passes
Actual behaviour
Test fails
Steps to reproduce
Run the test
Your environment
uvloop=0.8.0, aiohttp=2.1.0
The text was updated successfully, but these errors were encountered: