-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
[Cassandra] Change: test connection query #1474
Conversation
@@ -85,6 +86,9 @@ def run_query(self, query, user): | |||
json_data = json.dumps(data, cls=JSONEncoder) | |||
|
|||
error = None | |||
except ReadTimeout as e: | |||
error = e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error needs to be a string. But why handle ReadTimeout in a special way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I want to pass the ReadTimeout if there is a read timeout, if you think that I can remove it so I will.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by pass it?
enabled = True | ||
except ImportError: | ||
enabled = False | ||
|
||
|
||
class Cassandra(BaseQueryRunner): | ||
noop_query = "SELECT * FROM system" | ||
noop_query = "SELECT * FROM system.compactions_in_progress" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every user has access to this? Is there something like SELECT 1
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No SELECT 1
for CQL.
Most of test queries goes in the same manner like SELECT now() FROM system.local;
…onnection