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 TIMEOUT to query class #2519

Merged
merged 9 commits into from Dec 21, 2022
Merged

Add TIMEOUT to query class #2519

merged 9 commits into from Dec 21, 2022

Conversation

shacharPash
Copy link
Contributor

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

Please provide a description of the change here.

@codecov-commenter
Copy link

codecov-commenter commented Dec 18, 2022

Codecov Report

Base: 92.24% // Head: 92.22% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (55b1955) compared to base (74c251a).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2519      +/-   ##
==========================================
- Coverage   92.24%   92.22%   -0.02%     
==========================================
  Files         113      113              
  Lines       29357    29377      +20     
==========================================
+ Hits        27079    27093      +14     
- Misses       2278     2284       +6     
Impacted Files Coverage Δ
redis/commands/search/query.py 93.54% <100.00%> (+0.21%) ⬆️
tests/test_asyncio/test_search.py 98.28% <100.00%> (-0.33%) ⬇️
tests/test_search.py 99.15% <100.00%> (+<0.01%) ⬆️
tests/test_asyncio/test_cluster.py 97.48% <0.00%> (-0.13%) ⬇️
tests/test_cluster.py 97.01% <0.00%> (-0.12%) ⬇️

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.

@shacharPash shacharPash marked this pull request as draft December 18, 2022 12:59
@shacharPash shacharPash marked this pull request as ready for review December 18, 2022 15:21
@dvora-h dvora-h added the feature New feature label Dec 19, 2022


@pytest.mark.redismod
def test_timeout():
Copy link
Collaborator

Choose a reason for hiding this comment

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

@shacharPash Can you combine the 2 tests into one and rename it to test_query_timeout?

@pytest.mark.redismod
def test_not_number_timeout(modclient: redis.Redis):
q1 = Query("foo").timeout("not a number")
with pytest.raises(Exception):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Better to check for a more specific error



@pytest.mark.redismod
def test_timeout():
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as the async tests...

@dvora-h dvora-h merged commit f06f3db into master Dec 21, 2022
@dvora-h dvora-h deleted the Timeout branch December 21, 2022 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants