{"action":"created","comment":{"url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/comments/73253073","id":73253073,"diff_hunk":"@@ -128,6 +132,104 @@ def call_and_register_exc_info_on_exception(func):\n         for i in xrange(0, keys):\n             query_c1c2(session, i, ConsistencyLevel.ALL)\n \n+    @since('3.0')\n+    def resumable_rebuild_test(self):\n+        \"\"\"\n+        @jira_ticket CASSANDRA-10810\n+\n+        Test rebuild operation is resumable\n+        \"\"\"\n+        cluster = self.cluster\n+        cluster.set_configuration_options(values={'endpoint_snitch': 'org.apache.cassandra.locator.PropertyFileSnitch'})\n+\n+        # Create 2 nodes on dc1\n+        node1 = cluster.create_node('node1', False,\n+                                    ('127.0.0.1', 9160),\n+                                    ('127.0.0.1', 7000),\n+                                    '7100', '2000', None,\n+                                    binary_interface=('127.0.0.1', 9042))\n+        node2 = cluster.create_node('node2', False,\n+                                    ('127.0.0.2', 9160),\n+                                    ('127.0.0.2', 7000),\n+                                    '7200', '2001', None,\n+                                    binary_interface=('127.0.0.2', 9042))\n+\n+        cluster.add(node1, True, data_center='dc1')\n+        cluster.add(node2, True, data_center='dc1')\n+\n+        node1.start(wait_for_binary_proto=True)\n+        node2.start(wait_for_binary_proto=True)\n+\n+        # Insert data into node1 and node2\n+        session = self.patient_exclusive_cql_connection(node1)\n+        self.create_ks(session, 'ks', {'dc1': 1})\n+        self.create_cf(session, 'cf', columns={'c1': 'text', 'c2': 'text'})\n+        insert_c1c2(session, n=10000, consistency=ConsistencyLevel.ALL)\n+        key = list(range(10000, 20000))\n+        session = self.patient_exclusive_cql_connection(node2)\n+        session.execute('USE ks')\n+        insert_c1c2(session, keys=key, consistency=ConsistencyLevel.ALL)\n+        session.shutdown()\n+\n+        # Create a new node3 on dc2\n+        node3 = cluster.create_node('node3', False,\n+                                    ('127.0.0.3', 9160),\n+                                    ('127.0.0.3', 7000),\n+                                    '7300', '2002', None,\n+                                    binary_interface=('127.0.0.3', 9042),\n+                                    byteman_port='8300')\n+\n+        cluster.add(node3, False, data_center='dc2')\n+\n+        node3.start(wait_other_notice=False, wait_for_binary_proto=True)\n+\n+        time.sleep(60)\n+\n+        # Alter necessary keyspace for rebuild operation\n+        session = self.patient_exclusive_cql_connection(node3)\n+        session.execute(\"ALTER KEYSPACE ks WITH REPLICATION = {'class':'NetworkTopologyStrategy', 'dc1':1, 'dc2':1};\")\n+        session.execute(\"ALTER KEYSPACE system_auth WITH REPLICATION = {'class':'NetworkTopologyStrategy', 'dc1':1, 'dc2':1};\")\n+\n+        self.rebuild_errors = 0\n+\n+        # Path to byteman script which makes node2 throw an exception making rebuild fail\n+        script = ['./rebuild_failure_inject.btm']\n+\n+        try:\n+            debug('Executing first rebuild -> '),\n+            node3.byteman_submit(script)\n+            node3.nodetool('rebuild dc1')\n+            debug('Unexpected: SUCCEED')\n+        except NodetoolError:\n+            self.rebuild_errors += 1\n+            debug('Expected: FAILED')\n+\n+        # First rebuild must fail and data must be incomplete\n+        self.assertEqual(self.rebuild_errors, 1)\n+        session.execute('USE ks')\n+        try:\n+            debug('Checking data is complete -> '),\n+            for i in xrange(0, 20000):\n+                query_c1c2(session, i, ConsistencyLevel.LOCAL_ONE)","path":"rebuild_test.py","position":null,"original_position":104,"commit_id":"cd5e1b94684b7bf271b845fec420c07bafa41359","original_commit_id":"bd655a312809698ff30f95271ea98c646169ed56","user":{"login":"knifewine","id":123593,"avatar_url":"https://avatars.githubusercontent.com/u/123593?v=3","gravatar_id":"","url":"https://api.github.com/users/knifewine","html_url":"https://github.com/knifewine","followers_url":"https://api.github.com/users/knifewine/followers","following_url":"https://api.github.com/users/knifewine/following{/other_user}","gists_url":"https://api.github.com/users/knifewine/gists{/gist_id}","starred_url":"https://api.github.com/users/knifewine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knifewine/subscriptions","organizations_url":"https://api.github.com/users/knifewine/orgs","repos_url":"https://api.github.com/users/knifewine/repos","events_url":"https://api.github.com/users/knifewine/events{/privacy}","received_events_url":"https://api.github.com/users/knifewine/received_events","type":"User","site_admin":false},"body":"Thanks! Just want to be sure the test is as deterministic as possible.","created_at":"2016-08-02T22:52:04Z","updated_at":"2016-08-02T22:52:04Z","html_url":"https://github.com/riptano/cassandra-dtest/pull/1145#discussion_r73253073","pull_request_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1145","_links":{"self":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/comments/73253073"},"html":{"href":"https://github.com/riptano/cassandra-dtest/pull/1145#discussion_r73253073"},"pull_request":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1145"}}},"pull_request":{"url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1145","id":79096712,"html_url":"https://github.com/riptano/cassandra-dtest/pull/1145","diff_url":"https://github.com/riptano/cassandra-dtest/pull/1145.diff","patch_url":"https://github.com/riptano/cassandra-dtest/pull/1145.patch","issue_url":"https://api.github.com/repos/riptano/cassandra-dtest/issues/1145","number":1145,"state":"open","locked":false,"title":"jira-10810 resumable_rebuild_test","user":{"login":"kdmu","id":9607963,"avatar_url":"https://avatars.githubusercontent.com/u/9607963?v=3","gravatar_id":"","url":"https://api.github.com/users/kdmu","html_url":"https://github.com/kdmu","followers_url":"https://api.github.com/users/kdmu/followers","following_url":"https://api.github.com/users/kdmu/following{/other_user}","gists_url":"https://api.github.com/users/kdmu/gists{/gist_id}","starred_url":"https://api.github.com/users/kdmu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdmu/subscriptions","organizations_url":"https://api.github.com/users/kdmu/orgs","repos_url":"https://api.github.com/users/kdmu/repos","events_url":"https://api.github.com/users/kdmu/events{/privacy}","received_events_url":"https://api.github.com/users/kdmu/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-27T20:58:51Z","updated_at":"2016-08-02T22:52:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b18eab5b09964f720b9b8297d3a9c97f73689044","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1145/commits","review_comments_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1145/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/1145/comments","statuses_url":"https://api.github.com/repos/riptano/cassandra-dtest/statuses/cd5e1b94684b7bf271b845fec420c07bafa41359","head":{"label":"kdmu:jira-10810","ref":"jira-10810","sha":"cd5e1b94684b7bf271b845fec420c07bafa41359","user":{"login":"kdmu","id":9607963,"avatar_url":"https://avatars.githubusercontent.com/u/9607963?v=3","gravatar_id":"","url":"https://api.github.com/users/kdmu","html_url":"https://github.com/kdmu","followers_url":"https://api.github.com/users/kdmu/followers","following_url":"https://api.github.com/users/kdmu/following{/other_user}","gists_url":"https://api.github.com/users/kdmu/gists{/gist_id}","starred_url":"https://api.github.com/users/kdmu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdmu/subscriptions","organizations_url":"https://api.github.com/users/kdmu/orgs","repos_url":"https://api.github.com/users/kdmu/repos","events_url":"https://api.github.com/users/kdmu/events{/privacy}","received_events_url":"https://api.github.com/users/kdmu/received_events","type":"User","site_admin":false},"repo":{"id":63987502,"name":"cassandra-dtest","full_name":"kdmu/cassandra-dtest","owner":{"login":"kdmu","id":9607963,"avatar_url":"https://avatars.githubusercontent.com/u/9607963?v=3","gravatar_id":"","url":"https://api.github.com/users/kdmu","html_url":"https://github.com/kdmu","followers_url":"https://api.github.com/users/kdmu/followers","following_url":"https://api.github.com/users/kdmu/following{/other_user}","gists_url":"https://api.github.com/users/kdmu/gists{/gist_id}","starred_url":"https://api.github.com/users/kdmu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdmu/subscriptions","organizations_url":"https://api.github.com/users/kdmu/orgs","repos_url":"https://api.github.com/users/kdmu/repos","events_url":"https://api.github.com/users/kdmu/events{/privacy}","received_events_url":"https://api.github.com/users/kdmu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kdmu/cassandra-dtest","description":"Cassandra Distributed Tests","fork":true,"url":"https://api.github.com/repos/kdmu/cassandra-dtest","forks_url":"https://api.github.com/repos/kdmu/cassandra-dtest/forks","keys_url":"https://api.github.com/repos/kdmu/cassandra-dtest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kdmu/cassandra-dtest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kdmu/cassandra-dtest/teams","hooks_url":"https://api.github.com/repos/kdmu/cassandra-dtest/hooks","issue_events_url":"https://api.github.com/repos/kdmu/cassandra-dtest/issues/events{/number}","events_url":"https://api.github.com/repos/kdmu/cassandra-dtest/events","assignees_url":"https://api.github.com/repos/kdmu/cassandra-dtest/assignees{/user}","branches_url":"https://api.github.com/repos/kdmu/cassandra-dtest/branches{/branch}","tags_url":"https://api.github.com/repos/kdmu/cassandra-dtest/tags","blobs_url":"https://api.github.com/repos/kdmu/cassandra-dtest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kdmu/cassandra-dtest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kdmu/cassandra-dtest/git/refs{/sha}","trees_url":"https://api.github.com/repos/kdmu/cassandra-dtest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kdmu/cassandra-dtest/statuses/{sha}","languages_url":"https://api.github.com/repos/kdmu/cassandra-dtest/languages","stargazers_url":"https://api.github.com/repos/kdmu/cassandra-dtest/stargazers","contributors_url":"https://api.github.com/repos/kdmu/cassandra-dtest/contributors","subscribers_url":"https://api.github.com/repos/kdmu/cassandra-dtest/subscribers","subscription_url":"https://api.github.com/repos/kdmu/cassandra-dtest/subscription","commits_url":"https://api.github.com/repos/kdmu/cassandra-dtest/commits{/sha}","git_commits_url":"https://api.github.com/repos/kdmu/cassandra-dtest/git/commits{/sha}","comments_url":"https://api.github.com/repos/kdmu/cassandra-dtest/comments{/number}","issue_comment_url":"https://api.github.com/repos/kdmu/cassandra-dtest/issues/comments{/number}","contents_url":"https://api.github.com/repos/kdmu/cassandra-dtest/contents/{+path}","compare_url":"https://api.github.com/repos/kdmu/cassandra-dtest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kdmu/cassandra-dtest/merges","archive_url":"https://api.github.com/repos/kdmu/cassandra-dtest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kdmu/cassandra-dtest/downloads","issues_url":"https://api.github.com/repos/kdmu/cassandra-dtest/issues{/number}","pulls_url":"https://api.github.com/repos/kdmu/cassandra-dtest/pulls{/number}","milestones_url":"https://api.github.com/repos/kdmu/cassandra-dtest/milestones{/number}","notifications_url":"https://api.github.com/repos/kdmu/cassandra-dtest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kdmu/cassandra-dtest/labels{/name}","releases_url":"https://api.github.com/repos/kdmu/cassandra-dtest/releases{/id}","deployments_url":"https://api.github.com/repos/kdmu/cassandra-dtest/deployments","created_at":"2016-07-22T22:35:48Z","updated_at":"2016-07-22T22:35:51Z","pushed_at":"2016-08-02T22:40:15Z","git_url":"git://github.com/kdmu/cassandra-dtest.git","ssh_url":"git@github.com:kdmu/cassandra-dtest.git","clone_url":"https://github.com/kdmu/cassandra-dtest.git","svn_url":"https://github.com/kdmu/cassandra-dtest","homepage":"","size":16208,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"riptano:master","ref":"master","sha":"4670c9832aff157c50bd5a6fcc1e731388318610","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}","deployments_url":"https://api.github.com/repos/riptano/cassandra-dtest/deployments","created_at":"2011-10-30T11:15:44Z","updated_at":"2016-05-18T15:27:32Z","pushed_at":"2016-08-02T22:40:15Z","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":17124,"stargazers_count":77,"watchers_count":77,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":66,"mirror_url":null,"open_issues_count":54,"forks":66,"open_issues":54,"watchers":77,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1145"},"html":{"href":"https://github.com/riptano/cassandra-dtest/pull/1145"},"issue":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/issues/1145"},"comments":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/issues/1145/comments"},"review_comments":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1145/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/1145/commits"},"statuses":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/statuses/cd5e1b94684b7bf271b845fec420c07bafa41359"}}}}
{"actor":{"display_login":"knifewine"}}