{"action":"created","comment":{"url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/pulls/comments/45599616","id":45599616,"diff_hunk":"@@ -60,15 +60,22 @@ public static void killJavaByContainerId(long id) {\n \tpublic static String getJavaPidByContainerId(long id) {\n \t\tString result = null;\n \t\ttry {\n+\t\t\tfinal Long currentPid = PidUtils.getPID();\n \t\t\tfor (Map.Entry<String, String> entry : getJavaProcesses().entrySet()) {\n \t\t\t\tfinal String pid = entry.getKey();\n-\t\t\t\tfinal Process p = Runtime.getRuntime().exec(\"jinfo -sysprops \" + pid);\n+\t\t\t\tif (currentPid != null && String.valueOf(currentPid).equals(pid)) {\n+\t\t\t\t\t//it hangs jvm on Windows\n+\t\t\t\t\tlog.debug(\"We are not going to execute jinfo for our pid \" + currentPid);\n+\t\t\t\t\tcontinue;\n+\t\t\t\t}\n+\t\t\t\tfinal String command = \"jinfo -sysprops \" + pid;\n+\t\t\t\tlog.info(\"Executing: \" + command);\n+\t\t\t\tfinal Process p = Runtime.getRuntime().exec(command);\n \t\t\t\tfinal BufferedReader is = new BufferedReader(new InputStreamReader(p.getInputStream()));\n \t\t\t\tString line;\n \t\t\t\twhile ((line = is.readLine()) != null) {\n-\t\t\t\t\tif (line.contains(Container.JCONTAINER_ID) && line.contains(String.valueOf(id))) {\n+\t\t\t\t\tif (result == null && line.contains(Container.JCONTAINER_ID) && line.contains(String.valueOf(id))) {\n \t\t\t\t\t\tresult = pid;\n-\t\t\t\t\t\tbreak;","path":"core/src/main/java/org/jboss/qa/jcontainer/util/ProcessUtils.java","position":22,"original_position":22,"commit_id":"3275320d2ab1a9032fafe66821ed4955ddebc69f","original_commit_id":"3275320d2ab1a9032fafe66821ed4955ddebc69f","user":{"login":"mswiech","id":7802110,"avatar_url":"https://avatars.githubusercontent.com/u/7802110?v=3","gravatar_id":"","url":"https://api.github.com/users/mswiech","html_url":"https://github.com/mswiech","followers_url":"https://api.github.com/users/mswiech/followers","following_url":"https://api.github.com/users/mswiech/following{/other_user}","gists_url":"https://api.github.com/users/mswiech/gists{/gist_id}","starred_url":"https://api.github.com/users/mswiech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mswiech/subscriptions","organizations_url":"https://api.github.com/users/mswiech/orgs","repos_url":"https://api.github.com/users/mswiech/repos","events_url":"https://api.github.com/users/mswiech/events{/privacy}","received_events_url":"https://api.github.com/users/mswiech/received_events","type":"User","site_admin":false},"body":"we want to consume STDOUT of executed command. It could freeze if STDOUT buffer of executed process is overfull.","created_at":"2015-11-23T12:51:37Z","updated_at":"2015-11-23T12:51:37Z","html_url":"https://github.com/jboss-soa-qa/jcontainer-manager/pull/61#discussion_r45599616","pull_request_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/pulls/61","_links":{"self":{"href":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/pulls/comments/45599616"},"html":{"href":"https://github.com/jboss-soa-qa/jcontainer-manager/pull/61#discussion_r45599616"},"pull_request":{"href":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/pulls/61"}}},"pull_request":{"url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/pulls/61","id":51501314,"html_url":"https://github.com/jboss-soa-qa/jcontainer-manager/pull/61","diff_url":"https://github.com/jboss-soa-qa/jcontainer-manager/pull/61.diff","patch_url":"https://github.com/jboss-soa-qa/jcontainer-manager/pull/61.patch","issue_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/issues/61","number":61,"state":"open","locked":false,"title":"[closes #60] Skip executing jinfo for same pid.","user":{"login":"mswiech","id":7802110,"avatar_url":"https://avatars.githubusercontent.com/u/7802110?v=3","gravatar_id":"","url":"https://api.github.com/users/mswiech","html_url":"https://github.com/mswiech","followers_url":"https://api.github.com/users/mswiech/followers","following_url":"https://api.github.com/users/mswiech/following{/other_user}","gists_url":"https://api.github.com/users/mswiech/gists{/gist_id}","starred_url":"https://api.github.com/users/mswiech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mswiech/subscriptions","organizations_url":"https://api.github.com/users/mswiech/orgs","repos_url":"https://api.github.com/users/mswiech/repos","events_url":"https://api.github.com/users/mswiech/events{/privacy}","received_events_url":"https://api.github.com/users/mswiech/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-23T09:31:42Z","updated_at":"2015-11-23T12:51:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dad05ee4b1d9e2a802a5f19854bc98217890c955","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/pulls/61/commits","review_comments_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/pulls/61/comments","review_comment_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/issues/61/comments","statuses_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/statuses/3275320d2ab1a9032fafe66821ed4955ddebc69f","head":{"label":"mswiech:issue-60_fix-problem-with-freezing-tests-on-windows","ref":"issue-60_fix-problem-with-freezing-tests-on-windows","sha":"3275320d2ab1a9032fafe66821ed4955ddebc69f","user":{"login":"mswiech","id":7802110,"avatar_url":"https://avatars.githubusercontent.com/u/7802110?v=3","gravatar_id":"","url":"https://api.github.com/users/mswiech","html_url":"https://github.com/mswiech","followers_url":"https://api.github.com/users/mswiech/followers","following_url":"https://api.github.com/users/mswiech/following{/other_user}","gists_url":"https://api.github.com/users/mswiech/gists{/gist_id}","starred_url":"https://api.github.com/users/mswiech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mswiech/subscriptions","organizations_url":"https://api.github.com/users/mswiech/orgs","repos_url":"https://api.github.com/users/mswiech/repos","events_url":"https://api.github.com/users/mswiech/events{/privacy}","received_events_url":"https://api.github.com/users/mswiech/received_events","type":"User","site_admin":false},"repo":{"id":45870661,"name":"jcontainer-manager","full_name":"mswiech/jcontainer-manager","owner":{"login":"mswiech","id":7802110,"avatar_url":"https://avatars.githubusercontent.com/u/7802110?v=3","gravatar_id":"","url":"https://api.github.com/users/mswiech","html_url":"https://github.com/mswiech","followers_url":"https://api.github.com/users/mswiech/followers","following_url":"https://api.github.com/users/mswiech/following{/other_user}","gists_url":"https://api.github.com/users/mswiech/gists{/gist_id}","starred_url":"https://api.github.com/users/mswiech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mswiech/subscriptions","organizations_url":"https://api.github.com/users/mswiech/orgs","repos_url":"https://api.github.com/users/mswiech/repos","events_url":"https://api.github.com/users/mswiech/events{/privacy}","received_events_url":"https://api.github.com/users/mswiech/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mswiech/jcontainer-manager","description":"","fork":true,"url":"https://api.github.com/repos/mswiech/jcontainer-manager","forks_url":"https://api.github.com/repos/mswiech/jcontainer-manager/forks","keys_url":"https://api.github.com/repos/mswiech/jcontainer-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mswiech/jcontainer-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mswiech/jcontainer-manager/teams","hooks_url":"https://api.github.com/repos/mswiech/jcontainer-manager/hooks","issue_events_url":"https://api.github.com/repos/mswiech/jcontainer-manager/issues/events{/number}","events_url":"https://api.github.com/repos/mswiech/jcontainer-manager/events","assignees_url":"https://api.github.com/repos/mswiech/jcontainer-manager/assignees{/user}","branches_url":"https://api.github.com/repos/mswiech/jcontainer-manager/branches{/branch}","tags_url":"https://api.github.com/repos/mswiech/jcontainer-manager/tags","blobs_url":"https://api.github.com/repos/mswiech/jcontainer-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mswiech/jcontainer-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mswiech/jcontainer-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/mswiech/jcontainer-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mswiech/jcontainer-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/mswiech/jcontainer-manager/languages","stargazers_url":"https://api.github.com/repos/mswiech/jcontainer-manager/stargazers","contributors_url":"https://api.github.com/repos/mswiech/jcontainer-manager/contributors","subscribers_url":"https://api.github.com/repos/mswiech/jcontainer-manager/subscribers","subscription_url":"https://api.github.com/repos/mswiech/jcontainer-manager/subscription","commits_url":"https://api.github.com/repos/mswiech/jcontainer-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/mswiech/jcontainer-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/mswiech/jcontainer-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/mswiech/jcontainer-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/mswiech/jcontainer-manager/contents/{+path}","compare_url":"https://api.github.com/repos/mswiech/jcontainer-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mswiech/jcontainer-manager/merges","archive_url":"https://api.github.com/repos/mswiech/jcontainer-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mswiech/jcontainer-manager/downloads","issues_url":"https://api.github.com/repos/mswiech/jcontainer-manager/issues{/number}","pulls_url":"https://api.github.com/repos/mswiech/jcontainer-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/mswiech/jcontainer-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/mswiech/jcontainer-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mswiech/jcontainer-manager/labels{/name}","releases_url":"https://api.github.com/repos/mswiech/jcontainer-manager/releases{/id}","created_at":"2015-11-09T22:21:27Z","updated_at":"2015-11-09T22:21:28Z","pushed_at":"2015-11-23T12:43:36Z","git_url":"git://github.com/mswiech/jcontainer-manager.git","ssh_url":"git@github.com:mswiech/jcontainer-manager.git","clone_url":"https://github.com/mswiech/jcontainer-manager.git","svn_url":"https://github.com/mswiech/jcontainer-manager","homepage":null,"size":140,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"develop"}},"base":{"label":"jboss-soa-qa:develop","ref":"develop","sha":"dbf395ca384a451da8d764d5b03edb0b7af7563f","user":{"login":"jboss-soa-qa","id":10720530,"avatar_url":"https://avatars.githubusercontent.com/u/10720530?v=3","gravatar_id":"","url":"https://api.github.com/users/jboss-soa-qa","html_url":"https://github.com/jboss-soa-qa","followers_url":"https://api.github.com/users/jboss-soa-qa/followers","following_url":"https://api.github.com/users/jboss-soa-qa/following{/other_user}","gists_url":"https://api.github.com/users/jboss-soa-qa/gists{/gist_id}","starred_url":"https://api.github.com/users/jboss-soa-qa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jboss-soa-qa/subscriptions","organizations_url":"https://api.github.com/users/jboss-soa-qa/orgs","repos_url":"https://api.github.com/users/jboss-soa-qa/repos","events_url":"https://api.github.com/users/jboss-soa-qa/events{/privacy}","received_events_url":"https://api.github.com/users/jboss-soa-qa/received_events","type":"Organization","site_admin":false},"repo":{"id":30525181,"name":"jcontainer-manager","full_name":"jboss-soa-qa/jcontainer-manager","owner":{"login":"jboss-soa-qa","id":10720530,"avatar_url":"https://avatars.githubusercontent.com/u/10720530?v=3","gravatar_id":"","url":"https://api.github.com/users/jboss-soa-qa","html_url":"https://github.com/jboss-soa-qa","followers_url":"https://api.github.com/users/jboss-soa-qa/followers","following_url":"https://api.github.com/users/jboss-soa-qa/following{/other_user}","gists_url":"https://api.github.com/users/jboss-soa-qa/gists{/gist_id}","starred_url":"https://api.github.com/users/jboss-soa-qa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jboss-soa-qa/subscriptions","organizations_url":"https://api.github.com/users/jboss-soa-qa/orgs","repos_url":"https://api.github.com/users/jboss-soa-qa/repos","events_url":"https://api.github.com/users/jboss-soa-qa/events{/privacy}","received_events_url":"https://api.github.com/users/jboss-soa-qa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jboss-soa-qa/jcontainer-manager","description":"","fork":false,"url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager","forks_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/forks","keys_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/teams","hooks_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/hooks","issue_events_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/issues/events{/number}","events_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/events","assignees_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/assignees{/user}","branches_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/branches{/branch}","tags_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/tags","blobs_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/languages","stargazers_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/stargazers","contributors_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/contributors","subscribers_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/subscribers","subscription_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/subscription","commits_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/contents/{+path}","compare_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/merges","archive_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/downloads","issues_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/issues{/number}","pulls_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/labels{/name}","releases_url":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/releases{/id}","created_at":"2015-02-09T08:09:24Z","updated_at":"2015-07-22T11:23:11Z","pushed_at":"2015-11-23T09:31:43Z","git_url":"git://github.com/jboss-soa-qa/jcontainer-manager.git","ssh_url":"git@github.com:jboss-soa-qa/jcontainer-manager.git","clone_url":"https://github.com/jboss-soa-qa/jcontainer-manager.git","svn_url":"https://github.com/jboss-soa-qa/jcontainer-manager","homepage":null,"size":503,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":8,"forks":5,"open_issues":8,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/pulls/61"},"html":{"href":"https://github.com/jboss-soa-qa/jcontainer-manager/pull/61"},"issue":{"href":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/issues/61"},"comments":{"href":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/issues/61/comments"},"review_comments":{"href":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/pulls/61/comments"},"review_comment":{"href":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/pulls/61/commits"},"statuses":{"href":"https://api.github.com/repos/jboss-soa-qa/jcontainer-manager/statuses/3275320d2ab1a9032fafe66821ed4955ddebc69f"}}}}