Class | Name | Status | Type | Time(s) |
8_cythonno_x86_64_49_64 | test_rename_column_atomicity | Failure | cassandra.OperationTimedOut: errors={'127.0.0.1:9042': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1:9042
self = <materialized_views_test.TestMaterializedViews object at 0x7f8937b71940>
def test_rename_column_atomicity(self):
"""
Test that column renaming is atomically done between a table and its materialized views
@jira_ticket CASSANDRA-12952
"""
session = self.prepare(nodes=1, user_table=True, install_byteman=True)
node = self.cluster.nodelist()[0]
self._insert_data(session)
assert_one(
session,
"SELECT * FROM users_by_state WHERE state = 'TX' AND username = 'user1'",
['TX', 'user1', 1968, 'f', 'ch@ngem3a', None]
)
# Rename a column with an injected byteman rule to kill the node after the first schema update
self.fixture_dtest_setup.allow_log_errors = True
script_version = '5_1' if self.cluster.version() >= LooseVersion('5.1') else '4x' if self.cluster.version() >= '4' else '3x'
node.byteman_submit([mk_bman_path('merge_schema_failure_{}.btm'.format(script_version))])
with pytest.raises(NoHostAvailable):
> session.execute("ALTER TABLE users RENAME username TO user")
materialized_views_test.py:994:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../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="ALTER TABLE users RENAME username TO user", consistency=Not Set>' requ...9042': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1: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.1:9042': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1:9042
../cassandra/build/venv/src/cassandra-driver/cassandra/cluster.py:4894: OperationTimedOut | 27.725 |
8_cythonno_x86_64_28_64 | test_tracing_unknown_impl | Failure | ccmlib.node.ToolError: Subprocess ['cqlsh', "CONSISTENCY ALL; TRACING ON; INSERT INTO ks.users (userid, firstname, lastname, age) VALUES (550e8400-e29b-41d4-a716-446655440000, 'Frodo', 'Baggins', 32)", ['--request-timeout', '30']] exited with non-zero status; exit status: 2;
stdout: Consistency level set to ALL.
TRACING set to ON
;
stderr: <stdin>:4:WriteTimeout: Error from server: code=1100 [Coordinator node timed out waiting for replica nodes' responses] message="Operation timed out - received only 2 responses." info={'consistency': 'ALL', 'required_responses': 3, 'received_responses': 2, 'write_type': 'SIMPLE'}
self = <cql_tracing_test.TestCqlTracing object at 0x7f604c2064c0>
@since('3.4')
def test_tracing_unknown_impl(self):
"""
Test that Cassandra logs an error, but keeps its default tracing
behavior, when a nonexistent tracing class is specified.
* set a nonexistent custom tracing class
* run trace()
* if running the test on a version with custom tracing classes
implemented, check that an error about the nonexistent class was
logged.
@jira_ticket CASSANDRA-10392
"""
expected_error = 'Cannot use class junk for tracing'
self.fixture_dtest_setup.ignore_log_patterns = [expected_error]
session = self.prepare(jvm_args=['-Dcassandra.custom_tracing_class=junk'])
> self.trace(session)
cql_tracing_test.py:140:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cql_tracing_test.py:82: in trace
out, err, _ = node1.run_cqlsh(
../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/node.py:1122: in run_cqlsh
return handle_external_tool_process(p, ['cqlsh', cmds, cqlsh_options])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
process = <subprocess.Popen object at 0x7f604b4ce5e0>
cmd_args = ['cqlsh', "CONSISTENCY ALL; TRACING ON; INSERT INTO ks.users (userid, firstname, lastname, age) VALUES (550e8400-e29b-41d4-a716-446655440000, 'Frodo', 'Baggins', 32)", ['--request-timeout', '30']]
def handle_external_tool_process(process, cmd_args):
out, err = process.communicate()
if (out is not None) and isinstance(out, bytes):
out = out.decode()
if (err is not None) and isinstance(err, bytes):
err = err.decode()
rc = process.returncode
if rc != 0:
> raise ToolError(cmd_args, rc, out, err)
E ccmlib.node.ToolError: Subprocess ['cqlsh', "CONSISTENCY ALL; TRACING ON; INSERT INTO ks.users (userid, firstname, lastname, age) VALUES (550e8400-e29b-41d4-a716-446655440000, 'Frodo', 'Baggins', 32)", ['--request-timeout', '30']] exited with non-zero status; exit status: 2;
E stdout: Consistency level set to ALL.
E TRACING set to ON
E ;
E stderr: <stdin>:4:WriteTimeout: Error from server: code=1100 [Coordinator node timed out waiting for replica nodes' responses] message="Operation timed out - received only 2 responses." info={'consistency': 'ALL', 'required_responses': 3, 'received_responses': 2, 'write_type': 'SIMPLE'}
../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/node.py:2333: ToolError | 46.271 |
8_cythonno_x86_64_49_64 | test_rename_column_atomicity | Failure | cassandra.OperationTimedOut: errors={'127.0.0.1:9042': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1:9042
self = <materialized_views_test.TestMaterializedViews object at 0x7fca773e7940>
def test_rename_column_atomicity(self):
"""
Test that column renaming is atomically done between a table and its materialized views
@jira_ticket CASSANDRA-12952
"""
session = self.prepare(nodes=1, user_table=True, install_byteman=True)
node = self.cluster.nodelist()[0]
self._insert_data(session)
assert_one(
session,
"SELECT * FROM users_by_state WHERE state = 'TX' AND username = 'user1'",
['TX', 'user1', 1968, 'f', 'ch@ngem3a', None]
)
# Rename a column with an injected byteman rule to kill the node after the first schema update
self.fixture_dtest_setup.allow_log_errors = True
script_version = '5_1' if self.cluster.version() >= LooseVersion('5.1') else '4x' if self.cluster.version() >= '4' else '3x'
node.byteman_submit([mk_bman_path('merge_schema_failure_{}.btm'.format(script_version))])
with pytest.raises(NoHostAvailable):
> session.execute("ALTER TABLE users RENAME username TO user")
materialized_views_test.py:994:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../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="ALTER TABLE users RENAME username TO user", consistency=Not Set>' requ...9042': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1: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.1:9042': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1:9042
../cassandra/build/venv/src/cassandra-driver/cassandra/cluster.py:4894: OperationTimedOut | 24.765 |