-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Ignite ducktape control sh #8127
Ignite ducktape control sh #8127
Conversation
@@ -47,14 +47,13 @@ includeToClassPath() { | |||
|
|||
for file in $1/* | |||
do | |||
if [[ -z "${EXCLUDE_MODULES}" ]] || [[ ${EXCLUDE_MODULES} != *"`basename $file`"* ]]; then | |||
echo "$file included" | |||
if [[ -z "${EXCLUDE_MODULES:-}" ]] || [[ ${EXCLUDE_MODULES:-} != *"`basename $file`"* ]]; then |
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.
do we really need EXCLUDE_MODULES?
baseline_pattern = re.compile("Consistent(Id|ID)=([^\\s]+),\\sS(tate|TATE)=([^\\s]+),?(\\sOrder=(\\d+))?") | ||
|
||
match = state_pattern.search(output) | ||
state = match.group(1) if match else None |
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 think, is it better to use named group instead of indices?
https://docs.python.org/3/howto/regex.html#non-capturing-and-named-groups
""" | ||
output = self.__run("--baseline") | ||
|
||
return self.__parse_cluster_state(output) |
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.
Use 'result' instead of 'output', as it's used in other methods. Or vice versa
""" | ||
Test activate and deactivate cluster. | ||
""" | ||
if version < V_2_8_0: |
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.
This condition is not part of test itself, let's make decorator from that. Otherwise we should not used it at all, as every test should be marked this 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.
@timoninmaxim could explain how to do this properly in detail, if possible.
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.
@anton-vinogradov See my next PR #8137
match = pattern.search(output) | ||
|
||
if match: | ||
return int(match.group(1)), output |
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.
Is it ok, that it's possible to receive exit_code !=0
but in the same time text output will have code equals to 0?
@@ -156,10 +164,9 @@ def await_event(self, evt_message, timeout_sec, from_the_beginning=False, backof | |||
:param backoff_sec: Number of seconds to back off between each failure to meet the condition | |||
before checking again. | |||
""" | |||
assert len(self.nodes) == 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.
Was there a reason to have the assert?
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.
@timoninmaxim It was implemented partially by me, assert was used to check it was used properly (applicable only for single-node services)
Thank you for submitting the pull request to the Apache Ignite.
In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:
The Contribution Checklist
The description explains WHAT and WHY was made instead of HOW.
The following pattern must be used:
IGNITE-XXXX Change summary
whereXXXX
- number of JIRA issue.(see the Maintainers list)
the
green visa
attached to the JIRA ticket (see TC.Bot: Check PR)Notes
If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com #ignite channel.