Skip to content

Instantly share code, notes, and snippets.

@aboudreault
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save aboudreault/94cb552750a186ca853d to your computer and use it in GitHub Desktop.
Save aboudreault/94cb552750a186ca853d 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;")
# FAILS HERE
assert_all(
self.cursor1,
"SELECT * FROM ttl_table;",
[[1, 1, None, None],[2, 2, None, None]]
)
# AssertionError: Expected [[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