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 retry object to the connection #65

Merged
merged 1 commit into from
Sep 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion falkordb/falkordb.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@

if Is_Sentinel(conn):
self.sentinel, self.service_name = Sentinel_Conn(conn, ssl)
conn = self.sentinel.master_for(self.service_name, ssl=ssl)
conn = self.sentinel.master_for(self.service_name, ssl=ssl, retry=retry)

Check warning on line 126 in falkordb/falkordb.py

View check run for this annotation

Codecov / codecov/patch

falkordb/falkordb.py#L126

Added line #L126 was not covered by tests
Copy link

Choose a reason for hiding this comment

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

Improve test coverage for the added retry functionality.

The addition of the retry parameter to the master_for method call is a positive change that can enhance the reliability of the Redis connection when using a sentinel. It aligns well with the PR objectives and has the potential to handle transient failures more effectively.

However, the static analysis tool has flagged that the added line is not covered by tests. To ensure the retry mechanism behaves as expected and to maintain a high level of code quality, it is crucial to add test cases that validate the functionality of the retry parameter.

Do you want me to generate the missing test cases or open a GitHub issue to track this task?

Tools
GitHub Check: codecov/patch

[warning] 126-126: falkordb/falkordb.py#L126
Added line #L126 was not covered by tests


if Is_Cluster(conn):
conn = Cluster_Conn(
Expand Down