test_replace_with_insufficient_replicas | Failure | AssertionError
self = <replace_address_test.TestReplaceAddress object at 0x7fc9cfb455b0>
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 0x7fc9cced35b0>
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 | 114.276 |
test_basic_snapshot_and_restore | Failure | cassandra.Unavailable: Error from server: code=1000 [Unavailable exception] message="Cannot achieve consistency level ONE" info={'consistency': 'ONE', 'required_replicas': 2, 'alive_replicas': 1}
self = <snapshot_test.TestSnapshot object at 0x7fc9cfb0bc70>
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\': 2, \'alive_replicas\': 1}')
@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': 2, 'alive_replicas': 1}
../cassandra/build/venv/src/cassandra-driver/cassandra/concurrent.py:167: Unavailable | 26.356 |