Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove error test already covered by unit tests for CASSANDRA-19341 #259

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions cql_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1219,14 +1219,23 @@ def _assert_logs_slow_queries_with_skinny_table(node, session):
TestCQLSlowQuery._assert_logs(node, session, table,
query="SELECT * FROM {} WHERE k >= 0 AND k < 100 ALLOW FILTERING",
logged_query="SELECT \* FROM ks.{} WHERE k >= 0 AND k < 100")
TestCQLSlowQuery._assert_logs(node, session, table,
query="SELECT * FROM {} WHERE k <= 100 AND k > 0 ALLOW FILTERING",
logged_query="SELECT \* FROM ks.{} WHERE k > 0 AND k <= 100")
TestCQLSlowQuery._assert_logs(node, session, table,
query="SELECT * FROM {} WHERE k < 100 AND k >= 0 ALLOW FILTERING",
logged_query="SELECT \* FROM ks.{} WHERE k >= 0 AND k < 100")
blerer marked this conversation as resolved.
Show resolved Hide resolved
blerer marked this conversation as resolved.
Show resolved Hide resolved

# test logging of slow queries with restriciton on regular column
if node.cluster.version() >= '5.1':
TestCQLSlowQuery._assert_logs(node, session, table,
query="SELECT * FROM {} WHERE k <= 100 AND k > 0 ALLOW FILTERING",
logged_query="SELECT \* FROM ks.{} WHERE k <= 100 AND k > 0")
TestCQLSlowQuery._assert_logs(node, session, table,
query="SELECT * FROM {} WHERE k < 100 AND k >= 0 ALLOW FILTERING",
logged_query="SELECT \* FROM ks.{} WHERE k < 100 AND k >= 0")
else:
TestCQLSlowQuery._assert_logs(node, session, table,
query="SELECT * FROM {} WHERE k <= 100 AND k > 0 ALLOW FILTERING",
logged_query="SELECT \* FROM ks.{} WHERE k > 0 AND k <= 100")
TestCQLSlowQuery._assert_logs(node, session, table,
query="SELECT * FROM {} WHERE k < 100 AND k >= 0 ALLOW FILTERING",
logged_query="SELECT \* FROM ks.{} WHERE k >= 0 AND k < 100")

# test logging of slow queries with restriction on regular column
TestCQLSlowQuery._assert_logs(node, session, table,
query="SELECT * FROM {} WHERE v = 1 ALLOW FILTERING",
logged_query="SELECT \* FROM ks.{} WHERE v = 1")
Expand Down
4 changes: 1 addition & 3 deletions json_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1238,10 +1238,10 @@ def test_simple_schema(self):
"""
run_func_docstring(tester=self, test_func=self.test_simple_schema)

@since("2.0", max_version="5.0")
def test_pkey_requirement(self):
blerer marked this conversation as resolved.
Show resolved Hide resolved
"""
Create schema:

>>> cqlsh('''
... CREATE TABLE primitive_type_test (
... key1 text PRIMARY KEY,
Expand All @@ -1261,9 +1261,7 @@ def test_pkey_requirement(self):
... col14 varint,
... col15 boolean)
... ''')

Try to create a JSON row with the pkey omitted from the column list, and omitted from the JSON data:

>>> cqlsh_err_print('''INSERT INTO primitive_type_test JSON '{"col1": "bar"}' ''')
<stdin>:2:InvalidRequest: Error from server: code=2200 [Invalid query] message="Invalid null value in condition for column key1"
<BLANKLINE>
Expand Down