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

Add regression test for #360 #2505

Closed

Conversation

ikonst
Copy link

@ikonst ikonst commented Dec 12, 2022

Pull Request check-list

Please make sure to review and check all of these items:

  • Does $ tox pass with this change (including linting)?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?
  • Was the change added to CHANGES file?

Description of change

Adding a regression test for #360. Since it currently fails due to #2499, marking the BaseException parameter with xfail: a fix for #2499 will have to update that.

@ikonst ikonst force-pushed the 2022-12-12-interrupt-regression-test branch 2 times, most recently from 46d26c0 to ac9f589 Compare December 12, 2022 18:39
@ikonst ikonst force-pushed the 2022-12-12-interrupt-regression-test branch from ac9f589 to fdf6628 Compare December 12, 2022 18:54
@codecov-commenter
Copy link

Codecov Report

Base: 92.19% // Head: 92.07% // Decreases project coverage by -0.11% ⚠️

Coverage data is based on head (fdf6628) compared to base (3a121be).
Patch coverage: 96.42% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2505      +/-   ##
==========================================
- Coverage   92.19%   92.07%   -0.12%     
==========================================
  Files         113      113              
  Lines       29337    29340       +3     
==========================================
- Hits        27047    27015      -32     
- Misses       2290     2325      +35     
Impacted Files Coverage Δ
tests/test_asyncio/test_connection.py 96.42% <92.85%> (-2.15%) ⬇️
tests/test_connection.py 99.02% <100.00%> (+0.15%) ⬆️
redis/compat.py 50.00% <0.00%> (-50.00%) ⬇️
tests/test_asyncio/compat.py 75.00% <0.00%> (-25.00%) ⬇️
redis/__init__.py 78.26% <0.00%> (-4.35%) ⬇️
redis/retry.py 95.83% <0.00%> (-4.17%) ⬇️
redis/asyncio/retry.py 92.85% <0.00%> (-3.58%) ⬇️
tests/test_graph_utils/test_edge.py 94.59% <0.00%> (-2.71%) ⬇️
tests/test_ssl.py 47.51% <0.00%> (-2.13%) ⬇️
tests/test_asyncio/test_graph.py 97.68% <0.00%> (-1.55%) ⬇️
... and 19 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@kristjanvalur
Copy link
Contributor

Good stuff. Let me see if I can resolve this in an elegant way.

@kristjanvalur
Copy link
Contributor

Ok, taking another look at this, this does not in fact seem to be a regression test for the issue. I would expect exactly the behaviour that this test demonstrates. That if you are interrupted in reading, then when you read again, you get the previous response.

The problem does not manifest at this level. it manifests when issuing a command from the Redis class and the "response" part of it is interrupted. Re-issuing a command on that connection will return an invalid response. The correct behaviour, for Redis is to close the connection.

I'll see if I can produce a different regression test for the problem.

@ikonst
Copy link
Author

ikonst commented Dec 12, 2022

That if you are interrupted in reading, then when you read again, you get the previous response.

Fair enough.

@ikonst ikonst closed this Dec 13, 2022
@ikonst ikonst deleted the 2022-12-12-interrupt-regression-test branch December 13, 2022 15:34
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.

None yet

3 participants