Unit Test Results.

Designed for use with JUnit and Ant.

All Failures

ClassNameStatusTypeTime(s)
8_cythonno_x86_64_28_64test_multiple_full_repairs_lcsFailureFailed: Timeout >900.0s

self = <repair_tests.incremental_repair_test.TestIncRepair object at 0x7feff54626d0>

@since("2.2")
def test_multiple_full_repairs_lcs(self):
"""
@jira_ticket CASSANDRA-11172 - repeated full repairs should not cause infinite loop in getNextBackgroundTask
"""
cluster = self.cluster
cluster.populate(2).start()
node1, node2 = cluster.nodelist()
for x in range(0, 10):
> node1.stress(['write', 'n=100k', 'no-warmup', '-rate', 'threads=10', '-schema', 'compaction(strategy=LeveledCompactionStrategy,sstable_size_in_mb=10)', 'replication(factor=2)'])

repair_tests/incremental_repair_test.py:453:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/node.py:1529: in stress
return handle_external_tool_process(p, ['stress'] + stress_options)
../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/node.py:2325: in handle_external_tool_process
out, err = process.communicate()
/usr/lib/python3.8/subprocess.py:1028: in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
/usr/lib/python3.8/subprocess.py:1868: in _communicate
ready = selector.select(timeout)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <selectors.PollSelector object at 0x7feff4787eb0>, timeout = None

def select(self, timeout=None):
# This is shared between poll() and epoll().
# epoll() has a different signature and handling of timeout parameter.
if timeout is None:
timeout = None
elif timeout <= 0:
timeout = 0
else:
# poll() has a resolution of 1 millisecond, round away from
# zero to wait *at least* timeout seconds.
timeout = math.ceil(timeout * 1e3)
ready = []
try:
> fd_event_list = self._selector.poll(timeout)
E Failed: Timeout >900.0s

/usr/lib/python3.8/selectors.py:415: Failed
905.247
8_cythonno_x86_64_57_64test_dc_repairFailureFailed: Timeout >900.0s

self = <repair_tests.repair_test.TestRepair object at 0x7f8b6eaa5310>

def test_dc_repair(self):
"""
* Set up a multi DC cluster
* Perform a -dc repair on two dc's
* Assert only nodes on those dcs were repaired
"""
> cluster = self._setup_multi_dc()

repair_tests/repair_test.py:652:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
repair_tests/repair_test.py:782: in _setup_multi_dc
self.check_rows_on_node(node, 2001, found=[1000])
repair_tests/repair_test.py:90: in check_rows_on_node
node.start(wait_for_binary_proto=True)
../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)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <ccmlib.node.Node object at 0x7f8b6c973760>
exprs = 'Starting listening for CQL clients', from_mark = 498378, timeout = 90
process = None, verbose = False, filename = 'system.log'
error_on_pid_terminated = True

def watch_log_for(self, exprs, from_mark=None, timeout=600,
process=None, verbose=False, filename='system.log',
error_on_pid_terminated=False):
"""
Watch the log until one or more (regular) expressions are found or timeouts (a
TimeoutError is then raised). On successful completion, a list of pair (line matched,
match object) is returned.

Will raise NodeError if error_on_pit_terminated is True and C* pid is not running.
"""
start = time.time()
tofind = [exprs] if isinstance(exprs, string_types) else exprs
tofind = [re.compile(e) for e in tofind]
matchings = []
reads = ""
if len(tofind) == 0:
return None

log_file = os.path.join(self.log_directory(), filename)
output_read = False
while not os.path.exists(log_file):
time.sleep(.5)
TimeoutError.raise_if_passed(start=start, timeout=timeout, node=self.name,
msg="Timed out waiting for {} to be created.".format(log_file))

if process and not output_read:
process.poll()
if process.returncode is not None:
self.print_process_output(self.name, process, verbose)
output_read = True
if process.returncode != 0:
raise RuntimeError() # Shouldn't reuse RuntimeError but I'm lazy

with open(log_file) as f:
if from_mark:
f.seek(from_mark)

while True:
# First, if we have a process to check, then check it.
# Skip on Windows - stdout/stderr is cassandra.bat
if not common.is_win() and not output_read:
if process:
process.poll()
if process.returncode is not None:
self.print_process_output(self.name, process, verbose)
output_read = True
if process.returncode != 0:
raise RuntimeError() # Shouldn't reuse RuntimeError but I'm lazy

line = f.readline()
if line:
reads = reads + line
for e in tofind:
m = e.search(line)
if m:
matchings.append((line, m))
tofind.remove(e)
if len(tofind) == 0:
return matchings[0] if isinstance(exprs, string_types) else matchings
else:
# wait for the situation to clarify, either stop or just a pause in log production
> time.sleep(1)
E Failed: Timeout >900.0s

