This is an automated email from the ASF dual-hosted git repository.
dcapwell pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git
The following commit(s) were added to refs/heads/trunk by this push:
new 155175c python test failures caused by error checks not filtering
JAVA_TOOL_OPTIONS
155175c is described below
commit 155175cbbba068afdfd2cc4c97d1d659b3eeeff6
Author: David Capwell <[email protected]>
AuthorDate: Thu May 6 14:27:42 2021 -0700
python test failures caused by error checks not filtering JAVA_TOOL_OPTIONS
patch by David Capwell; reviewed by Benjamin Lerer for CASSANDRA-16660
---
cqlsh_tests/test_cqlsh.py | 7 +++++--
gossip_test.py | 5 +++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/cqlsh_tests/test_cqlsh.py b/cqlsh_tests/test_cqlsh.py
index fa1edad..85333d5 100644
--- a/cqlsh_tests/test_cqlsh.py
+++ b/cqlsh_tests/test_cqlsh.py
@@ -140,11 +140,14 @@ class TestCqlsh(Tester, CqlshMixin):
logger.debug(cmds)
+ # 3.7 adds a text=True option which converts stdout/stderr to str
type, until then
+ # when printing out need to convert in order to avoid assert failing
as the type
+ # does not have an encoding
p = subprocess.Popen(cmds, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = p.communicate()
- assert 0 == len(stdout), stdout
- assert 0 == len(stderr), stderr
+ assert 0 == len(stdout), str(stdout)
+ assert 0 == len(stderr), str(stderr)
def test_simple_insert(self):
diff --git a/gossip_test.py b/gossip_test.py
index dd8dbef..0034324 100644
--- a/gossip_test.py
+++ b/gossip_test.py
@@ -4,6 +4,7 @@ import pytest
from dtest import Tester
from tools.misc import new_node
+from tools.assertions import assert_stderr_clean
since = pytest.mark.since
logger = logging.getLogger(__name__)
@@ -40,7 +41,7 @@ class TestGossip(Tester):
logger.debug("Assassinating unknown node 11.1.1.1")
out, err, _ = node1.nodetool("assassinate 11.1.1.1")
- assert len(err.strip()) <= 0, "nodetool command failed: {}".format(err)
+ assert_stderr_clean(err)
logger.debug("Starting node {}".format(node3.address()))
node3.start()
@@ -70,7 +71,7 @@ class TestGossip(Tester):
assassination_target = non_seed_nodes[0]
logger.debug("Assassinating non-seed node
{}".format(assassination_target.address()))
out, err, _ = node1.nodetool("assassinate
{}".format(assassination_target.address()))
- assert len(err.strip()) <= 0, "nodetool command failed: {}".format(err)
+ assert_stderr_clean(err)
logger.debug("Starting non-seed nodes")
for node in non_seed_nodes:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]