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

Ignite ducktape control sh #8127

Merged

Conversation

ivandasch
Copy link
Contributor

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

  • There is a single JIRA ticket related to the pull request.
  • The web-link to the pull request is attached to the JIRA ticket.
  • The JIRA ticket has the Patch Available state.
  • The pull request body describes changes that have been made.
    The description explains WHAT and WHY was made instead of HOW.
  • The pull request title is treated as the final commit message.
    The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • A reviewer has been mentioned through the JIRA comments
    (see the Maintainers list)
  • The pull request has been checked by the Teamcity Bot and
    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.

@ivandasch ivandasch changed the base branch from master to ignite-ducktape August 6, 2020 15:13
@ivandasch ivandasch changed the title WIP: Ignite ducktape control sh Ignite ducktape control sh Aug 7, 2020
@anton-vinogradov anton-vinogradov merged commit 36ed2c3 into apache:ignite-ducktape Aug 10, 2020
@@ -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
Copy link
Member

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
Copy link
Member

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)
Copy link
Member

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:
Copy link
Member

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Member

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
Copy link
Member

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?

Copy link
Contributor

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants