{"action":"created","comment":{"url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/comments/22607634","id":22607634,"diff_hunk":"@@ -0,0 +1,473 @@\n+import time\n+from collections import OrderedDict\n+from cassandra.util import sortedset\n+from cassandra.query import SimpleStatement\n+from cassandra import ConsistencyLevel\n+from dtest import Tester\n+from pytools import since\n+from pyassertions import (\n+    assert_all,\n+    assert_row_count,\n+    assert_almost_equal,\n+    assert_unavailable\n+)\n+\n+\n+class TestTTL(Tester):\n+    \"\"\" Test Time To Live Feature \"\"\"\n+\n+    def setUp(self):\n+        super(TestTTL, self).setUp()\n+        self.cluster.populate(1).start()\n+        [node1] = self.cluster.nodelist()\n+        self.cursor1 = self.patient_cql_connection(node1)\n+        self.create_ks(self.cursor1, 'ks', 1)\n+\n+    def prepare(self, default_time_to_live=None):\n+        self.cursor1.execute(\"DROP TABLE IF EXISTS ttl_table;\")\n+        query = \"\"\"\n+            CREATE TABLE ttl_table (\n+                key int primary key,\n+                col1 int,\n+                col2 int,\n+                col3 int,\n+            )\n+        \"\"\"\n+        if default_time_to_live:\n+            query += \" WITH default_time_to_live = {};\".format(default_time_to_live)\n+\n+        self.cursor1.execute(query)\n+\n+    def smart_sleep(self, start_time, time_to_wait):\n+        \"\"\" Function that sleep smartly based on the start_time.\n+            Useful when tests are slower than expected.\n+\n+            start_time: The start time of the timed operations\n+            time_to_wait: The time to wait in seconds from the start_time\n+        \"\"\"\n+\n+        now = time.time()\n+        real_time_to_wait = time_to_wait - (now - start_time)\n+\n+        if real_time_to_wait > 0:\n+            time.sleep(real_time_to_wait)\n+\n+    @since('2.0')\n+    def default_ttl_test(self):\n+        \"\"\" Test default_time_to_live specified on a table \"\"\"\n+\n+        self.prepare(default_time_to_live=1)\n+        start = time.time()\n+        self.cursor1.execute(\"INSERT INTO ttl_table (key, col1) VALUES (%d, %d)\" % (1, 1))\n+        self.cursor1.execute(\"INSERT INTO ttl_table (key, col1) VALUES (%d, %d)\" % (2, 2))\n+        self.cursor1.execute(\"INSERT INTO ttl_table (key, col1) VALUES (%d, %d)\" % (3, 3))\n+        self.smart_sleep(start, 1.5)\n+        assert_row_count(self.cursor1, 'ttl_table', 0)\n+\n+    @since('2.0')\n+    def insert_ttl_has_priority_on_defaut_ttl_test(self):\n+        \"\"\" Test that a ttl specified during an insert has priority on the default table ttl \"\"\"\n+\n+        self.prepare(default_time_to_live=1)\n+\n+        start = time.time()\n+        self.cursor1.execute(\"\"\"\n+            INSERT INTO ttl_table (key, col1) VALUES (%d, %d) USING TTL 3;\n+        \"\"\" % (1, 1))\n+        self.smart_sleep(start, 1)\n+        assert_row_count(self.cursor1, 'ttl_table', 1)  # should still exist\n+        self.smart_sleep(start, 3.5)\n+        assert_row_count(self.cursor1, 'ttl_table', 0)\n+\n+    @since('2.0')\n+    def insert_ttl_works_without_defaut_ttl_test(self):\n+        \"\"\" Test that a ttl specified during an insert works even if a table has no default ttl \"\"\"\n+\n+        self.prepare()\n+\n+        start = time.time()\n+        self.cursor1.execute(\"\"\"\n+            INSERT INTO ttl_table (key, col1) VALUES (%d, %d) USING TTL 1;\n+        \"\"\" % (1, 1))\n+        self.smart_sleep(start, 1.5)\n+        assert_row_count(self.cursor1, 'ttl_table', 0)\n+\n+    @since('2.0')\n+    def default_ttl_can_be_removed_test(self):\n+        \"\"\" Test that default_time_to_live can be removed \"\"\"\n+\n+        self.prepare(default_time_to_live=1)\n+\n+        start = time.time()\n+        self.cursor1.execute(\"ALTER TABLE ttl_table WITH default_time_to_live = 0;\")\n+        self.cursor1.execute(\"\"\"\n+            INSERT INTO ttl_table (key, col1) VALUES (%d, %d);\n+        \"\"\" % (1, 1))\n+        self.smart_sleep(start, 1.5)\n+        assert_row_count(self.cursor1, 'ttl_table', 1)\n+\n+    @since('2.0')\n+    def removing_default_ttl_does_not_affect_existing_rows_test(self):\n+        \"\"\" Test that removing a default_time_to_live doesn't affect the existings rows \"\"\"\n+\n+        self.prepare(default_time_to_live=1)\n+\n+        self.cursor1.execute(\"ALTER TABLE ttl_table WITH default_time_to_live = 3;\")\n+        start = time.time()\n+        self.cursor1.execute(\"\"\"\n+            INSERT INTO ttl_table (key, col1) VALUES (%d, %d);\n+        \"\"\" % (1, 1))\n+        self.cursor1.execute(\"\"\"\n+            INSERT INTO ttl_table (key, col1) VALUES (%d, %d) USING TTL 5;\n+        \"\"\" % (2, 1))\n+        self.cursor1.execute(\"ALTER TABLE ttl_table WITH default_time_to_live = 0;\")\n+        self.cursor1.execute(\"INSERT INTO ttl_table (key, col1) VALUES (%d, %d);\" % (3, 1))\n+        self.smart_sleep(start, 1)\n+        assert_row_count(self.cursor1, 'ttl_table', 3)\n+        self.smart_sleep(start, 3.5)\n+        assert_row_count(self.cursor1, 'ttl_table', 2)\n+        self.smart_sleep(start, 5.5)\n+        assert_row_count(self.cursor1, 'ttl_table', 1)\n+\n+    @since('2.0')\n+    def update_single_column_ttl_test(self):\n+        \"\"\" Test that specifying a TTL on a single column works \"\"\"\n+\n+        self.prepare()\n+\n+        self.cursor1.execute(\"\"\"\n+            INSERT INTO ttl_table (key, col1, col2, col3) VALUES (%d, %d, %d, %d);\n+        \"\"\"  % (1, 1, 1, 1))\n+        start = time.time()\n+        self.cursor1.execute(\"UPDATE ttl_table USING TTL 2 set col1=42 where key=%s;\" % (1,))\n+        assert_all(self.cursor1, \"SELECT * FROM ttl_table;\", [[1, 42, 1, 1]])\n+        self.smart_sleep(start, 2.5)\n+        assert_all(self.cursor1, \"SELECT * FROM ttl_table;\", [[1, None, 1, 1]])\n+\n+    @since('2.0')\n+    def update_multiple_columns_ttl_test(self):\n+        \"\"\" Test that specifying a TTL on multiple columns works \"\"\"\n+\n+        self.prepare()\n+\n+        self.cursor1.execute(\"\"\"\n+            INSERT INTO ttl_table (key, col1, col2, col3) VALUES (%d, %d, %d, %d);\n+        \"\"\"  % (1, 1, 1, 1))\n+        start = time.time()\n+        self.cursor1.execute(\"\"\"\n+            UPDATE ttl_table USING TTL 2 set col1=42, col2=42, col3=42 where key=%s;\n+        \"\"\" % (1,))\n+        assert_all(self.cursor1, \"SELECT * FROM ttl_table;\", [[1, 42, 42, 42]])\n+        self.smart_sleep(start, 2.5)\n+        assert_all(self.cursor1, \"SELECT * FROM ttl_table;\", [[1, None, None, None]])\n+\n+    @since('2.0')\n+    def update_column_ttl_with_default_ttl_test(self):\n+        \"\"\"\n+        Test that specifying a column ttl works when a default ttl is set.\n+        This test specify a lower ttl for the column than the default ttl.\n+        \"\"\"\n+\n+        self.prepare(default_time_to_live=4)\n+\n+        start = time.time()\n+        self.cursor1.execute(\"\"\"\n+            INSERT INTO ttl_table (key, col1, col2, col3) VALUES (%d, %d, %d, %d);\n+        \"\"\"  % (1, 1, 1, 1))\n+        self.cursor1.execute(\"UPDATE ttl_table USING TTL 2 set col1=42 where key=%s;\" % (1,))\n+        assert_all(self.cursor1, \"SELECT * FROM ttl_table;\", [[1, 42, 1, 1]])\n+        self.smart_sleep(start, 2.5)\n+        assert_all(self.cursor1, \"SELECT * FROM ttl_table;\", [[1, None, 1, 1]])\n+        self.smart_sleep(start, 4.5)\n+        assert_row_count(self.cursor1, 'ttl_table', 0)\n+\n+    @since('2.0')\n+    def update_column_ttl_with_default_ttl_test2(self):\n+        \"\"\"\n+        Test that specifying a column ttl works when a default ttl is set.\n+        This test specify a higher column ttl than the default ttl.\n+        \"\"\"\n+\n+        self.prepare(default_time_to_live=2)\n+\n+        start = time.time()\n+        self.cursor1.execute(\"\"\"\n+            INSERT INTO ttl_table (key, col1, col2, col3) VALUES (%d, %d, %d, %d);\n+        \"\"\"  % (1, 1, 1, 1))\n+        self.cursor1.execute(\"UPDATE ttl_table USING TTL 4 set col1=42 where key=%s;\" % (1,))\n+        self.smart_sleep(start, 2.5)\n+        assert_all(self.cursor1, \"SELECT * FROM ttl_table;\", [[1, 42, None, None]])\n+        self.smart_sleep(start, 4.5)\n+        assert_row_count(self.cursor1, 'ttl_table', 0)\n+\n+    @since('2.0')\n+    def remove_column_ttl_test(self):\n+        \"\"\"\n+        Test that removing a column ttl works.\n+        \"\"\"\n+\n+        self.prepare()\n+\n+        start = time.time()\n+        self.cursor1.execute(\"\"\"\n+            INSERT INTO ttl_table (key, col1, col2, col3) VALUES (%d, %d, %d, %d) USING TTL 2;\n+        \"\"\"  % (1, 1, 1, 1))\n+        self.cursor1.execute(\"UPDATE ttl_table set col1=42 where key=%s;\" % (1,))\n+        self.smart_sleep(start, 2.5)\n+        assert_all(self.cursor1, \"SELECT * FROM ttl_table;\", [[1, 42, None, None]])\n+\n+    @since('2.0')\n+    def remove_column_ttl_with_default_ttl_test(self):\n+        \"\"\"\n+        Test that we cannot remove a column ttl when a default ttl is set.\n+        \"\"\"\n+\n+        self.prepare(default_time_to_live=2)\n+\n+        start = time.time()\n+        self.cursor1.execute(\"\"\"\n+            INSERT INTO ttl_table (key, col1, col2, col3) VALUES (%d, %d, %d, %d);\n+        \"\"\"  % (1, 1, 1, 1))\n+        self.cursor1.execute(\"\"\"\n+            INSERT INTO ttl_table (key, col1, col2, col3) VALUES (%d, %d, %d, %d);\n+        \"\"\"  % (2, 1, 1, 1))\n+        self.cursor1.execute(\"UPDATE ttl_table using ttl 0 set col1=42 where key=%s;\" % (1,))\n+        self.cursor1.execute(\"UPDATE ttl_table using ttl 4 set col1=42 where key=%s;\" % (2,))\n+        self.smart_sleep(start, 2.5)\n+        # The first row should be deleted, using ttl 0 should fallback to default_time_to_live\n+        assert_all(self.cursor1, \"SELECT * FROM ttl_table;\", [[2, 42, None, None]])\n+        self.smart_sleep(start, 4.5)\n+        assert_row_count(self.cursor1, 'ttl_table', 0)\n+\n+    @since('2.0')\n+    def collection_list_ttl_test(self):\n+        \"\"\"\n+        Test that ttl has a granularity of elements using a list collection.\n+        \"\"\"\n+\n+        self.prepare(default_time_to_live=5)\n+\n+        self.cursor1.execute(\"ALTER TABLE ttl_table ADD mylist list<int>;\"\"\")\n+        start = time.time()\n+        self.cursor1.execute(\"\"\"\n+            INSERT INTO ttl_table (key, col1, mylist) VALUES (%d, %d, %s);\n+        \"\"\"  % (1, 1, [1, 2, 3, 4, 5]))\n+        self.cursor1.execute(\"\"\"\n+            UPDATE ttl_table USING TTL 2 SET mylist[0] = 42, mylist[4] = 42 WHERE key=1;\n+        \"\"\")\n+        assert_all(self.cursor1, \"SELECT * FROM ttl_table;\", [[1, 1, None, None, [42, 2, 3, 4, 42]]])\n+        self.smart_sleep(start, 3)\n+        assert_all(self.cursor1, \"SELECT * FROM ttl_table;\", [[1, 1, None, None, [2, 3, 4]]])\n+        self.smart_sleep(start, 5.5)\n+        assert_row_count(self.cursor1, 'ttl_table', 0)\n+\n+    @since('2.0')\n+    def collection_set_ttl_test(self):\n+        \"\"\"\n+        Test that ttl has a granularity of elements using a set collection.\n+        \"\"\"\n+\n+        self.prepare(default_time_to_live=5)\n+\n+        self.cursor1.execute(\"ALTER TABLE ttl_table ADD myset set<int>;\"\"\")\n+        start = time.time()\n+        self.cursor1.execute(\"\"\"\n+            INSERT INTO ttl_table (key, col1, myset) VALUES (%d, %d, %s);\n+        \"\"\"  % (1, 1, '{1,2,3,4,5}'))\n+        self.cursor1.execute(\"\"\"\n+            UPDATE ttl_table USING TTL 2 SET myset = myset + {42} WHERE key=1;\n+        \"\"\")\n+        assert_all(\n+            self.cursor1,\n+            \"SELECT * FROM ttl_table;\",\n+            [[1, 1, None, None, sortedset([1, 2, 3, 4, 5, 42])]]\n+        )\n+        self.smart_sleep(start, 3)\n+        assert_all(\n+            self.cursor1,\n+            \"SELECT * FROM ttl_table;\",\n+            [[1, 1, None, None, sortedset([1, 2, 3, 4, 5])]]\n+        )\n+        self.smart_sleep(start, 5.5)\n+        assert_row_count(self.cursor1, 'ttl_table', 0)\n+\n+    @since('2.0')\n+    def collection_map_ttl_test(self):\n+        \"\"\"\n+        Test that ttl has a granularity of elements using a map collection.\n+        \"\"\"\n+\n+        self.prepare(default_time_to_live=5)\n+\n+        self.cursor1.execute(\"ALTER TABLE ttl_table ADD mymap map<int, int>;\"\"\")\n+        start = time.time()\n+        self.cursor1.execute(\"\"\"\n+            INSERT INTO ttl_table (key, col1, mymap) VALUES (%d, %d, %s);\n+        \"\"\"  % (1, 1, '{1:1,2:2,3:3,4:4,5:5}'))\n+        self.cursor1.execute(\"\"\"\n+            UPDATE ttl_table USING TTL 2 SET mymap[1] = 42, mymap[5] = 42 WHERE key=1;\n+        \"\"\")\n+        assert_all(\n+            self.cursor1,\n+            \"SELECT * FROM ttl_table;\",\n+            [[1, 1, None, None, OrderedDict([(1, 42), (2, 2), (3, 3), (4, 4), (5, 42)])]]\n+        )\n+        self.smart_sleep(start, 3)\n+        assert_all(\n+            self.cursor1,\n+            \"SELECT * FROM ttl_table;\",\n+            [[1, 1, None, None, OrderedDict([(2, 2), (3, 3), (4, 4)])]]\n+        )\n+        self.smart_sleep(start, 5.5)\n+        assert_row_count(self.cursor1, 'ttl_table', 0)\n+\n+\n+class TestDistributedTTL(Tester):\n+    \"\"\" Test Time To Live Feature in a distributed environment \"\"\"\n+\n+    def setUp(self):\n+        super(TestDistributedTTL, self).setUp()\n+        self.cluster.populate(2).start()\n+        [self.node1, self.node2] = self.cluster.nodelist()\n+        self.cursor1 = self.patient_cql_connection(self.node1)\n+        self.create_ks(self.cursor1, 'ks', 2)\n+\n+    def prepare(self, default_time_to_live=None):\n+        self.cursor1.execute(\"DROP TABLE IF EXISTS ttl_table;\")\n+        query = \"\"\"\n+            CREATE TABLE ttl_table (\n+                key int primary key,\n+                col1 int,\n+                col2 int,\n+                col3 int,\n+            )\n+        \"\"\"\n+        if default_time_to_live:\n+            query += \" WITH default_time_to_live = {};\".format(default_time_to_live)\n+\n+        self.cursor1.execute(query)\n+\n+    def ttl_is_replicated_test(self):\n+        \"\"\"\n+        Test that the ttl setting is replicated properly on all nodes\n+        \"\"\"\n+\n+        self.prepare(default_time_to_live=3)\n+        cursor2 = self.patient_cql_connection(self.node2)\n+        cursor2.execute(\"USE ks;\")\n+        query = SimpleStatement(\n+            \"INSERT INTO ttl_table (key, col1) VALUES (1, 1);\",\n+            consistency_level=ConsistencyLevel.ALL\n+        )\n+        self.cursor1.execute(query)\n+        assert_all(\n+            self.cursor1,\n+            \"SELECT * FROM ttl_table;\",\n+            [[1, 1, None, None]],\n+            cl=ConsistencyLevel.ALL\n+        )\n+        ttl_cursor1 = self.cursor1.execute('SELECT ttl(col1) FROM ttl_table;')\n+        ttl_cursor2 = cursor2.execute('SELECT ttl(col1) FROM ttl_table;')\n+        assert_almost_equal(ttl_cursor1[0][0], ttl_cursor2[0][0], error=0.05)\n+\n+        time.sleep(3.5)\n+\n+        assert_all(\n+            self.cursor1,\n+            \"SELECT * FROM ttl_table;\",\n+            [],\n+            cl=ConsistencyLevel.ALL\n+        )\n+\n+\n+    def ttl_is_respected_on_delayed_replication_test(self):\n+        \"\"\" Test that ttl is respected on delayed replication \"\"\"\n+\n+        self.prepare()\n+        self.node2.stop()\n+        self.cursor1.execute(\"\"\"\n+            INSERT INTO ttl_table (key, col1) VALUES (1, 1) USING TTL 3;\n+        \"\"\")\n+        self.cursor1.execute(\"\"\"\n+            INSERT INTO ttl_table (key, col1) VALUES (2, 2) USING TTL 60;\n+        \"\"\")\n+        assert_all(\n+            self.cursor1,\n+            \"SELECT * FROM ttl_table;\",\n+            [[1, 1, None, None], [2, 2, None, None]]\n+        )\n+        time.sleep(3.5)\n+        self.node1.stop()\n+        self.node2.start()\n+        self.node2.watch_log_for(\"Listening for thrift clients...\")\n+        cursor2 = self.patient_cql_connection(self.node2)\n+        cursor2.execute(\"USE ks;\")\n+        assert_row_count(cursor2, 'ttl_table', 0)  # should be 0 since node1 is down, no replica yet\n+        self.node1.start()\n+        self.node1.watch_log_for(\"Listening for thrift clients...\")\n+        self.cursor1 = self.patient_cql_connection(self.node1)\n+        self.cursor1.execute(\"USE ks;\")\n+        self.node1.cleanup()\n+\n+        # Check that the expired data has not been replicated\n+        assert_row_count(cursor2, 'ttl_table', 1)\n+        assert_all(\n+            cursor2,\n+            \"SELECT * FROM ttl_table;\",\n+            [[2, 2, None, None]],\n+            cl=ConsistencyLevel.ALL\n+        )\n+\n+        # Check that the TTL on both server are the same\n+        ttl_cursor1 = self.cursor1.execute('SELECT ttl(col1) FROM ttl_table;')\n+        ttl_cursor2 = cursor2.execute('SELECT ttl(col1) FROM ttl_table;')\n+        assert_almost_equal(ttl_cursor1[0][0], ttl_cursor2[0][0], error=0.05)\n+\n+    def ttl_is_respected_on_repair_test(self):\n+        \"\"\" Test that ttl is respected on repair \"\"\"\n+\n+        self.prepare()\n+        self.cursor1.execute(\"\"\"\n+            ALTER KEYSPACE ks WITH REPLICATION =\n+            {'class' : 'SimpleStrategy', 'replication_factor' : 1};\n+        \"\"\")\n+        self.cursor1.execute(\"\"\"\n+            INSERT INTO ttl_table (key, col1) VALUES (1, 1) USING TTL 3;\n+        \"\"\")\n+        self.cursor1.execute(\"\"\"\n+            INSERT INTO ttl_table (key, col1) VALUES (2, 2) USING TTL 1000;\n+        \"\"\")\n+        assert_all(\n+            self.cursor1,\n+            \"SELECT * FROM ttl_table;\",\n+            [[1, 1, None, None], [2, 2, None, None]]\n+        )\n+        time.sleep(3.5)\n+        self.node1.stop()\n+        cursor2 = self.patient_cql_connection(self.node2)\n+        cursor2.execute(\"USE ks;\")\n+        assert_unavailable(cursor2.execute, \"SELECT * FROM ttl_table;\")","path":"ttl_test.py","position":449,"original_position":449,"commit_id":"4a5e090ceb5345fc6f650859f513d3d88499eeab","original_commit_id":"4a5e090ceb5345fc6f650859f513d3d88499eeab","user":{"login":"ptnapoleon","id":3408144,"avatar_url":"https://avatars.githubusercontent.com/u/3408144?v=3","gravatar_id":"","url":"https://api.github.com/users/ptnapoleon","html_url":"https://github.com/ptnapoleon","followers_url":"https://api.github.com/users/ptnapoleon/followers","following_url":"https://api.github.com/users/ptnapoleon/following{/other_user}","gists_url":"https://api.github.com/users/ptnapoleon/gists{/gist_id}","starred_url":"https://api.github.com/users/ptnapoleon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptnapoleon/subscriptions","organizations_url":"https://api.github.com/users/ptnapoleon/orgs","repos_url":"https://api.github.com/users/ptnapoleon/repos","events_url":"https://api.github.com/users/ptnapoleon/events{/privacy}","received_events_url":"https://api.github.com/users/ptnapoleon/received_events","type":"User","site_admin":false},"body":"Well it would be deterministic which node those rows belong to (ignoring ccm changes to default tokens), but what it really seems you're checking for is that the data isn't there, not that the query returns unavailable.","created_at":"2015-01-07T19:10:44Z","updated_at":"2015-01-07T19:10:44Z","html_url":"https://github.com/riptano/cassandra-dtest/pull/134#discussion_r22607634","pull_request_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/134","_links":{"self":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/comments/22607634"},"html":{"href":"https://github.com/riptano/cassandra-dtest/pull/134#discussion_r22607634"},"pull_request":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/134"}}},"pull_request":{"url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/134","id":25640060,"html_url":"https://github.com/riptano/cassandra-dtest/pull/134","diff_url":"https://github.com/riptano/cassandra-dtest/pull/134.diff","patch_url":"https://github.com/riptano/cassandra-dtest/pull/134.patch","issue_url":"https://api.github.com/repos/riptano/cassandra-dtest/issues/134","number":134,"state":"open","locked":false,"title":"Add tests for TTL feature","user":{"login":"aboudreault","id":532356,"avatar_url":"https://avatars.githubusercontent.com/u/532356?v=3","gravatar_id":"","url":"https://api.github.com/users/aboudreault","html_url":"https://github.com/aboudreault","followers_url":"https://api.github.com/users/aboudreault/followers","following_url":"https://api.github.com/users/aboudreault/following{/other_user}","gists_url":"https://api.github.com/users/aboudreault/gists{/gist_id}","starred_url":"https://api.github.com/users/aboudreault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aboudreault/subscriptions","organizations_url":"https://api.github.com/users/aboudreault/orgs","repos_url":"https://api.github.com/users/aboudreault/repos","events_url":"https://api.github.com/users/aboudreault/events{/privacy}","received_events_url":"https://api.github.com/users/aboudreault/received_events","type":"User","site_admin":false},"body":"Add tests for TTL feature.\r\n\r\nUnfortunately, the ttl tests take around 4.5 minutes to run. I tried to use smaller interval in my tests, but this produced unexpected failure due to a too fast or too slow execution.\r\n","created_at":"2014-12-08T00:13:05Z","updated_at":"2015-01-07T19:10:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"90befcaee88f8d723d75a8bc9234c1aa284c999d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/134/commits","review_comments_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/134/comments","review_comment_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/comments/{number}","comments_url":"https://api.github.com/repos/riptano/cassandra-dtest/issues/134/comments","statuses_url":"https://api.github.com/repos/riptano/cassandra-dtest/statuses/4a5e090ceb5345fc6f650859f513d3d88499eeab","head":{"label":"riptano:cassandra-8430","ref":"cassandra-8430","sha":"4a5e090ceb5345fc6f650859f513d3d88499eeab","user":{"login":"riptano","id":275430,"avatar_url":"https://avatars.githubusercontent.com/u/275430?v=3","gravatar_id":"","url":"https://api.github.com/users/riptano","html_url":"https://github.com/riptano","followers_url":"https://api.github.com/users/riptano/followers","following_url":"https://api.github.com/users/riptano/following{/other_user}","gists_url":"https://api.github.com/users/riptano/gists{/gist_id}","starred_url":"https://api.github.com/users/riptano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riptano/subscriptions","organizations_url":"https://api.github.com/users/riptano/orgs","repos_url":"https://api.github.com/users/riptano/repos","events_url":"https://api.github.com/users/riptano/events{/privacy}","received_events_url":"https://api.github.com/users/riptano/received_events","type":"Organization","site_admin":false},"repo":{"id":2674774,"name":"cassandra-dtest","full_name":"riptano/cassandra-dtest","owner":{"login":"riptano","id":275430,"avatar_url":"https://avatars.githubusercontent.com/u/275430?v=3","gravatar_id":"","url":"https://api.github.com/users/riptano","html_url":"https://github.com/riptano","followers_url":"https://api.github.com/users/riptano/followers","following_url":"https://api.github.com/users/riptano/following{/other_user}","gists_url":"https://api.github.com/users/riptano/gists{/gist_id}","starred_url":"https://api.github.com/users/riptano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riptano/subscriptions","organizations_url":"https://api.github.com/users/riptano/orgs","repos_url":"https://api.github.com/users/riptano/repos","events_url":"https://api.github.com/users/riptano/events{/privacy}","received_events_url":"https://api.github.com/users/riptano/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/riptano/cassandra-dtest","description":"Cassandra Distributed Tests","fork":false,"url":"https://api.github.com/repos/riptano/cassandra-dtest","forks_url":"https://api.github.com/repos/riptano/cassandra-dtest/forks","keys_url":"https://api.github.com/repos/riptano/cassandra-dtest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/riptano/cassandra-dtest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/riptano/cassandra-dtest/teams","hooks_url":"https://api.github.com/repos/riptano/cassandra-dtest/hooks","issue_events_url":"https://api.github.com/repos/riptano/cassandra-dtest/issues/events{/number}","events_url":"https://api.github.com/repos/riptano/cassandra-dtest/events","assignees_url":"https://api.github.com/repos/riptano/cassandra-dtest/assignees{/user}","branches_url":"https://api.github.com/repos/riptano/cassandra-dtest/branches{/branch}","tags_url":"https://api.github.com/repos/riptano/cassandra-dtest/tags","blobs_url":"https://api.github.com/repos/riptano/cassandra-dtest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/riptano/cassandra-dtest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/riptano/cassandra-dtest/git/refs{/sha}","trees_url":"https://api.github.com/repos/riptano/cassandra-dtest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/riptano/cassandra-dtest/statuses/{sha}","languages_url":"https://api.github.com/repos/riptano/cassandra-dtest/languages","stargazers_url":"https://api.github.com/repos/riptano/cassandra-dtest/stargazers","contributors_url":"https://api.github.com/repos/riptano/cassandra-dtest/contributors","subscribers_url":"https://api.github.com/repos/riptano/cassandra-dtest/subscribers","subscription_url":"https://api.github.com/repos/riptano/cassandra-dtest/subscription","commits_url":"https://api.github.com/repos/riptano/cassandra-dtest/commits{/sha}","git_commits_url":"https://api.github.com/repos/riptano/cassandra-dtest/git/commits{/sha}","comments_url":"https://api.github.com/repos/riptano/cassandra-dtest/comments{/number}","issue_comment_url":"https://api.github.com/repos/riptano/cassandra-dtest/issues/comments/{number}","contents_url":"https://api.github.com/repos/riptano/cassandra-dtest/contents/{+path}","compare_url":"https://api.github.com/repos/riptano/cassandra-dtest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/riptano/cassandra-dtest/merges","archive_url":"https://api.github.com/repos/riptano/cassandra-dtest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/riptano/cassandra-dtest/downloads","issues_url":"https://api.github.com/repos/riptano/cassandra-dtest/issues{/number}","pulls_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls{/number}","milestones_url":"https://api.github.com/repos/riptano/cassandra-dtest/milestones{/number}","notifications_url":"https://api.github.com/repos/riptano/cassandra-dtest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/riptano/cassandra-dtest/labels{/name}","releases_url":"https://api.github.com/repos/riptano/cassandra-dtest/releases{/id}","created_at":"2011-10-30T11:15:44Z","updated_at":"2015-01-06T18:48:18Z","pushed_at":"2015-01-06T18:48:17Z","git_url":"git://github.com/riptano/cassandra-dtest.git","ssh_url":"git@github.com:riptano/cassandra-dtest.git","clone_url":"https://github.com/riptano/cassandra-dtest.git","svn_url":"https://github.com/riptano/cassandra-dtest","homepage":"","size":4795,"stargazers_count":53,"watchers_count":53,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":27,"forks":27,"open_issues":27,"watchers":53,"default_branch":"master"}},"base":{"label":"riptano:master","ref":"master","sha":"978110dc37c3098b7267e13cf4ea4331d90aa943","user":{"login":"riptano","id":275430,"avatar_url":"https://avatars.githubusercontent.com/u/275430?v=3","gravatar_id":"","url":"https://api.github.com/users/riptano","html_url":"https://github.com/riptano","followers_url":"https://api.github.com/users/riptano/followers","following_url":"https://api.github.com/users/riptano/following{/other_user}","gists_url":"https://api.github.com/users/riptano/gists{/gist_id}","starred_url":"https://api.github.com/users/riptano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riptano/subscriptions","organizations_url":"https://api.github.com/users/riptano/orgs","repos_url":"https://api.github.com/users/riptano/repos","events_url":"https://api.github.com/users/riptano/events{/privacy}","received_events_url":"https://api.github.com/users/riptano/received_events","type":"Organization","site_admin":false},"repo":{"id":2674774,"name":"cassandra-dtest","full_name":"riptano/cassandra-dtest","owner":{"login":"riptano","id":275430,"avatar_url":"https://avatars.githubusercontent.com/u/275430?v=3","gravatar_id":"","url":"https://api.github.com/users/riptano","html_url":"https://github.com/riptano","followers_url":"https://api.github.com/users/riptano/followers","following_url":"https://api.github.com/users/riptano/following{/other_user}","gists_url":"https://api.github.com/users/riptano/gists{/gist_id}","starred_url":"https://api.github.com/users/riptano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riptano/subscriptions","organizations_url":"https://api.github.com/users/riptano/orgs","repos_url":"https://api.github.com/users/riptano/repos","events_url":"https://api.github.com/users/riptano/events{/privacy}","received_events_url":"https://api.github.com/users/riptano/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/riptano/cassandra-dtest","description":"Cassandra Distributed Tests","fork":false,"url":"https://api.github.com/repos/riptano/cassandra-dtest","forks_url":"https://api.github.com/repos/riptano/cassandra-dtest/forks","keys_url":"https://api.github.com/repos/riptano/cassandra-dtest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/riptano/cassandra-dtest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/riptano/cassandra-dtest/teams","hooks_url":"https://api.github.com/repos/riptano/cassandra-dtest/hooks","issue_events_url":"https://api.github.com/repos/riptano/cassandra-dtest/issues/events{/number}","events_url":"https://api.github.com/repos/riptano/cassandra-dtest/events","assignees_url":"https://api.github.com/repos/riptano/cassandra-dtest/assignees{/user}","branches_url":"https://api.github.com/repos/riptano/cassandra-dtest/branches{/branch}","tags_url":"https://api.github.com/repos/riptano/cassandra-dtest/tags","blobs_url":"https://api.github.com/repos/riptano/cassandra-dtest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/riptano/cassandra-dtest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/riptano/cassandra-dtest/git/refs{/sha}","trees_url":"https://api.github.com/repos/riptano/cassandra-dtest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/riptano/cassandra-dtest/statuses/{sha}","languages_url":"https://api.github.com/repos/riptano/cassandra-dtest/languages","stargazers_url":"https://api.github.com/repos/riptano/cassandra-dtest/stargazers","contributors_url":"https://api.github.com/repos/riptano/cassandra-dtest/contributors","subscribers_url":"https://api.github.com/repos/riptano/cassandra-dtest/subscribers","subscription_url":"https://api.github.com/repos/riptano/cassandra-dtest/subscription","commits_url":"https://api.github.com/repos/riptano/cassandra-dtest/commits{/sha}","git_commits_url":"https://api.github.com/repos/riptano/cassandra-dtest/git/commits{/sha}","comments_url":"https://api.github.com/repos/riptano/cassandra-dtest/comments{/number}","issue_comment_url":"https://api.github.com/repos/riptano/cassandra-dtest/issues/comments/{number}","contents_url":"https://api.github.com/repos/riptano/cassandra-dtest/contents/{+path}","compare_url":"https://api.github.com/repos/riptano/cassandra-dtest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/riptano/cassandra-dtest/merges","archive_url":"https://api.github.com/repos/riptano/cassandra-dtest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/riptano/cassandra-dtest/downloads","issues_url":"https://api.github.com/repos/riptano/cassandra-dtest/issues{/number}","pulls_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls{/number}","milestones_url":"https://api.github.com/repos/riptano/cassandra-dtest/milestones{/number}","notifications_url":"https://api.github.com/repos/riptano/cassandra-dtest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/riptano/cassandra-dtest/labels{/name}","releases_url":"https://api.github.com/repos/riptano/cassandra-dtest/releases{/id}","created_at":"2011-10-30T11:15:44Z","updated_at":"2015-01-06T18:48:18Z","pushed_at":"2015-01-06T18:48:17Z","git_url":"git://github.com/riptano/cassandra-dtest.git","ssh_url":"git@github.com:riptano/cassandra-dtest.git","clone_url":"https://github.com/riptano/cassandra-dtest.git","svn_url":"https://github.com/riptano/cassandra-dtest","homepage":"","size":4795,"stargazers_count":53,"watchers_count":53,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":27,"forks":27,"open_issues":27,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/134"},"html":{"href":"https://github.com/riptano/cassandra-dtest/pull/134"},"issue":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/issues/134"},"comments":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/issues/134/comments"},"review_comments":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/134/comments"},"review_comment":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/134/commits"},"statuses":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/statuses/4a5e090ceb5345fc6f650859f513d3d88499eeab"}}}}