Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mambocab/58955790567d628f20bf to your computer and use it in GitHub Desktop.
Save mambocab/58955790567d628f20bf to your computer and use it in GitHub Desktop.
def test_test(self):
self.prepare()
self.node2.stop()
self.cursor1.execute("""
INSERT INTO ttl_table (key, col1) VALUES (1, 1);
""")
self.cursor1.execute("""
INSERT INTO ttl_table (key, col1) VALUES (2, 2);
""")
assert_all(
self.cursor1,
"SELECT * FROM ttl_table;",
[[1, 1, None, None], [2, 2, None, None]]
)
time.sleep(7)
assert_all(
self.cursor1,
"SELECT * FROM ttl_table;",
[[1, 1, None, None], [2, 2, None, None]]
)
self.node1.stop()
self.node1.start(wait_for_binary_proto=True)
self.cursor1 = self.patient_exclusive_cql_connection(self.node1)
self.cursor1.execute("USE ks;")
assert_all(
self.cursor1,
"SELECT * FROM ttl_table;",
[[1, 1, None, None],[2, 2, None, None]]
)
======================================================================
FAIL: ttl_test.py:TestDistributedTTL.test_test
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/mambocab/cstar_src/cassandra-dtest/ttl_test.py", line 358, in test_test
[[1, 1, None, None], [2, 2, None, None]]
File "/home/mambocab/cstar_src/cassandra-dtest/assertions.py", line 46, in assert_all
assert list_res == expected, "Expected %s from %s, but got %s" % (expected, query, list_res)
AssertionError: Expected [[1, 1, None, None], [2, 2, None, None]] from SELECT * FROM ttl_table;, but got []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment