Skip to content

Commit

Permalink
Merge branch '0.10.x' into 0.11.x
Browse files Browse the repository at this point in the history
  • Loading branch information
imcdo committed Jan 23, 2023
2 parents be2686a + 5aa2f00 commit dca0686
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ venv/
ENV/
env.bak/
venv.bak/
.virtualenvs/

# Spyder project settings
.spyderproject
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Sphinx==1.5.3
Sphinx<1.7
sphinx-argparse==0.1.17
sphinx-rtd-theme==0.2.4
boto3==1.15.9
Expand Down
2 changes: 1 addition & 1 deletion ducktape/cluster/remoteaccount.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def ssh_output(self, cmd, allow_fail=False, combine_stderr=True, timeout_sec=Non
stdin.close()
stdout.close()
stderr.close()

self._log(logging.DEBUG, "Returning ssh command output:\n%s" % stdoutdata)
return stdoutdata

def alive(self, pid):
Expand Down
5 changes: 3 additions & 2 deletions systests/cluster/test_remote_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,9 +551,10 @@ def test_monitor_log_exception(self):
@cluster(num_nodes=1)
def test_kill_process(self):
"""Tests that kill_process correctly works"""
grep_str = '"nc -l -p 5000"'

def get_pids():
pid_cmd = "ps ax | grep -i nc | grep -v grep | awk '{print $1}'"
pid_cmd = f"ps ax | grep -i {grep_str} | grep -v grep | awk '{{print $1}}'"

return list(node.account.ssh_capture(pid_cmd, callback=int))

Expand All @@ -566,7 +567,7 @@ def get_pids():
err_msg="Failed to start process within %d sec" % 10)

# Kill service.
node.account.kill_process("nc")
node.account.kill_process(grep_str)

wait_until(lambda: len(get_pids()) == 0, timeout_sec=10,
err_msg="Failed to kill process within %d sec" % 10)
Expand Down
12 changes: 6 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,28 @@ setenv =
PIP_PROCESS_DEPENDENCY_LINKS=1
PIP_DEFAULT_TIMEOUT=60
ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future
envdir = {homedir}/.virtualenvs/ducktape_{envname}
envdir = {package_root}/.virtualenvs/ducktape_{envname}
commands =
pytest {env:PYTESTARGS:} {posargs}

[testenv:py36]
envdir = {homedir}/.virtualenvs/ducktape-py36
envdir = {package_root}/.virtualenvs/ducktape-py36

[testenv:py37]
envdir = {homedir}/.virtualenvs/ducktape-py37
envdir = {package_root}/.virtualenvs/ducktape-py37

[testenv:py38]
envdir = {homedir}/.virtualenvs/ducktape-py38

[testenv:style]
basepython = python3.8
envdir = {homedir}/.virtualenvs/ducktape
envdir = {package_root}/.virtualenvs/ducktape
commands =
flake8 --config tox.ini

[testenv:cover]
basepython = python3.8
envdir = {homedir}/.virtualenvs/ducktape
envdir = {package_root}/.virtualenvs/ducktape
commands =
pytest {env:PYTESTARGS:} --cov ducktape --cov-report=xml --cov-report=html --cov-report=term --cov-report=annotate:textcov \
--cov-fail-under=70
Expand All @@ -51,6 +51,6 @@ commands = sphinx-build -M {env:SPHINX_BUILDER:html} . _build {posargs}


[flake8]
exclude = .git,.tox,.eggs,__pycache__,docs,build,dist
exclude = .git,.tox,.eggs,__pycache__,docs,build,dist,.virtualenvs
ignore = E111,E121,W292,E123,E226,W503
max-line-length = 120

0 comments on commit dca0686

Please sign in to comment.