../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/node.py:605: Failed
906.946
8_cythonno_x86_64_58_64test_compaction_throughputFailureAssertionError: assert (5.0 + 0.5) >= 5.59 + where 5.0 = float('5')

self = <compaction_test.TestCompaction object at 0x7f46e9e362e0>

def test_compaction_throughput(self):
"""
Test setting compaction throughput.
Set throughput, insert data and ensure compaction performance corresponds.
"""
cluster = self.cluster
cluster.populate(1).start()
[node1] = cluster.nodelist()

# disableautocompaction only disables compaction for existing tables,
# so initialize stress tables with stress first
stress_write(node1, keycount=1)
node1.nodetool('disableautocompaction')

stress_write(node1, keycount=200000 * cluster.data_dir_count)

threshold = "5"
node1.nodetool('setcompactionthroughput -- ' + threshold)

node1.flush()
if node1.get_cassandra_version() < '2.2':
log_file = 'system.log'
else:
log_file = 'debug.log'
mark = node1.mark_log(filename=log_file)
node1.compact()
matches = node1.watch_log_for('Compacted', from_mark=mark, filename=log_file)

stringline = matches[0]

throughput_pattern = '{}={avgthroughput:f}{units}/s'
m = parse.search(throughput_pattern, stringline)
avgthroughput = m.named['avgthroughput']
found_units = m.named['units']

unit_conversion_dct = {
"MB": 1,
"MiB": 1,
"KiB": 1. / 1024,
"GiB": 1024,
"B": 1. / (1024 * 1024),
}

units = ['MB'] if cluster.version() < LooseVersion('3.6') else ['B', 'KiB', 'MiB', 'GiB']
assert found_units in units

logger.debug(avgthroughput)
avgthroughput_mb = unit_conversion_dct[found_units] * float(avgthroughput)

# The throughput in the log is computed independantly from the throttling and on the output files while
# throttling is on the input files, so while that throughput shouldn't be higher than the one set in
# principle, a bit of wiggle room is expected
> assert float(threshold) + 0.5 >= avgthroughput_mb
E AssertionError: assert (5.0 + 0.5) >= 5.59
E + where 5.0 = float('5')

