{"action":"created","comment":{"url":"https://api.github.com/repos/rackerlabs/blueflood/pulls/comments/60142962","id":60142962,"diff_hunk":"@@ -252,17 +264,23 @@ void scheduleEligibleSlots(long maxAgeMillis, long delayedMetricsMaxAgeMillis) {\n         }\n     }\n \n-    private boolean areChildKeysOrSelfKeyScheduledOrRunning(SlotKey slotKey) {\n+    boolean areChildKeysOrSelfKeyScheduledOrRunning(SlotKey slotKey) {\n         // if any ineligible (children and self) keys are running or scheduled to run, we shouldn't work on this.\n         Collection<SlotKey> ineligibleKeys = slotKey.getChildrenKeys();\n \n-        if (runningSlots.keySet().contains(slotKey) || scheduledSlots.contains(slotKey)) {\n+        if (runningSlots.keySet().contains(slotKey)) {\n+            return true;\n+        }\n+        if (scheduledSlots.contains(slotKey)) {\n             return true;\n         }\n \n         // if any ineligible keys are running or scheduled to run, do not schedule this key.\n         for (SlotKey childrenKey : ineligibleKeys) {\n-            if (runningSlots.keySet().contains(childrenKey) || scheduledSlots.contains(childrenKey)) {\n+            if (runningSlots.keySet().contains(childrenKey)) {\n+                return true;\n+            }\n+            if (scheduledSlots.contains(childrenKey)) {","path":"blueflood-core/src/main/java/com/rackspacecloud/blueflood/service/ScheduleContext.java","position":42,"original_position":42,"commit_id":"6e846240ae550d1a94b4d2fa9a6fdb6a4465181f","original_commit_id":"6e846240ae550d1a94b4d2fa9a6fdb6a4465181f","user":{"login":"izrik","id":1711679,"avatar_url":"https://avatars.githubusercontent.com/u/1711679?v=3","gravatar_id":"","url":"https://api.github.com/users/izrik","html_url":"https://github.com/izrik","followers_url":"https://api.github.com/users/izrik/followers","following_url":"https://api.github.com/users/izrik/following{/other_user}","gists_url":"https://api.github.com/users/izrik/gists{/gist_id}","starred_url":"https://api.github.com/users/izrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izrik/subscriptions","organizations_url":"https://api.github.com/users/izrik/orgs","repos_url":"https://api.github.com/users/izrik/repos","events_url":"https://api.github.com/users/izrik/events{/privacy}","received_events_url":"https://api.github.com/users/izrik/received_events","type":"User","site_admin":false},"body":"@usnavi It has to do with the way jacoco calculates branch coverage. With both conditions in the same if-statement, with a `||` between them, there are theoretically four possible setups: `(T || T)`, `(T || F)`, `(F || T)`, `(F || F)`. The first one is not possible, because a slot should never be both scheduled and running. By breaking up the conditionals into two independent branches, they can be tracked by jacoco separately. Each one says \"all of 2 branches covered\" instead of \"1 of 4 branches missed\" in the combined case.","created_at":"2016-04-18T22:07:01Z","updated_at":"2016-04-18T22:07:01Z","html_url":"https://github.com/rackerlabs/blueflood/pull/669#discussion_r60142962","pull_request_url":"https://api.github.com/repos/rackerlabs/blueflood/pulls/669","_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/blueflood/pulls/comments/60142962"},"html":{"href":"https://github.com/rackerlabs/blueflood/pull/669#discussion_r60142962"},"pull_request":{"href":"https://api.github.com/repos/rackerlabs/blueflood/pulls/669"}}},"pull_request":{"url":"https://api.github.com/repos/rackerlabs/blueflood/pulls/669","id":66506347,"html_url":"https://github.com/rackerlabs/blueflood/pull/669","diff_url":"https://github.com/rackerlabs/blueflood/pull/669.diff","patch_url":"https://github.com/rackerlabs/blueflood/pull/669.patch","issue_url":"https://api.github.com/repos/rackerlabs/blueflood/issues/669","number":669,"state":"open","locked":false,"title":"Test ScheduleContext","user":{"login":"izrik","id":1711679,"avatar_url":"https://avatars.githubusercontent.com/u/1711679?v=3","gravatar_id":"","url":"https://api.github.com/users/izrik","html_url":"https://github.com/izrik","followers_url":"https://api.github.com/users/izrik/followers","following_url":"https://api.github.com/users/izrik/following{/other_user}","gists_url":"https://api.github.com/users/izrik/gists{/gist_id}","starred_url":"https://api.github.com/users/izrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izrik/subscriptions","organizations_url":"https://api.github.com/users/izrik/orgs","repos_url":"https://api.github.com/users/izrik/repos","events_url":"https://api.github.com/users/izrik/events{/privacy}","received_events_url":"https://api.github.com/users/izrik/received_events","type":"User","site_admin":false},"body":"This PR adds tests for the `ScheduleContext` class. It brings the class-specific unit test coverage up to 86%.","created_at":"2016-04-14T15:39:14Z","updated_at":"2016-04-18T22:07:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6616ec43fb1daf92fe4cdcfb9c2d9bd8efe388cb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rackerlabs/blueflood/pulls/669/commits","review_comments_url":"https://api.github.com/repos/rackerlabs/blueflood/pulls/669/comments","review_comment_url":"https://api.github.com/repos/rackerlabs/blueflood/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rackerlabs/blueflood/issues/669/comments","statuses_url":"https://api.github.com/repos/rackerlabs/blueflood/statuses/6e846240ae550d1a94b4d2fa9a6fdb6a4465181f","head":{"label":"izrik:test-schedule-context","ref":"test-schedule-context","sha":"6e846240ae550d1a94b4d2fa9a6fdb6a4465181f","user":{"login":"izrik","id":1711679,"avatar_url":"https://avatars.githubusercontent.com/u/1711679?v=3","gravatar_id":"","url":"https://api.github.com/users/izrik","html_url":"https://github.com/izrik","followers_url":"https://api.github.com/users/izrik/followers","following_url":"https://api.github.com/users/izrik/following{/other_user}","gists_url":"https://api.github.com/users/izrik/gists{/gist_id}","starred_url":"https://api.github.com/users/izrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izrik/subscriptions","organizations_url":"https://api.github.com/users/izrik/orgs","repos_url":"https://api.github.com/users/izrik/repos","events_url":"https://api.github.com/users/izrik/events{/privacy}","received_events_url":"https://api.github.com/users/izrik/received_events","type":"User","site_admin":false},"repo":{"id":41885166,"name":"blueflood","full_name":"izrik/blueflood","owner":{"login":"izrik","id":1711679,"avatar_url":"https://avatars.githubusercontent.com/u/1711679?v=3","gravatar_id":"","url":"https://api.github.com/users/izrik","html_url":"https://github.com/izrik","followers_url":"https://api.github.com/users/izrik/followers","following_url":"https://api.github.com/users/izrik/following{/other_user}","gists_url":"https://api.github.com/users/izrik/gists{/gist_id}","starred_url":"https://api.github.com/users/izrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izrik/subscriptions","organizations_url":"https://api.github.com/users/izrik/orgs","repos_url":"https://api.github.com/users/izrik/repos","events_url":"https://api.github.com/users/izrik/events{/privacy}","received_events_url":"https://api.github.com/users/izrik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/izrik/blueflood","description":"A distributed system designed to ingest and process time series data","fork":true,"url":"https://api.github.com/repos/izrik/blueflood","forks_url":"https://api.github.com/repos/izrik/blueflood/forks","keys_url":"https://api.github.com/repos/izrik/blueflood/keys{/key_id}","collaborators_url":"https://api.github.com/repos/izrik/blueflood/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/izrik/blueflood/teams","hooks_url":"https://api.github.com/repos/izrik/blueflood/hooks","issue_events_url":"https://api.github.com/repos/izrik/blueflood/issues/events{/number}","events_url":"https://api.github.com/repos/izrik/blueflood/events","assignees_url":"https://api.github.com/repos/izrik/blueflood/assignees{/user}","branches_url":"https://api.github.com/repos/izrik/blueflood/branches{/branch}","tags_url":"https://api.github.com/repos/izrik/blueflood/tags","blobs_url":"https://api.github.com/repos/izrik/blueflood/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/izrik/blueflood/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/izrik/blueflood/git/refs{/sha}","trees_url":"https://api.github.com/repos/izrik/blueflood/git/trees{/sha}","statuses_url":"https://api.github.com/repos/izrik/blueflood/statuses/{sha}","languages_url":"https://api.github.com/repos/izrik/blueflood/languages","stargazers_url":"https://api.github.com/repos/izrik/blueflood/stargazers","contributors_url":"https://api.github.com/repos/izrik/blueflood/contributors","subscribers_url":"https://api.github.com/repos/izrik/blueflood/subscribers","subscription_url":"https://api.github.com/repos/izrik/blueflood/subscription","commits_url":"https://api.github.com/repos/izrik/blueflood/commits{/sha}","git_commits_url":"https://api.github.com/repos/izrik/blueflood/git/commits{/sha}","comments_url":"https://api.github.com/repos/izrik/blueflood/comments{/number}","issue_comment_url":"https://api.github.com/repos/izrik/blueflood/issues/comments{/number}","contents_url":"https://api.github.com/repos/izrik/blueflood/contents/{+path}","compare_url":"https://api.github.com/repos/izrik/blueflood/compare/{base}...{head}","merges_url":"https://api.github.com/repos/izrik/blueflood/merges","archive_url":"https://api.github.com/repos/izrik/blueflood/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/izrik/blueflood/downloads","issues_url":"https://api.github.com/repos/izrik/blueflood/issues{/number}","pulls_url":"https://api.github.com/repos/izrik/blueflood/pulls{/number}","milestones_url":"https://api.github.com/repos/izrik/blueflood/milestones{/number}","notifications_url":"https://api.github.com/repos/izrik/blueflood/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/izrik/blueflood/labels{/name}","releases_url":"https://api.github.com/repos/izrik/blueflood/releases{/id}","deployments_url":"https://api.github.com/repos/izrik/blueflood/deployments","created_at":"2015-09-03T21:40:07Z","updated_at":"2016-01-11T17:45:10Z","pushed_at":"2016-04-18T22:01:16Z","git_url":"git://github.com/izrik/blueflood.git","ssh_url":"git@github.com:izrik/blueflood.git","clone_url":"https://github.com/izrik/blueflood.git","svn_url":"https://github.com/izrik/blueflood","homepage":"http://www.blueflood.io","size":8770,"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":"master"}},"base":{"label":"rackerlabs:master","ref":"master","sha":"ef2dde58ce9e6247f765419768d4096965fe8a77","user":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":10081109,"name":"blueflood","full_name":"rackerlabs/blueflood","owner":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackerlabs/blueflood","description":"A distributed system designed to ingest and process time series data","fork":false,"url":"https://api.github.com/repos/rackerlabs/blueflood","forks_url":"https://api.github.com/repos/rackerlabs/blueflood/forks","keys_url":"https://api.github.com/repos/rackerlabs/blueflood/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackerlabs/blueflood/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackerlabs/blueflood/teams","hooks_url":"https://api.github.com/repos/rackerlabs/blueflood/hooks","issue_events_url":"https://api.github.com/repos/rackerlabs/blueflood/issues/events{/number}","events_url":"https://api.github.com/repos/rackerlabs/blueflood/events","assignees_url":"https://api.github.com/repos/rackerlabs/blueflood/assignees{/user}","branches_url":"https://api.github.com/repos/rackerlabs/blueflood/branches{/branch}","tags_url":"https://api.github.com/repos/rackerlabs/blueflood/tags","blobs_url":"https://api.github.com/repos/rackerlabs/blueflood/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackerlabs/blueflood/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackerlabs/blueflood/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackerlabs/blueflood/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackerlabs/blueflood/statuses/{sha}","languages_url":"https://api.github.com/repos/rackerlabs/blueflood/languages","stargazers_url":"https://api.github.com/repos/rackerlabs/blueflood/stargazers","contributors_url":"https://api.github.com/repos/rackerlabs/blueflood/contributors","subscribers_url":"https://api.github.com/repos/rackerlabs/blueflood/subscribers","subscription_url":"https://api.github.com/repos/rackerlabs/blueflood/subscription","commits_url":"https://api.github.com/repos/rackerlabs/blueflood/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackerlabs/blueflood/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackerlabs/blueflood/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackerlabs/blueflood/issues/comments{/number}","contents_url":"https://api.github.com/repos/rackerlabs/blueflood/contents/{+path}","compare_url":"https://api.github.com/repos/rackerlabs/blueflood/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackerlabs/blueflood/merges","archive_url":"https://api.github.com/repos/rackerlabs/blueflood/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackerlabs/blueflood/downloads","issues_url":"https://api.github.com/repos/rackerlabs/blueflood/issues{/number}","pulls_url":"https://api.github.com/repos/rackerlabs/blueflood/pulls{/number}","milestones_url":"https://api.github.com/repos/rackerlabs/blueflood/milestones{/number}","notifications_url":"https://api.github.com/repos/rackerlabs/blueflood/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackerlabs/blueflood/labels{/name}","releases_url":"https://api.github.com/repos/rackerlabs/blueflood/releases{/id}","deployments_url":"https://api.github.com/repos/rackerlabs/blueflood/deployments","created_at":"2013-05-15T14:50:39Z","updated_at":"2016-04-15T06:35:16Z","pushed_at":"2016-04-18T21:06:04Z","git_url":"git://github.com/rackerlabs/blueflood.git","ssh_url":"git@github.com:rackerlabs/blueflood.git","clone_url":"https://github.com/rackerlabs/blueflood.git","svn_url":"https://github.com/rackerlabs/blueflood","homepage":"http://www.blueflood.io","size":12977,"stargazers_count":425,"watchers_count":425,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":59,"mirror_url":null,"open_issues_count":30,"forks":59,"open_issues":30,"watchers":425,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/blueflood/pulls/669"},"html":{"href":"https://github.com/rackerlabs/blueflood/pull/669"},"issue":{"href":"https://api.github.com/repos/rackerlabs/blueflood/issues/669"},"comments":{"href":"https://api.github.com/repos/rackerlabs/blueflood/issues/669/comments"},"review_comments":{"href":"https://api.github.com/repos/rackerlabs/blueflood/pulls/669/comments"},"review_comment":{"href":"https://api.github.com/repos/rackerlabs/blueflood/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rackerlabs/blueflood/pulls/669/commits"},"statuses":{"href":"https://api.github.com/repos/rackerlabs/blueflood/statuses/6e846240ae550d1a94b4d2fa9a6fdb6a4465181f"}}}}