{"action":"created","comment":{"url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/comments/69027252","id":69027252,"diff_hunk":"@@ -452,11 +478,130 @@ def replace_with_reset_resume_state_test(self):\n \n         # check if 2nd bootstrap succeeded\n         session = self.exclusive_cql_connection(node4)\n-        rows = list(session.execute(\"SELECT bootstrapped FROM system.local WHERE key='local'\"))\n-        assert len(rows) == 1\n-        assert rows[0][0] == 'COMPLETED', rows[0][0]\n+        assert_bootstrap_state(session, 'COMPLETED')\n \n         # query should work again\n-        debug(\"Verifying querying works again.\")\n-        finalData = list(session.execute(query))\n-        self.assertListEqual(initialData, finalData)\n+        debug(\"Stopping old nodes\")\n+        node1.stop(gently=False, wait_other_notice=True)\n+        node2.stop(gently=False, wait_other_notice=True)\n+\n+        debug(\"Verifying data on new node.\")\n+        session = self.patient_exclusive_cql_connection(node4)\n+        assert_all(session, 'SELECT * from {} LIMIT 1'.format(stress_table),\n+                   expected=initial_data,\n+                   cl=ConsistencyLevel.ONE)\n+\n+    def replace_with_insufficient_replicas_test(self):\n+        \"\"\"\n+        Test that replace fails when there are insufficient replicas\n+        @jira_ticket CASSANDRA-11848\n+        \"\"\"\n+        debug(\"Starting cluster with 3 nodes.\")\n+        cluster = self.cluster\n+        cluster.populate(3).start()\n+        node1, node2, node3 = cluster.nodelist()\n+\n+        if DISABLE_VNODES:\n+            num_tokens = 1\n+        else:\n+            # a little hacky but grep_log returns the whole line...\n+            num_tokens = int(node3.get_conf_option('num_tokens'))\n+\n+        debug(\"testing with num_tokens: {}\".format(num_tokens))\n+\n+        debug(\"Inserting Data...\")\n+        node1.stress(['write', 'n=10K', '-schema', 'replication(factor=2)'])\n+\n+        # stop node to replace\n+        debug(\"Stopping node to replace.\")\n+        node3.stop(wait_other_notice=True)\n+\n+        # stop other replica\n+        debug(\"Stopping node2 (other replica)\")\n+        node2.stop(wait_other_notice=True)\n+\n+        # replace node 3 with node 4\n+        debug(\"Starting node 4 to replace node 3\")\n+\n+        node4 = Node('node4', cluster=cluster, auto_bootstrap=True, thrift_interface=('127.0.0.4', 9160),\n+                     storage_interface=('127.0.0.4', 7000), jmx_port='7400', remote_debug_port='0',\n+                     initial_token=None, binary_interface=('127.0.0.4', 9042))\n+        cluster.add(node4, False)\n+        node4.start(replace_address='127.0.0.3', wait_for_binary_proto=False, wait_other_notice=False)\n+\n+        # replace should fail due to insufficient replicas\n+        node4.watch_log_for(\"Unable to find sufficient sources for streaming range\")\n+        assert_not_running(node4)\n+\n+    def multi_dc_replace_with_rf1_test(self):\n+        \"\"\"\n+        Test that multi-dc replace works when rf=1 on each dc\n+        \"\"\"\n+        cluster = self.cluster\n+        cluster.populate([1, 1])\n+        cluster.start()\n+        node1, node2 = cluster.nodelist()\n+\n+        node1 = cluster.nodes['node1']\n+        yaml_config = \"\"\"\n+        # Create the keyspace and table\n+        keyspace: keyspace1\n+        keyspace_definition: |\n+          CREATE KEYSPACE keyspace1 WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': 1, 'dc2': 1};\n+        table: users\n+        table_definition:\n+          CREATE TABLE users (\n+            username text,\n+            first_name text,\n+            last_name text,\n+            email text,\n+            PRIMARY KEY(username)\n+          ) WITH compaction = {'class':'SizeTieredCompactionStrategy'};\n+        insert:\n+          partitions: fixed(1)\n+          batchtype: UNLOGGED\n+        queries:\n+          read:\n+            cql: select * from users where username = ?\n+            fields: samerow\n+        \"\"\"\n+        with tempfile.NamedTemporaryFile(mode='w+') as stress_config:\n+            stress_config.write(yaml_config)\n+            stress_config.flush()\n+            node1.stress(['user', 'profile=' + stress_config.name, 'n=10k',","path":"replace_address_test.py","position":439,"original_position":439,"commit_id":"51ed5f55c85a3a1c339b265ac4b056137215e5fd","original_commit_id":"51ed5f55c85a3a1c339b265ac4b056137215e5fd","user":{"login":"mambocab","id":3753769,"avatar_url":"https://avatars.githubusercontent.com/u/3753769?v=3","gravatar_id":"","url":"https://api.github.com/users/mambocab","html_url":"https://github.com/mambocab","followers_url":"https://api.github.com/users/mambocab/followers","following_url":"https://api.github.com/users/mambocab/following{/other_user}","gists_url":"https://api.github.com/users/mambocab/gists{/gist_id}","starred_url":"https://api.github.com/users/mambocab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mambocab/subscriptions","organizations_url":"https://api.github.com/users/mambocab/orgs","repos_url":"https://api.github.com/users/mambocab/repos","events_url":"https://api.github.com/users/mambocab/events{/privacy}","received_events_url":"https://api.github.com/users/mambocab/received_events","type":"User","site_admin":false},"body":"Same as above -- could you either add `no-warmup` here or make a comment as to why we don't?","created_at":"2016-06-29T21:02:56Z","updated_at":"2016-06-29T21:02:56Z","html_url":"https://github.com/riptano/cassandra-dtest/pull/1051#discussion_r69027252","pull_request_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1051","_links":{"self":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/comments/69027252"},"html":{"href":"https://github.com/riptano/cassandra-dtest/pull/1051#discussion_r69027252"},"pull_request":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1051"}}},"pull_request":{"url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1051","id":74683657,"html_url":"https://github.com/riptano/cassandra-dtest/pull/1051","diff_url":"https://github.com/riptano/cassandra-dtest/pull/1051.diff","patch_url":"https://github.com/riptano/cassandra-dtest/pull/1051.patch","issue_url":"https://api.github.com/repos/riptano/cassandra-dtest/issues/1051","number":1051,"state":"open","locked":false,"title":"Tests to reproduce CASSANDRA-11848","user":{"login":"pauloricardomg","id":259876,"avatar_url":"https://avatars.githubusercontent.com/u/259876?v=3","gravatar_id":"","url":"https://api.github.com/users/pauloricardomg","html_url":"https://github.com/pauloricardomg","followers_url":"https://api.github.com/users/pauloricardomg/followers","following_url":"https://api.github.com/users/pauloricardomg/following{/other_user}","gists_url":"https://api.github.com/users/pauloricardomg/gists{/gist_id}","starred_url":"https://api.github.com/users/pauloricardomg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pauloricardomg/subscriptions","organizations_url":"https://api.github.com/users/pauloricardomg/orgs","repos_url":"https://api.github.com/users/pauloricardomg/repos","events_url":"https://api.github.com/users/pauloricardomg/events{/privacy}","received_events_url":"https://api.github.com/users/pauloricardomg/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-21T20:54:46Z","updated_at":"2016-06-29T21:02:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"88fe959e406f109d641764483a638712f13dab3f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1051/commits","review_comments_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1051/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/1051/comments","statuses_url":"https://api.github.com/repos/riptano/cassandra-dtest/statuses/51ed5f55c85a3a1c339b265ac4b056137215e5fd","head":{"label":"pauloricardomg:11848","ref":"11848","sha":"51ed5f55c85a3a1c339b265ac4b056137215e5fd","user":{"login":"pauloricardomg","id":259876,"avatar_url":"https://avatars.githubusercontent.com/u/259876?v=3","gravatar_id":"","url":"https://api.github.com/users/pauloricardomg","html_url":"https://github.com/pauloricardomg","followers_url":"https://api.github.com/users/pauloricardomg/followers","following_url":"https://api.github.com/users/pauloricardomg/following{/other_user}","gists_url":"https://api.github.com/users/pauloricardomg/gists{/gist_id}","starred_url":"https://api.github.com/users/pauloricardomg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pauloricardomg/subscriptions","organizations_url":"https://api.github.com/users/pauloricardomg/orgs","repos_url":"https://api.github.com/users/pauloricardomg/repos","events_url":"https://api.github.com/users/pauloricardomg/events{/privacy}","received_events_url":"https://api.github.com/users/pauloricardomg/received_events","type":"User","site_admin":false},"repo":{"id":39846583,"name":"cassandra-dtest","full_name":"pauloricardomg/cassandra-dtest","owner":{"login":"pauloricardomg","id":259876,"avatar_url":"https://avatars.githubusercontent.com/u/259876?v=3","gravatar_id":"","url":"https://api.github.com/users/pauloricardomg","html_url":"https://github.com/pauloricardomg","followers_url":"https://api.github.com/users/pauloricardomg/followers","following_url":"https://api.github.com/users/pauloricardomg/following{/other_user}","gists_url":"https://api.github.com/users/pauloricardomg/gists{/gist_id}","starred_url":"https://api.github.com/users/pauloricardomg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pauloricardomg/subscriptions","organizations_url":"https://api.github.com/users/pauloricardomg/orgs","repos_url":"https://api.github.com/users/pauloricardomg/repos","events_url":"https://api.github.com/users/pauloricardomg/events{/privacy}","received_events_url":"https://api.github.com/users/pauloricardomg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pauloricardomg/cassandra-dtest","description":"Cassandra Distributed Tests","fork":true,"url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest","forks_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/forks","keys_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/teams","hooks_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/hooks","issue_events_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/issues/events{/number}","events_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/events","assignees_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/assignees{/user}","branches_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/branches{/branch}","tags_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/tags","blobs_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/git/refs{/sha}","trees_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/statuses/{sha}","languages_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/languages","stargazers_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/stargazers","contributors_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/contributors","subscribers_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/subscribers","subscription_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/subscription","commits_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/commits{/sha}","git_commits_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/git/commits{/sha}","comments_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/comments{/number}","issue_comment_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/issues/comments{/number}","contents_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/contents/{+path}","compare_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/merges","archive_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/downloads","issues_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/issues{/number}","pulls_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/pulls{/number}","milestones_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/milestones{/number}","notifications_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/labels{/name}","releases_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/releases{/id}","deployments_url":"https://api.github.com/repos/pauloricardomg/cassandra-dtest/deployments","created_at":"2015-07-28T16:55:44Z","updated_at":"2016-01-12T23:28:55Z","pushed_at":"2016-06-29T19:37:30Z","git_url":"git://github.com/pauloricardomg/cassandra-dtest.git","ssh_url":"git@github.com:pauloricardomg/cassandra-dtest.git","clone_url":"https://github.com/pauloricardomg/cassandra-dtest.git","svn_url":"https://github.com/pauloricardomg/cassandra-dtest","homepage":"","size":15705,"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":"e9e9de9d317e0a3314d7c15d3ba13f4bd06bde7d","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-06-29T20:21:37Z","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":16349,"stargazers_count":77,"watchers_count":77,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":63,"mirror_url":null,"open_issues_count":50,"forks":63,"open_issues":50,"watchers":77,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1051"},"html":{"href":"https://github.com/riptano/cassandra-dtest/pull/1051"},"issue":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/issues/1051"},"comments":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/issues/1051/comments"},"review_comments":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1051/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/1051/commits"},"statuses":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/statuses/51ed5f55c85a3a1c339b265ac4b056137215e5fd"}}}}
{"actor":{"display_login":"mambocab"}}