compaction_test.py:302: AssertionError
106.538
8_cythonno_x86_64_59_64test_bulk_round_trip_blogposts_with_max_connectionsFailurecassandra.OperationTimedOut: errors={'127.0.0.3:9042': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.3:9042

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

def test_bulk_round_trip_blogposts_with_max_connections(self):
"""
Same as test_bulk_round_trip_blogposts but limit the maximum number of concurrent connections a host will
accept to simulate a failed connection to a replica that is up. Here we are interested in testing COPY TO,
where we should have at most worker_processes * nodes connections + 1 connections, the +1 is the cqlsh
connection. For COPY FROM the driver handles retries, we use only 2 worker processes to make sure it succeeds.

@jira_ticket CASSANDRA-10938
"""
> self._test_bulk_round_trip(nodes=3, partitioner="murmur3", num_operations=10000,
configuration_options={'native_transport_max_concurrent_connections': '12',
'batch_size_warn_threshold_in_kb': '10'},
profile=os.path.join(os.path.dirname(os.path.realpath(__file__)), 'blogposts.yaml'),
stress_table='stresscql.blogposts',
copy_to_options={'NUMPROCESSES': 5, 'MAXATTEMPTS': 20},
copy_from_options={'NUMPROCESSES': 2})

cqlsh_tests/test_cqlsh_copy.py:2498:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cqlsh_tests/test_cqlsh_copy.py:2436: in _test_bulk_round_trip
num_records = create_records()
cqlsh_tests/test_cqlsh_copy.py:2409: in create_records
ret = rows_to_list(self.session.execute(count_statement))[0][0]
../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 COUNT(*) FROM stresscql.blogposts", consistency=ALL>' request_i...9042': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.3:9042 coordinator_host=None>

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.OperationTimedOut: errors={'127.0.0.3:9042': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.3:9042

../cassandra/build/venv/src/cassandra-driver/cassandra/cluster.py:4894: OperationTimedOut
179.816
8_cythonno_x86_64_9_64test_fail_without_replaceFailureccmlib.node.TimeoutError: 16 Dec 2024 19:01:13 [node3] after 20.03/20 seconds Missing: ['Use cassandra.replace_address if you want to replace this node'] not found in system.log: Head: INFO [main] 2024-12-16 18:58:05,099 YamlConfigura Tail: ...nitializing system_schema.indexes INFO [main] 2024-12-16 19:01:12,523 FileSystemOwnershipCheck.java:125 - Filesystem ownership check is not enabled.

self = <replace_address_test.TestReplaceAddress object at 0x7f27159da1f0>

@since('3.6')
def test_fail_without_replace(self):
"""
When starting a node from a clean slate with the same address as
an existing down node, the node should error out even when
auto_bootstrap = false (or the node is a seed) and tell the user
to use replace_address.
@jira_ticket CASSANDRA-10134
"""
self.fixture_dtest_setup.ignore_log_patterns = list(self.fixture_dtest_setup.ignore_log_patterns) + [
r'Exception encountered during startup']

self._setup(n=3)
self._insert_data()
node1, node2, node3 = self.cluster.nodelist()

mark = None
for auto_bootstrap in (True, False):
logger.debug("Stopping node 3.")
node3.stop(gently=False)

# completely delete the data, commitlog, and saved caches
for d in chain([os.path.join(node3.get_path(), "commitlogs")],
[os.path.join(node3.get_path(), "saved_caches")],
node3.data_directories()):
if os.path.exists(d):
rmtree(d)

node3.set_configuration_options(values={'auto_bootstrap': auto_bootstrap})
logger.debug("Starting node 3 with auto_bootstrap = {val}".format(val=auto_bootstrap))
node3.start(wait_other_notice=False)
> node3.watch_log_for('Use cassandra.replace_address if you want to replace this node', from_mark=mark, timeout=20)

replace_address_test.py:398:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/node.py:610: in watch_log_for
TimeoutError.raise_if_passed(start=start, timeout=timeout, node=self.name,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

start = 1734375653.587018, timeout = 20
msg = "Missing: ['Use cassandra.replace_address if you want to replace this node'] not found in system.log:\n Head: INFO [m...nINFO [main] 2024-12-16 19:01:12,523 FileSystemOwnershipCheck.java:125 - Filesystem ownership check is not enabled.\n"
node = 'node3'

@staticmethod
def raise_if_passed(start, timeout, msg, node=None):
if start + timeout < time.time():
> raise TimeoutError.create(start, timeout, msg, node)
E ccmlib.node.TimeoutError: 16 Dec 2024 19:01:13 [node3] after 20.03/20 seconds Missing: ['Use cassandra.replace_address if you want to replace this node'] not found in system.log:
E Head: INFO [main] 2024-12-16 18:58:05,099 YamlConfigura
E Tail: ...nitializing system_schema.indexes
E INFO [main] 2024-12-16 19:01:12,523 FileSystemOwnershipCheck.java:125 - Filesystem ownership check is not enabled.

../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/node.py:56: TimeoutError
238.862
8_cythonno_x86_64_10_64test_fail_when_seedFailureccmlib.node.TimeoutError: 16 Dec 2024 19:03:56 [node1] after 120.5/120 seconds Missing: ['Starting listening for CQL clients'] not found in system.log: Head: INFO [main] 2024-12-16 19:01:55,929 YamlConfigura Tail: ...e:1] 2024-12-16 19:03:55,568 FetchPeerLog.java:87 - Responding with log delta: LogState{baseState=none , entries=1: Epoch{epoch=4} -> Epoch{epoch=4}}

self = <replace_address_test.TestReplaceAddress object at 0x7fed1d4c46a0>

@since('3.0')
def test_fail_when_seed(self):
"""
When a node is a seed replace should fail
@jira_ticket CASSANDRA-14463
"""
self.fixture_dtest_setup.ignore_log_patterns = list(self.fixture_dtest_setup.ignore_log_patterns) + [
r'Couldn\'t find table with id 5bc52802-de25-35ed-aeab-188eecebb090', # system_auth
r'Exception encountered during startup',
r'Unknown endpoint'
]

# see CASSANDRA-17611
if self.cluster.version() < '4.0':
self.fixture_dtest_setup.ignore_log_patterns = list(self.fixture_dtest_setup.ignore_log_patterns) + [
r'RejectedExecutionException']

> self._setup(n=3)

replace_address_test.py:418:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
replace_address_test.py:76: in _setup
self.cluster.start(jvm_args=jvm_args)
../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/cluster.py:550: in start
node.watch_log_for(start_message, timeout=timeout, process=p, verbose=verbose, from_mark=mark,
../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/node.py:610: in watch_log_for
TimeoutError.raise_if_passed(start=start, timeout=timeout, node=self.name,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

start = 1734375716.0835092, timeout = 120
msg = "Missing: ['Starting listening for CQL clients'] not found in system.log:\n Head: INFO [main] 2024-12-16 19:01:55,929...hPeerLog.java:87 - Responding with log delta: LogState{baseState=none , entries=1: Epoch{epoch=4} -> Epoch{epoch=4}}\n"
node = 'node1'

@staticmethod
def raise_if_passed(start, timeout, msg, node=None):
if start + timeout < time.time():
> raise TimeoutError.create(start, timeout, msg, node)
E ccmlib.node.TimeoutError: 16 Dec 2024 19:03:56 [node1] after 120.5/120 seconds Missing: ['Starting listening for CQL clients'] not found in system.log:
E Head: INFO [main] 2024-12-16 19:01:55,929 YamlConfigura
E Tail: ...e:1] 2024-12-16 19:03:55,568 FetchPeerLog.java:87 - Responding with log delta: LogState{baseState=none , entries=1: Epoch{epoch=4} -> Epoch{epoch=4}}

../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/node.py:56: TimeoutError
152.084
8_cythonno_x86_64_10_64test_write_surveyFailureccmlib.node.NodeError: C* process with 13344 is terminated

self = <secondary_indexes_test.TestPreJoinCallback object at 0x7fed1d48b670>

def test_write_survey(self):
def write_survey_and_join(cluster, token):
node2 = new_node(cluster)
node2.set_configuration_options(values={'initial_token': token})
node2.start(jvm_args=["-Dcassandra.write_survey=true"], wait_for_binary_proto=True)
assert node2.grep_log('Startup complete, but write survey mode is active, not becoming an active ring member.')
assert not node2.grep_log('Executing pre-join')

node2.nodetool("join")
assert node2.grep_log('Leaving write survey mode and joining ring at operator request')
assert node2.grep_log('Executing pre-join post-bootstrap tasks')

> self._base_test(write_survey_and_join)

secondary_indexes_test.py:1287:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
secondary_indexes_test.py:1220: in _base_test
joinFn(cluster, tokens[1])
secondary_indexes_test.py:1279: in write_survey_and_join
node2.start(jvm_args=["-Dcassandra.write_survey=true"], wait_for_binary_proto=True)
../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 0x7fed15ef6ca0>

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 13344 is terminated

../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/node.py:692: NodeError
138.075
8_cythonno_x86_64_29_64test_ssl_wrong_hostname_with_validationFailureassert False

self = <sslnodetonode_test.TestNodeToNodeSSLEncryption object at 0x7f1e90fb35e0>

def test_ssl_wrong_hostname_with_validation(self):
"""Should be able to start with valid ssl options"""
credNode1 = sslkeygen.generate_credentials("127.0.0.80")
credNode2 = sslkeygen.generate_credentials("127.0.0.81", credNode1.cakeystore, credNode1.cacert)

self.setup_nodes(credNode1, credNode2, endpoint_verification=True)

self.fixture_dtest_setup.allow_log_errors = True
self.cluster.start(no_wait=True)

found = self._grep_msg(self.node1, _LOG_ERR_HANDSHAKE, _LOG_ERR_GENERAL)
> assert found
E assert False

sslnodetonode_test.py:64: AssertionError
82.041
8_cythonno_x86_64_58_64test_compaction_throughputFailureAssertionError: assert (5.0 + 0.5) >= 5.692 + where 5.0 = float('5')

self = <compaction_test.TestCompaction object at 0x7f77edb65520>

def test_compaction_throughput(self):
"""
Test setting compaction throughput.
Set throughput, insert data and ensure compaction performance corresponds.
"""
cluster = self.cluster
cluster.populate(1).start()
[node1] = cluster.nodelist()

# disableautocompaction only disables compaction for existing tables,
# so initialize stress tables with stress first
stress_write(node1, keycount=1)
node1.nodetool('disableautocompaction')

stress_write(node1, keycount=200000 * cluster.data_dir_count)

threshold = "5"
node1.nodetool('setcompactionthroughput -- ' + threshold)

node1.flush()
if node1.get_cassandra_version() < '2.2':
log_file = 'system.log'
else:
log_file = 'debug.log'
mark = node1.mark_log(filename=log_file)
node1.compact()
matches = node1.watch_log_for('Compacted', from_mark=mark, filename=log_file)

stringline = matches[0]

throughput_pattern = '{}={avgthroughput:f}{units}/s'
m = parse.search(throughput_pattern, stringline)
avgthroughput = m.named['avgthroughput']
found_units = m.named['units']

unit_conversion_dct = {
"MB": 1,
"MiB": 1,
"KiB": 1. / 1024,
"GiB": 1024,
"B": 1. / (1024 * 1024),
}

units = ['MB'] if cluster.version() < LooseVersion('3.6') else ['B', 'KiB', 'MiB', 'GiB']
assert found_units in units

logger.debug(avgthroughput)
avgthroughput_mb = unit_conversion_dct[found_units] * float(avgthroughput)

# The throughput in the log is computed independantly from the throttling and on the output files while
# throttling is on the input files, so while that throughput shouldn't be higher than the one set in
# principle, a bit of wiggle room is expected
> assert float(threshold) + 0.5 >= avgthroughput_mb
E AssertionError: assert (5.0 + 0.5) >= 5.692
E + where 5.0 = float('5')

compaction_test.py:302: AssertionError
99.021