You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by al...@apache.org on 2019/06/12 14:55:46 UTC

[cassandra-dtest] 03/04: Simplify cql_test.py::TestCQLSlowQuery::test_remote_query

This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git

commit 5372ed70e709d2599a35c4f82c9591ddcc7731f1
Author: Aleksey Yeschenko <al...@apple.com>
AuthorDate: Wed Mar 20 11:13:37 2019 +0000

    Simplify cql_test.py::TestCQLSlowQuery::test_remote_query
---
 cql_test.py | 19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)

diff --git a/cql_test.py b/cql_test.py
index f49e627..0f49561 100644
--- a/cql_test.py
+++ b/cql_test.py
@@ -1138,32 +1138,23 @@ class TestCQLSlowQuery(CQLTester):
         session.execute(SimpleStatement("SELECT * from test2",
                                         consistency_level=ConsistencyLevel.ONE,
                                         retry_policy=FallthroughRetryPolicy()))
-
         node2.watch_log_for(["operations were slow", "SELECT \* FROM ks.test2"],
                             from_mark=mark, filename='debug.log', timeout=60)
-        mark = node2.mark_log(filename='debug.log')
 
-        session.execute(SimpleStatement("SELECT * from test2 where id = 1",
-                                        consistency_level=ConsistencyLevel.ONE,
-                                        retry_policy=FallthroughRetryPolicy()))
 
-        node2.watch_log_for(["operations were slow", "SELECT \* FROM ks.test2"],
-                            from_mark=mark, filename='debug.log', timeout=60)
         mark = node2.mark_log(filename='debug.log')
-
         session.execute(SimpleStatement("SELECT * from test2 where id = 1",
                                         consistency_level=ConsistencyLevel.ONE,
                                         retry_policy=FallthroughRetryPolicy()))
-
-        node2.watch_log_for(["operations were slow", "SELECT \* FROM ks.test2"],
+        node2.watch_log_for(["operations were slow", "SELECT \* FROM ks.test2 WHERE id = 1"],
                             from_mark=mark, filename='debug.log', timeout=60)
-        mark = node2.mark_log(filename='debug.log')
 
-        session.execute(SimpleStatement("SELECT * from test2 where token(id) < 0",
+
+        mark = node2.mark_log(filename='debug.log')
+        session.execute(SimpleStatement("SELECT * from test2 where token(id) <= 0",
                                         consistency_level=ConsistencyLevel.ONE,
                                         retry_policy=FallthroughRetryPolicy()))
-
-        node2.watch_log_for(["operations were slow", "SELECT \* FROM ks.test2"],
+        node2.watch_log_for(["operations were slow", "SELECT \* FROM ks.test2 WHERE token\(id\) <= 0"],
                             from_mark=mark, filename='debug.log', timeout=60)
 
     def test_disable_slow_query_log(self):


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org