Unit Test Results.

Designed for use with JUnit and Ant.

All Failures

ClassNameStatusTypeTime(s)
8_cythonno_x86_64_12_64test_insert_data_during_replace_same_addressFailureccmlib.node.NodeError: C* process with 12616 is terminated

self = <replace_address_test.TestReplaceAddress object at 0x7fba53eaed30>

@pytest.mark.skip_version('3.9')
@since('2.2')
def test_insert_data_during_replace_same_address(self):
"""
Test that replacement node with same address DOES NOT receive writes during replacement
@jira_ticket CASSANDRA-8523
"""
> self._test_insert_data_during_replace(same_address=True)

replace_address_test.py:497:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
replace_address_test.py:252: in _test_insert_data_during_replace
self._do_replace(same_address=same_address, extra_jvm_args=["-Dcassandra.write_survey=true"])
replace_address_test.py:122: in _do_replace
self.replacement_node.start(jvm_args=extra_jvm_args,
../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/node.py:928: in start
self.wait_for_binary_interface(from_mark=self.mark)
../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/node.py:711: in wait_for_binary_interface
self.watch_log_for("Starting listening for CQL clients", **kwargs)
../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/node.py:608: in watch_log_for
self.raise_node_error_if_cassandra_process_is_terminated()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <ccmlib.node.Node object at 0x7fba3b5e4f70>

def raise_node_error_if_cassandra_process_is_terminated(self):
if not self._is_pid_running():
msg = "C* process with {pid} is terminated".format(pid=self.pid)
common.debug(msg)
> raise NodeError(msg)
E ccmlib.node.NodeError: C* process with 12616 is terminated

../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/node.py:692: NodeError
100.521
8_cythonno_x86_64_13_64test_rf_expand_property_file_snitchFailureccmlib.common.UnavailableSocketError: Inet address 127.0.0.3:7000 is not available: [Errno 98] Address already in use; a cluster may already be running or you may need to add the loopback alias

itf = ('127.0.0.3', 7000)

def assert_socket_available(itf):
info = socket.getaddrinfo(itf[0], itf[1], socket.AF_UNSPEC, socket.SOCK_STREAM)
if not info:
raise UnavailableSocketError("Failed to get address info for [%s]:%s" % itf)

(family, socktype, proto, canonname, sockaddr) = info[0]
s = socket.socket(family, socktype)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

try:
> s.bind(sockaddr)
E OSError: [Errno 98] Address already in use

../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/common.py:631: OSError

During handling of the above exception, another exception occurred:

self = <replication_test.TestSnitchConfigurationUpdate object at 0x7f4bd9d028e0>

@since('2.1', max_version='5.0.x')
def test_rf_expand_property_file_snitch(self):
"""
@jira_ticket CASSANDRA-10238
@jira_ticket CASSANDRA-10242
@jira_ticket CASSANDRA-10243

Confirm that when racks are expanded using a property file snitch the RF is not impacted.
"""
> self._test_rf_on_snitch_update(nodes=[3], rf={'class': '\'NetworkTopologyStrategy\'', 'dc1': 3},
snitch_class_name='PropertyFileSnitch',
snitch_config_file='cassandra-topology.properties',
snitch_lines_before=lambda i, node: ["default=dc1:rack0"],
snitch_lines_after=lambda i, node: ["127.0.0.1=dc1:rack0", "127.0.0.2=dc1:rack1", "127.0.0.3=dc1:rack2"],
final_racks=["rack0", "rack1", "rack2"],
nodes_to_shutdown=[1, 2])

replication_test.py:460:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
replication_test.py:552: in _test_rf_on_snitch_update
cluster.start()
../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/cluster.py:515: in start
common.assert_socket_available(itf)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

itf = ('127.0.0.3', 7000)

def assert_socket_available(itf):
info = socket.getaddrinfo(itf[0], itf[1], socket.AF_UNSPEC, socket.SOCK_STREAM)
if not info:
raise UnavailableSocketError("Failed to get address info for [%s]:%s" % itf)

(family, socktype, proto, canonname, sockaddr) = info[0]
s = socket.socket(family, socktype)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

try:
s.bind(sockaddr)
s.close()
return True
except socket.error as msg:
s.close()
addr, port = itf
> raise UnavailableSocketError(
"Inet address %s:%s is not available: %s; a cluster may already be running or you may need to add the loopback alias" % (
addr, port, msg))
E ccmlib.common.UnavailableSocketError: Inet address 127.0.0.3:7000 is not available: [Errno 98] Address already in use; a cluster may already be running or you may need to add the loopback alias

../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/common.py:637: UnavailableSocketError
4.243
8_cythonno_x86_64_13_64test_collection_list_ttlFailurecassandra.Unavailable: Error from server: code=1000 [Unavailable exception] message="Cannot achieve consistency level ONE" info={'consistency': 'ONE', 'required_replicas': 1, 'alive_replicas': 0}

self = <ttl_test.TestTTL object at 0x7f4bd9c8b730>

def test_collection_list_ttl(self):
"""
Test that ttl has a granularity of elements using a list collection.
"""
self.prepare(default_time_to_live=10)

self.session1.execute("ALTER TABLE ttl_table ADD mylist list<int>;""")
start = time.time()
self.session1.execute("""
INSERT INTO ttl_table (key, col1, mylist) VALUES (%d, %d, %s);
""" % (1, 1, [1, 2, 3, 4, 5]))
self.session1.execute("""
UPDATE ttl_table USING TTL 5 SET mylist[0] = 42, mylist[4] = 42 WHERE key=1;
""")
> assert_all(self.session1, "SELECT * FROM ttl_table;", [[1, 1, None, None, [42, 2, 3, 4, 42]]])

ttl_test.py:267:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tools/assertions.py:182: in assert_all
res = session.execute(simple_query) if timeout is None else session.execute(simple_query, timeout=timeout)
../cassandra/build/venv/src/cassandra-driver/cassandra/cluster.py:2618: in execute
return self.execute_async(query, parameters, trace, custom_payload, timeout, execution_profile, paging_state, host, execute_as).result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <ResponseFuture: query='<SimpleStatement query="SELECT * FROM ttl_table;", consistency=Not Set>' request_id=21 result=...cy level ONE" info={'consistency': 'ONE', 'required_replicas': 1, 'alive_replicas': 0} coordinator_host=127.0.0.3:9042>

def result(self):
"""
Return the final result or raise an Exception if errors were
encountered. If the final result or error has not been set
yet, this method will block until it is set, or the timeout
set for the request expires.

Timeout is specified in the Session request execution functions.
If the timeout is exceeded, an :exc:`cassandra.OperationTimedOut` will be raised.
This is a client-side timeout. For more information
about server-side coordinator timeouts, see :class:`.policies.RetryPolicy`.

Example usage::

>>> future = session.execute_async("SELECT * FROM mycf")
>>> # do other stuff...

>>> try:
... rows = future.result()
... for row in rows:
... ... # process results
... except Exception:
... log.exception("Operation failed:")

"""
self._event.wait()
if self._final_result is not _NOT_SET:
return ResultSet(self, self._final_result)
else:
> raise self._final_exception
E cassandra.Unavailable: Error from server: code=1000 [Unavailable exception] message="Cannot achieve consistency level ONE" info={'consistency': 'ONE', 'required_replicas': 1, 'alive_replicas': 0}

../cassandra/build/venv/src/cassandra-driver/cassandra/cluster.py:4894: Unavailable
14.968
8_cythonno_x86_64_13_64test_describeFailureAssertionError: <stdin>:3:OperationTimedOut: errors={'Connection defunct by heartbeat': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1:9042 <stdin>:3:Warning: schema version mismatch detected; check the schema versions of your nodes in system.local and system.peers. <stdin>:5:OperationTimedOut: errors={'Connection defunct by heartbeat': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1:9042 <stdin>:5:Warning: schema version mismatch detected; check the schema versions of your nodes in system.local and system.peers. <stdin>:7:OperationTimedOut: errors={'Connection defunct by heartbeat': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1:9042 <stdin>:7:Warning: schema version mismatch detected; check the schema versions of your nodes in system.local and system.peers. <stdin>:9:OperationTimedOut: errors={'Connection defunct by heartbeat': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1:9042 <stdin>:9:Warning: schema version mismatch detected; check the schema versions of your nodes in system.local and system.peers. <stdin>:11:OperationTimedOut: errors={'Connection defunct by heartbeat': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1:9042 <stdin>:11:Warning: schema version mismatch detected; check the schema versions of your nodes in system.local and system.peers. <stdin>:13:OperationTimedOut: errors={'Connection defunct by heartbeat': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1:9042 <stdin>:13:Warning: schema version mismatch detected; check the schema versions of your nodes in system.local and system.peers. <stdin>:16:OperationTimedOut: errors={'Connection defunct by heartbeat': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1:9042 <stdin>:16:Warning: schema version mismatch detected; check the schema versions of your nodes in system.local and system.peers. assert False

self = <cqlsh_tests.test_cqlsh.TestCqlsh object at 0x7f4bd9c64640>

def test_describe(self):
"""
@jira_ticket CASSANDRA-7814
"""
self.cluster.populate(1)
self.cluster.start()
node1, = self.cluster.nodelist()

> self.execute(
cql="""
CREATE KEYSPACE test WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor' : 1};
CREATE TABLE test.users ( userid text PRIMARY KEY, firstname text, lastname text, age int);
CREATE INDEX myindex ON test.users (age);
CREATE INDEX "QuotedNameIndex" on test.users (firstName);
CREATE TABLE test.test (id int, col int, val text, PRIMARY KEY(id, col));
CREATE INDEX ON test.test (col);
CREATE INDEX ON test.test (val)
""")

cqlsh_tests/test_cqlsh.py:866:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <cqlsh_tests.test_cqlsh.TestCqlsh object at 0x7f4bd9c64640>
cql = "\n CREATE KEYSPACE test WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor' : 1};\n ...;\n CREATE INDEX ON test.test (col);\n CREATE INDEX ON test.test (val)\n "
expected_output = None, expected_err = None, env_vars = None
output_is_ordered = True, err_is_ordered = True

def execute(self, cql, expected_output=None, expected_err=None, env_vars=None, output_is_ordered=True, err_is_ordered=True):
logger.debug(cql)

node1, = self.cluster.nodelist()
output, err = self.run_cqlsh(node1, cql, env_vars=env_vars)

if err:
if expected_err:
err = err[10:] # strip <stdin>:2:
if err_is_ordered:
self.check_response(err, expected_err)
else:
self.check_response_unordered(err, expected_err)
return
else:
> assert False, err
E AssertionError: <stdin>:3:OperationTimedOut: errors={'Connection defunct by heartbeat': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1:9042
E <stdin>:3:Warning: schema version mismatch detected; check the schema versions of your nodes in system.local and system.peers.
E <stdin>:5:OperationTimedOut: errors={'Connection defunct by heartbeat': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1:9042
E <stdin>:5:Warning: schema version mismatch detected; check the schema versions of your nodes in system.local and system.peers.
E <stdin>:7:OperationTimedOut: errors={'Connection defunct by heartbeat': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1:9042
E <stdin>:7:Warning: schema version mismatch detected; check the schema versions of your nodes in system.local and system.peers.
E <stdin>:9:OperationTimedOut: errors={'Connection defunct by heartbeat': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1:9042
E <stdin>:9:Warning: schema version mismatch detected; check the schema versions of your nodes in system.local and system.peers.
E <stdin>:11:OperationTimedOut: errors={'Connection defunct by heartbeat': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1:9042
E <stdin>:11:Warning: schema version mismatch detected; check the schema versions of your nodes in system.local and system.peers.
E <stdin>:13:OperationTimedOut: errors={'Connection defunct by heartbeat': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1:9042
E <stdin>:13:Warning: schema version mismatch detected; check the schema versions of your nodes in system.local and system.peers.
E <stdin>:16:OperationTimedOut: errors={'Connection defunct by heartbeat': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1:9042
E <stdin>:16:Warning: schema version mismatch detected; check the schema versions of your nodes in system.local and system.peers.
E
E assert False

cqlsh_tests/test_cqlsh.py:1613: AssertionError
190.454
8_cythonno_x86_64_13_64test_undefined_as_null_indicator_no_prepared_statementsFailureAssertionError: assert [['1', 'eggs', '1', '1.1', '2015-01-01 00:00:00.000+0000', '[1, 2, 3]'],\n ['100', 'sausage', '100', '2.2', 'undefined', 'undefined'],\n ['2', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined'],\n ['200', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined']] == [] Left contains 4 more items, first extra item: ['1', 'eggs', '1', '1.1', '2015-01-01 00:00:00.000+0000', '[1, 2, 3]'] Full diff: [ - , + ['1', + 'eggs', + '1', + '1.1', + '2015-01-01 00:00:00.000+0000', + '[1, 2, 3]'], + ['100', + 'sausage', + '100', + '2.2', + 'undefined', + 'undefined'], + ['2', + 'undefined', + 'undefined', + 'undefined', + 'undefined', + 'undefined'], + ['200', + 'undefined', + 'undefined', + 'undefined', + 'undefined', + 'undefined'], ]

self = <cqlsh_tests.test_cqlsh_copy.TestCqlshCopy object at 0x7f4bd9bcb910>

def test_undefined_as_null_indicator_no_prepared_statements(self):
"""
Use custom_null_indicator_template to test COPY with NULL = undefined and no prepared statements.
"""
> self.custom_null_indicator_template('undefined', copy_from_options={'PREPAREDSTATEMENTS': 'False'})

cqlsh_tests/test_cqlsh_copy.py:558:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cqlsh_tests/test_cqlsh_copy.py:514: in custom_null_indicator_template
self.assertCsvResultEqual(tempfile.name, results, 'testnullindicator')
cqlsh_tests/test_cqlsh_copy.py:347: in assertCsvResultEqual
raise e
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <cqlsh_tests.test_cqlsh_copy.TestCqlshCopy object at 0x7f4bd9bcb910>
csv_filename = '/home/cassandra/cassandra/build/run-python-dtest.W3Xixa/tmp75aj7xu_'
results = [], table_name = 'testnullindicator', columns = None
cql_type_names = None, sort_data = True

def assertCsvResultEqual(self, csv_filename, results, table_name=None,
columns=None, cql_type_names=None, sort_data=True):

csv_results = list(csv_rows(csv_filename))
self.maxDiff = None

if sort_data:
csv_results = sorted(csv_results)
results = sorted(results)

try:
> assert csv_results == results
E AssertionError: assert [['1', 'eggs', '1', '1.1', '2015-01-01 00:00:00.000+0000', '[1, 2, 3]'],\n ['100', 'sausage', '100', '2.2', 'undefined', 'undefined'],\n ['2', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined'],\n ['200', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined']] == []
E Left contains 4 more items, first extra item: ['1', 'eggs', '1', '1.1', '2015-01-01 00:00:00.000+0000', '[1, 2, 3]']
E Full diff:
E [
E - ,
E + ['1',
E + 'eggs',
E + '1',
E + '1.1',
E + '2015-01-01 00:00:00.000+0000',
E + '[1, 2, 3]'],
E + ['100',
E + 'sausage',
E + '100',
E + '2.2',
E + 'undefined',
E + 'undefined'],
E + ['2',
E + 'undefined',
E + 'undefined',
E + 'undefined',
E + 'undefined',
E + 'undefined'],
E + ['200',
E + 'undefined',
E + 'undefined',
E + 'undefined',
E + 'undefined',
E + 'undefined'],
E ]

cqlsh_tests/test_cqlsh_copy.py:331: AssertionError
17.484
8_cythonno_x86_64_13_64test_reading_text_pk_no_prepared_statementsFailureAssertionError: assert [['text1',\n 'text2',\n '127.0.0.1',\n 'text3',\n 'f7ce3ac0-a66e-11e6-b58e-4e29450fd577',\n 'SA'],\n ['text4',\n 'ヽ(´ー`)ノ',\n '127.0.0.2',\n 'text6',\n 'f7ce3ac0-a66e-11e6-b58e-4e29450fd577',\n 'SA']] == [] Left contains 2 more items, first extra item: ['text1', 'text2', '127.0.0.1', 'text3', 'f7ce3ac0-a66e-11e6-b58e-4e29450fd577', 'SA'] Full diff: [ - , + ['text1', + 'text2', + '127.0.0.1', + 'text3', + 'f7ce3ac0-a66e-11e6-b58e-4e29450fd577', + 'SA'], + ['text4', + 'ヽ(´ー`)ノ', + '127.0.0.2', + 'text6', + 'f7ce3ac0-a66e-11e6-b58e-4e29450fd577', + 'SA'], ]

self = <cqlsh_tests.test_cqlsh_copy.TestCqlshCopy object at 0x7f4bd9b81a90>

@since('2.2')
def test_reading_text_pk_no_prepared_statements(self):
"""
When using non-prepared statements we don't need to convert any value except for partition keys,
and this test ensures that we can convert text related types into a binary partition key.

@jira_ticket CASSANDRA-12909
"""
self.prepare()
self.session.execute("""
CREATE TABLE test_reading_text_pk_no_prepared_statements (
ascii_id ascii,
text_id text,
inet_id inet,
varchar_id varchar,
user_id timeuuid,
val text,
PRIMARY KEY ((ascii_id, text_id, inet_id, varchar_id, user_id))
)""")

tempfile = self.get_temp_file()
with open(tempfile.name, 'w') as f:
f.write('text1,text2,127.0.0.1,text3,f7ce3ac0-a66e-11e6-b58e-4e29450fd577,SA\n')
f.write('text4,ヽ(´ー`)ノ,127.0.0.2,text6,f7ce3ac0-a66e-11e6-b58e-4e29450fd577,SA\n')

logger.debug('Importing from csv file: {name}'.format(name=tempfile.name))
cmds = "COPY ks.test_reading_text_pk_no_prepared_statements FROM '{name}' WITH PREPAREDSTATEMENTS=FALSE"\
.format(name=tempfile.name)
self.run_cqlsh(cmds=cmds)

out, err, _ = self.run_cqlsh(cmds="SELECT * FROM ks.test_reading_text_pk_no_prepared_statements")
res = self.parse_cqlsh_query(out=out, num_cols=6, timestamps_to_be_rounded=[])

> self.assertCsvResultEqual(tempfile.name, res, 'test_reading_text_pk_no_prepared_statements')

cqlsh_tests/test_cqlsh_copy.py:3134:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cqlsh_tests/test_cqlsh_copy.py:347: in assertCsvResultEqual
raise e
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <cqlsh_tests.test_cqlsh_copy.TestCqlshCopy object at 0x7f4bd9b81a90>
csv_filename = '/home/cassandra/cassandra/build/run-python-dtest.W3Xixa/tmpkm3zr79j'
results = [], table_name = 'test_reading_text_pk_no_prepared_statements'
columns = None, cql_type_names = None, sort_data = True

def assertCsvResultEqual(self, csv_filename, results, table_name=None,
columns=None, cql_type_names=None, sort_data=True):

csv_results = list(csv_rows(csv_filename))
self.maxDiff = None

if sort_data:
csv_results = sorted(csv_results)
results = sorted(results)

try:
> assert csv_results == results
E AssertionError: assert [['text1',\n 'text2',\n '127.0.0.1',\n 'text3',\n 'f7ce3ac0-a66e-11e6-b58e-4e29450fd577',\n 'SA'],\n ['text4',\n 'ヽ(´ー`)ノ',\n '127.0.0.2',\n 'text6',\n 'f7ce3ac0-a66e-11e6-b58e-4e29450fd577',\n 'SA']] == []
E Left contains 2 more items, first extra item: ['text1', 'text2', '127.0.0.1', 'text3', 'f7ce3ac0-a66e-11e6-b58e-4e29450fd577', 'SA']
E Full diff:
E [
E - ,
E + ['text1',
E + 'text2',
E + '127.0.0.1',
E + 'text3',
E + 'f7ce3ac0-a66e-11e6-b58e-4e29450fd577',
E + 'SA'],
E + ['text4',
E + 'ヽ(´ー`)ノ',
E + '127.0.0.2',
E + 'text6',
E + 'f7ce3ac0-a66e-11e6-b58e-4e29450fd577',
E + 'SA'],
E ]

cqlsh_tests/test_cqlsh_copy.py:331: AssertionError
16.370
8_cythonno_x86_64_14_64test_replace_with_insufficient_replicasFailureAssertionError

self = <replace_address_test.TestReplaceAddress object at 0x7fb9e08c4520>

def test_replace_with_insufficient_replicas(self):
"""
Test that replace fails when there are insufficient replicas
@jira_ticket CASSANDRA-11848
"""
self.fixture_dtest_setup.ignore_log_patterns = list(self.fixture_dtest_setup.ignore_log_patterns) + [
r'Unable to find sufficient sources for streaming range']

self._setup(n=3)
self._insert_data(rf=2)

self._stop_node_to_replace()
# stop other replica. For CEP-21 purposes, we need to ensure this is not
# the cluster's only CMS member
logger.debug("Stopping other replica")
self.cluster.nodelist()[1].stop(wait_other_notice=True)

options = {}
# CEP-21: availability is intentionally degraded, so we lower the required number of
# acks required for the replacement node to progress to a point where it attempts to
# perform streaming
if self.cluster.version() >= LooseVersion('5.1'):
options = {'progress_barrier_min_consistency_level': 'ONE',
'progress_barrier_default_consistency_level': 'ONE'}

self._do_replace(wait_for_binary_proto=False,
wait_other_notice=False,
opts=options)

# replace should fail due to insufficient replicas
self.replacement_node.watch_log_for("Unable to find sufficient sources for streaming range")
> assert_not_running(self.replacement_node)

replace_address_test.py:640:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

node = <ccmlib.node.Node object at 0x7fb9e08f49d0>

def assert_not_running(node):
"""
Assert that a given node is not running
@param node The node to check status
"""
attempts = 0
while node.is_running() and attempts < 10:
sleep(1)
attempts = attempts + 1

> assert not node.is_running()
E AssertionError

tools/assertions.py:282: AssertionError
118.221
8_cythonno_x86_64_14_64test_basic_snapshot_and_restoreFailurecassandra.Unavailable: Error from server: code=1000 [Unavailable exception] message="Cannot achieve consistency level ONE" info={'consistency': 'ONE', 'required_replicas': 1, 'alive_replicas': 0}

self = <snapshot_test.TestSnapshot object at 0x7fb9e0888be0>

def test_basic_snapshot_and_restore(self):
cluster = self.cluster
cluster.populate(1).start()
(node1,) = cluster.nodelist()
session = self.patient_cql_connection(node1)
self.create_schema(session)

> self.insert_rows(session, 0, 100)

snapshot_test.py:99:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
snapshot_test.py:34: in insert_rows
execute_concurrent_with_args(session, insert_statement, args, concurrency=20)
../cassandra/build/venv/src/cassandra-driver/cassandra/concurrent.py:238: in execute_concurrent_with_args
return execute_concurrent(session, zip(cycle((statement,)), parameters), *args, **kwargs)
../cassandra/build/venv/src/cassandra-driver/cassandra/concurrent.py:94: in execute_concurrent
return executor.execute(concurrency, raise_on_first_error)
../cassandra/build/venv/src/cassandra-driver/cassandra/concurrent.py:201: in execute
return super(ConcurrentExecutorListResults, self).execute(concurrency, fail_fast)
../cassandra/build/venv/src/cassandra-driver/cassandra/concurrent.py:120: in execute
return self._results()
../cassandra/build/venv/src/cassandra-driver/cassandra/concurrent.py:219: in _results
self._raise(self._exception)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

exc = Unavailable('Error from server: code=1000 [Unavailable exception] message="Cannot achieve consistency level ONE" info={\'consistency\': \'ONE\', \'required_replicas\': 1, \'alive_replicas\': 0}')

@staticmethod
def _raise(exc):
if six.PY2 and isinstance(exc, tuple):
(exc_type, value, traceback) = exc
six.reraise(exc_type, value, traceback)
else:
> raise exc
E cassandra.Unavailable: Error from server: code=1000 [Unavailable exception] message="Cannot achieve consistency level ONE" info={'consistency': 'ONE', 'required_replicas': 1, 'alive_replicas': 0}

../cassandra/build/venv/src/cassandra-driver/cassandra/concurrent.py:167: Unavailable
22.770
8_cythonno_x86_64_14_64test_collection_set_ttlFailurecassandra.Unavailable: Error from server: code=1000 [Unavailable exception] message="Cannot achieve consistency level ONE" info={'consistency': 'ONE', 'required_replicas': 2, 'alive_replicas': 1}

self = <ttl_test.TestTTL object at 0x7fb9e08052b0>

def test_collection_set_ttl(self):
"""
Test that ttl has a granularity of elements using a set collection.
"""
self.prepare(default_time_to_live=10)

self.session1.execute("ALTER TABLE ttl_table ADD myset set<int>;""")
start = time.time()
> self.session1.execute("""
INSERT INTO ttl_table (key, col1, myset) VALUES (%d, %d, %s);
""" % (1, 1, '{1,2,3,4,5}'))

ttl_test.py:281:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../cassandra/build/venv/src/cassandra-driver/cassandra/cluster.py:2618: in execute
return self.execute_async(query, parameters, trace, custom_payload, timeout, execution_profile, paging_state, host, execute_as).result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <ResponseFuture: query='<SimpleStatement query="
INSERT INTO ttl_table (key, col1, myset) VALUES (1, 1, {1...cy level ONE" info={'consistency': 'ONE', 'required_replicas': 2, 'alive_replicas': 1} coordinator_host=127.0.0.1:9042>

def result(self):
"""
Return the final result or raise an Exception if errors were
encountered. If the final result or error has not been set
yet, this method will block until it is set, or the timeout
set for the request expires.

Timeout is specified in the Session request execution functions.
If the timeout is exceeded, an :exc:`cassandra.OperationTimedOut` will be raised.
This is a client-side timeout. For more information
about server-side coordinator timeouts, see :class:`.policies.RetryPolicy`.

Example usage::

>>> future = session.execute_async("SELECT * FROM mycf")
>>> # do other stuff...

>>> try:
... rows = future.result()
... for row in rows:
... ... # process results
... except Exception:
... log.exception("Operation failed:")

"""
self._event.wait()
if self._final_result is not _NOT_SET:
return ResultSet(self, self._final_result)
else:
> raise self._final_exception
E cassandra.Unavailable: Error from server: code=1000 [Unavailable exception] message="Cannot achieve consistency level ONE" info={'consistency': 'ONE', 'required_replicas': 2, 'alive_replicas': 1}

../cassandra/build/venv/src/cassandra-driver/cassandra/cluster.py:4894: Unavailable
22.545