GitHub PullRequestReviewCommentEvent at 2014-12-10 11:11:08
Repository: crate-jdbc
Actor: mfelsche
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/crate/crate-jdbc/pulls/comments/21596834","id":21596834,"diff_hunk":"@@ -44,19 +50,66 @@\n     public final String crateHost;\n     private final String workingDir;\n     private final String clusterName;\n+    private final String[] unicastHosts;\n \n     private Process crateProcess;\n     private ThreadPoolExecutor executor;\n-    private BlockingQueue<Runnable> workQueue;\n+\n+    public static CrateTestServer[] cluster(String clusterName, int numberOfNodes) {\n+        int transportPorts[] = new int[numberOfNodes];\n+        int httpPorts[] = new int[numberOfNodes];\n+        Set<Integer> usedPorts = new HashSet<>(2*numberOfNodes);\n+        for (int i = 0; i<numberOfNodes; i++) {\n+            int port = randomAvailablePort();\n+            while (usedPorts.contains(port)) {","path":"src/test/java/io/crate/client/CrateTestServer.java","position":42,"original_position":42,"commit_id":"21d6730872f02916c55ee8fa20c395d7a9591d04","original_commit_id":"21d6730872f02916c55ee8fa20c395d7a9591d04","user":{"login":"mfelsche","id":1152667,"avatar_url":"https://avatars.githubusercontent.com/u/1152667?v=3","gravatar_id":"","url":"https://api.github.com/users/mfelsche","html_url":"https://github.com/mfelsche","followers_url":"https://api.github.com/users/mfelsche/followers","following_url":"https://api.github.com/users/mfelsche/following{/other_user}","gists_url":"https://api.github.com/users/mfelsche/gists{/gist_id}","starred_url":"https://api.github.com/users/mfelsche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfelsche/subscriptions","organizations_url":"https://api.github.com/users/mfelsche/orgs","repos_url":"https://api.github.com/users/mfelsche/repos","events_url":"https://api.github.com/users/mfelsche/events{/privacy}","received_events_url":"https://api.github.com/users/mfelsche/received_events","type":"User","site_admin":false},"body":"yes, the socket is closed when the function returns. so it is (theoretically) available on the next call.","created_at":"2014-12-10T11:11:08Z","updated_at":"2014-12-10T11:11:08Z","html_url":"https://github.com/crate/crate-jdbc/pull/47#discussion_r21596834","pull_request_url":"https://api.github.com/repos/crate/crate-jdbc/pulls/47","_links":{"self":{"href":"https://api.github.com/repos/crate/crate-jdbc/pulls/comments/21596834"},"html":{"href":"https://github.com/crate/crate-jdbc/pull/47#discussion_r21596834"},"pull_request":{"href":"https://api.github.com/repos/crate/crate-jdbc/pulls/47"}}},"pull_request":{"url":"https://api.github.com/repos/crate/crate-jdbc/pulls/47","id":25813923,"html_url":"https://github.com/crate/crate-jdbc/pull/47","diff_url":"https://github.com/crate/crate-jdbc/pull/47.diff","patch_url":"https://github.com/crate/crate-jdbc/pull/47.patch","issue_url":"https://api.github.com/repos/crate/crate-jdbc/issues/47","number":47,"state":"open","locked":false,"title":"run all tests and use CrateTestSrver with ClassRule with unicast enabled","user":{"login":"mfelsche","id":1152667,"avatar_url":"https://avatars.githubusercontent.com/u/1152667?v=3","gravatar_id":"","url":"https://api.github.com/users/mfelsche","html_url":"https://github.com/mfelsche","followers_url":"https://api.github.com/users/mfelsche/followers","following_url":"https://api.github.com/users/mfelsche/following{/other_user}","gists_url":"https://api.github.com/users/mfelsche/gists{/gist_id}","starred_url":"https://api.github.com/users/mfelsche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfelsche/subscriptions","organizations_url":"https://api.github.com/users/mfelsche/orgs","repos_url":"https://api.github.com/users/mfelsche/repos","events_url":"https://api.github.com/users/mfelsche/events{/privacy}","received_events_url":"https://api.github.com/users/mfelsche/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-12-10T11:03:49Z","updated_at":"2014-12-10T11:11:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"02ee278374e2634db4b00606cbc7b0559f33ad5d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/crate/crate-jdbc/pulls/47/commits","review_comments_url":"https://api.github.com/repos/crate/crate-jdbc/pulls/47/comments","review_comment_url":"https://api.github.com/repos/crate/crate-jdbc/pulls/comments/{number}","comments_url":"https://api.github.com/repos/crate/crate-jdbc/issues/47/comments","statuses_url":"https://api.github.com/repos/crate/crate-jdbc/statuses/21d6730872f02916c55ee8fa20c395d7a9591d04","head":{"label":"crate:m/test_server_unicast","ref":"m/test_server_unicast","sha":"21d6730872f02916c55ee8fa20c395d7a9591d04","user":{"login":"crate","id":4048232,"avatar_url":"https://avatars.githubusercontent.com/u/4048232?v=3","gravatar_id":"","url":"https://api.github.com/users/crate","html_url":"https://github.com/crate","followers_url":"https://api.github.com/users/crate/followers","following_url":"https://api.github.com/users/crate/following{/other_user}","gists_url":"https://api.github.com/users/crate/gists{/gist_id}","starred_url":"https://api.github.com/users/crate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crate/subscriptions","organizations_url":"https://api.github.com/users/crate/orgs","repos_url":"https://api.github.com/users/crate/repos","events_url":"https://api.github.com/users/crate/events{/privacy}","received_events_url":"https://api.github.com/users/crate/received_events","type":"Organization","site_admin":false},"repo":{"id":19030037,"name":"crate-jdbc","full_name":"crate/crate-jdbc","owner":{"login":"crate","id":4048232,"avatar_url":"https://avatars.githubusercontent.com/u/4048232?v=3","gravatar_id":"","url":"https://api.github.com/users/crate","html_url":"https://github.com/crate","followers_url":"https://api.github.com/users/crate/followers","following_url":"https://api.github.com/users/crate/following{/other_user}","gists_url":"https://api.github.com/users/crate/gists{/gist_id}","starred_url":"https://api.github.com/users/crate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crate/subscriptions","organizations_url":"https://api.github.com/users/crate/orgs","repos_url":"https://api.github.com/users/crate/repos","events_url":"https://api.github.com/users/crate/events{/privacy}","received_events_url":"https://api.github.com/users/crate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crate/crate-jdbc","description":"Crate Data Java Client","fork":false,"url":"https://api.github.com/repos/crate/crate-jdbc","forks_url":"https://api.github.com/repos/crate/crate-jdbc/forks","keys_url":"https://api.github.com/repos/crate/crate-jdbc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crate/crate-jdbc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crate/crate-jdbc/teams","hooks_url":"https://api.github.com/repos/crate/crate-jdbc/hooks","issue_events_url":"https://api.github.com/repos/crate/crate-jdbc/issues/events{/number}","events_url":"https://api.github.com/repos/crate/crate-jdbc/events","assignees_url":"https://api.github.com/repos/crate/crate-jdbc/assignees{/user}","branches_url":"https://api.github.com/repos/crate/crate-jdbc/branches{/branch}","tags_url":"https://api.github.com/repos/crate/crate-jdbc/tags","blobs_url":"https://api.github.com/repos/crate/crate-jdbc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crate/crate-jdbc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crate/crate-jdbc/git/refs{/sha}","trees_url":"https://api.github.com/repos/crate/crate-jdbc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crate/crate-jdbc/statuses/{sha}","languages_url":"https://api.github.com/repos/crate/crate-jdbc/languages","stargazers_url":"https://api.github.com/repos/crate/crate-jdbc/stargazers","contributors_url":"https://api.github.com/repos/crate/crate-jdbc/contributors","subscribers_url":"https://api.github.com/repos/crate/crate-jdbc/subscribers","subscription_url":"https://api.github.com/repos/crate/crate-jdbc/subscription","commits_url":"https://api.github.com/repos/crate/crate-jdbc/commits{/sha}","git_commits_url":"https://api.github.com/repos/crate/crate-jdbc/git/commits{/sha}","comments_url":"https://api.github.com/repos/crate/crate-jdbc/comments{/number}","issue_comment_url":"https://api.github.com/repos/crate/crate-jdbc/issues/comments/{number}","contents_url":"https://api.github.com/repos/crate/crate-jdbc/contents/{+path}","compare_url":"https://api.github.com/repos/crate/crate-jdbc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crate/crate-jdbc/merges","archive_url":"https://api.github.com/repos/crate/crate-jdbc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crate/crate-jdbc/downloads","issues_url":"https://api.github.com/repos/crate/crate-jdbc/issues{/number}","pulls_url":"https://api.github.com/repos/crate/crate-jdbc/pulls{/number}","milestones_url":"https://api.github.com/repos/crate/crate-jdbc/milestones{/number}","notifications_url":"https://api.github.com/repos/crate/crate-jdbc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crate/crate-jdbc/labels{/name}","releases_url":"https://api.github.com/repos/crate/crate-jdbc/releases{/id}","created_at":"2014-04-22T13:13:06Z","updated_at":"2014-11-28T15:08:25Z","pushed_at":"2014-12-10T11:03:37Z","git_url":"git://github.com/crate/crate-jdbc.git","ssh_url":"git@github.com:crate/crate-jdbc.git","clone_url":"https://github.com/crate/crate-jdbc.git","svn_url":"https://github.com/crate/crate-jdbc","homepage":"https://crate.io","size":32684,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"crate:master","ref":"master","sha":"cd8143ef2828076864a4302ec60488a964086013","user":{"login":"crate","id":4048232,"avatar_url":"https://avatars.githubusercontent.com/u/4048232?v=3","gravatar_id":"","url":"https://api.github.com/users/crate","html_url":"https://github.com/crate","followers_url":"https://api.github.com/users/crate/followers","following_url":"https://api.github.com/users/crate/following{/other_user}","gists_url":"https://api.github.com/users/crate/gists{/gist_id}","starred_url":"https://api.github.com/users/crate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crate/subscriptions","organizations_url":"https://api.github.com/users/crate/orgs","repos_url":"https://api.github.com/users/crate/repos","events_url":"https://api.github.com/users/crate/events{/privacy}","received_events_url":"https://api.github.com/users/crate/received_events","type":"Organization","site_admin":false},"repo":{"id":19030037,"name":"crate-jdbc","full_name":"crate/crate-jdbc","owner":{"login":"crate","id":4048232,"avatar_url":"https://avatars.githubusercontent.com/u/4048232?v=3","gravatar_id":"","url":"https://api.github.com/users/crate","html_url":"https://github.com/crate","followers_url":"https://api.github.com/users/crate/followers","following_url":"https://api.github.com/users/crate/following{/other_user}","gists_url":"https://api.github.com/users/crate/gists{/gist_id}","starred_url":"https://api.github.com/users/crate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crate/subscriptions","organizations_url":"https://api.github.com/users/crate/orgs","repos_url":"https://api.github.com/users/crate/repos","events_url":"https://api.github.com/users/crate/events{/privacy}","received_events_url":"https://api.github.com/users/crate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crate/crate-jdbc","description":"Crate Data Java Client","fork":false,"url":"https://api.github.com/repos/crate/crate-jdbc","forks_url":"https://api.github.com/repos/crate/crate-jdbc/forks","keys_url":"https://api.github.com/repos/crate/crate-jdbc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crate/crate-jdbc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crate/crate-jdbc/teams","hooks_url":"https://api.github.com/repos/crate/crate-jdbc/hooks","issue_events_url":"https://api.github.com/repos/crate/crate-jdbc/issues/events{/number}","events_url":"https://api.github.com/repos/crate/crate-jdbc/events","assignees_url":"https://api.github.com/repos/crate/crate-jdbc/assignees{/user}","branches_url":"https://api.github.com/repos/crate/crate-jdbc/branches{/branch}","tags_url":"https://api.github.com/repos/crate/crate-jdbc/tags","blobs_url":"https://api.github.com/repos/crate/crate-jdbc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crate/crate-jdbc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crate/crate-jdbc/git/refs{/sha}","trees_url":"https://api.github.com/repos/crate/crate-jdbc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crate/crate-jdbc/statuses/{sha}","languages_url":"https://api.github.com/repos/crate/crate-jdbc/languages","stargazers_url":"https://api.github.com/repos/crate/crate-jdbc/stargazers","contributors_url":"https://api.github.com/repos/crate/crate-jdbc/contributors","subscribers_url":"https://api.github.com/repos/crate/crate-jdbc/subscribers","subscription_url":"https://api.github.com/repos/crate/crate-jdbc/subscription","commits_url":"https://api.github.com/repos/crate/crate-jdbc/commits{/sha}","git_commits_url":"https://api.github.com/repos/crate/crate-jdbc/git/commits{/sha}","comments_url":"https://api.github.com/repos/crate/crate-jdbc/comments{/number}","issue_comment_url":"https://api.github.com/repos/crate/crate-jdbc/issues/comments/{number}","contents_url":"https://api.github.com/repos/crate/crate-jdbc/contents/{+path}","compare_url":"https://api.github.com/repos/crate/crate-jdbc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crate/crate-jdbc/merges","archive_url":"https://api.github.com/repos/crate/crate-jdbc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crate/crate-jdbc/downloads","issues_url":"https://api.github.com/repos/crate/crate-jdbc/issues{/number}","pulls_url":"https://api.github.com/repos/crate/crate-jdbc/pulls{/number}","milestones_url":"https://api.github.com/repos/crate/crate-jdbc/milestones{/number}","notifications_url":"https://api.github.com/repos/crate/crate-jdbc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crate/crate-jdbc/labels{/name}","releases_url":"https://api.github.com/repos/crate/crate-jdbc/releases{/id}","created_at":"2014-04-22T13:13:06Z","updated_at":"2014-11-28T15:08:25Z","pushed_at":"2014-12-10T11:03:37Z","git_url":"git://github.com/crate/crate-jdbc.git","ssh_url":"git@github.com:crate/crate-jdbc.git","clone_url":"https://github.com/crate/crate-jdbc.git","svn_url":"https://github.com/crate/crate-jdbc","homepage":"https://crate.io","size":32684,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crate/crate-jdbc/pulls/47"},"html":{"href":"https://github.com/crate/crate-jdbc/pull/47"},"issue":{"href":"https://api.github.com/repos/crate/crate-jdbc/issues/47"},"comments":{"href":"https://api.github.com/repos/crate/crate-jdbc/issues/47/comments"},"review_comments":{"href":"https://api.github.com/repos/crate/crate-jdbc/pulls/47/comments"},"review_comment":{"href":"https://api.github.com/repos/crate/crate-jdbc/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/crate/crate-jdbc/pulls/47/commits"},"statuses":{"href":"https://api.github.com/repos/crate/crate-jdbc/statuses/21d6730872f02916c55ee8fa20c395d7a9591d04"}}}}