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

SHUTDOWN - add support for the new NOW, FORCE and ABORT modifiers #2150

Merged
merged 7 commits into from
Jun 1, 2022

Conversation

dvora-h
Copy link
Collaborator

@dvora-h dvora-h commented Apr 27, 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?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Description of change

closes #2126

@dvora-h dvora-h added feature New feature redis-7 labels Apr 27, 2022
@dvora-h dvora-h requested a review from chayim April 27, 2022 13:42
@codecov-commenter
Copy link

codecov-commenter commented Apr 27, 2022

Codecov Report

Merging #2150 (1484a48) into master (fa7b3f6) will decrease coverage by 0.38%.
The diff coverage is 89.47%.

@@            Coverage Diff             @@
##           master    #2150      +/-   ##
==========================================
- Coverage   92.27%   91.89%   -0.39%     
==========================================
  Files         105      108       +3     
  Lines       25246    27414    +2168     
==========================================
+ Hits        23297    25191    +1894     
- Misses       1949     2223     +274     
Impacted Files Coverage Δ
redis/commands/core.py 82.41% <77.77%> (-1.34%) ⬇️
tests/test_commands.py 89.82% <100.00%> (-2.18%) ⬇️
redis/commands/parser.py 67.77% <0.00%> (-20.63%) ⬇️
redis/typing.py 86.11% <0.00%> (-4.22%) ⬇️
redis/cluster.py 90.41% <0.00%> (-1.31%) ⬇️
redis/asyncio/connection.py 83.63% <0.00%> (-1.21%) ⬇️
tests/test_asyncio/conftest.py 93.38% <0.00%> (-1.06%) ⬇️
tests/test_cluster.py 96.67% <0.00%> (-0.82%) ⬇️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fa7b3f6...1484a48. Read the comment docs.

Copy link
Contributor

@chayim chayim left a comment

Choose a reason for hiding this comment

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

I think we need tests - even if we just mock this....

@dvora-h dvora-h requested a review from chayim May 8, 2022 12:58
conn = redis.Redis(port=6380)
conn.shutdown = mock.MagicMock()
conn.shutdown()
conn.shutdown.assert_called_once_with()
Copy link
Contributor

@chayim chayim May 8, 2022

Choose a reason for hiding this comment

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

Can we add asserts for the various options? Also, let's try the mock on the execute_command call, not the function. Then we can validate the function is called.

@dvora-h dvora-h requested a review from chayim June 1, 2022 12:40
@dvora-h dvora-h merged commit 3081a32 into redis:master Jun 1, 2022
@dvora-h dvora-h deleted the shutdown branch June 18, 2023 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SHUTDOWN - add support for the new NOW, FORCE and ABORT modifiers
3 participants