{"action":"created","comment":{"url":"https://api.github.com/repos/mesosphere/marathon/pulls/comments/29571992","id":29571992,"diff_hunk":"@@ -52,4 +52,33 @@ trait MarathonCallbackTestSupport extends ExternalMarathonIntegrationTest {\n     }\n   }\n \n+  /**\n+    * Wait for the events of the given kinds (=types).\n+    */\n+  def waitForEvents(kinds: String*)(maxWait: FiniteDuration = 30.seconds): Map[String, Seq[CallbackEvent]] = {\n+\n+    val deadline = maxWait.fromNow\n+\n+    /** Receive the events for the given kinds (duplicates allowed) in any order. */\n+    val receivedEventsForKinds: Seq[CallbackEvent] = {\n+      var eventsToWaitFor = kinds\n+      var receivedEvents: Vector[CallbackEvent] = Vector()","path":"src/test/scala/mesosphere/marathon/integration/setup/MarathonCallbackTestSupport.scala","position":14,"original_position":14,"commit_id":"3f85c41486628f5969b7e44570e68fcaa4e5e678","original_commit_id":"3f85c41486628f5969b7e44570e68fcaa4e5e678","user":{"login":"drexin","id":433020,"avatar_url":"https://avatars.githubusercontent.com/u/433020?v=3","gravatar_id":"","url":"https://api.github.com/users/drexin","html_url":"https://github.com/drexin","followers_url":"https://api.github.com/users/drexin/followers","following_url":"https://api.github.com/users/drexin/following{/other_user}","gists_url":"https://api.github.com/users/drexin/gists{/gist_id}","starred_url":"https://api.github.com/users/drexin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drexin/subscriptions","organizations_url":"https://api.github.com/users/drexin/orgs","repos_url":"https://api.github.com/users/drexin/repos","events_url":"https://api.github.com/users/drexin/events{/privacy}","received_events_url":"https://api.github.com/users/drexin/received_events","type":"User","site_admin":false},"body":"Btw. does it have to be a `var`? Can't we use a `Vector.newBuilder` instead?","created_at":"2015-05-04T08:38:35Z","updated_at":"2015-05-04T08:38:35Z","html_url":"https://github.com/mesosphere/marathon/pull/1439#discussion_r29571992","pull_request_url":"https://api.github.com/repos/mesosphere/marathon/pulls/1439","_links":{"self":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/comments/29571992"},"html":{"href":"https://github.com/mesosphere/marathon/pull/1439#discussion_r29571992"},"pull_request":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/1439"}}},"pull_request":{"url":"https://api.github.com/repos/mesosphere/marathon/pulls/1439","id":34274473,"html_url":"https://github.com/mesosphere/marathon/pull/1439","diff_url":"https://github.com/mesosphere/marathon/pull/1439.diff","patch_url":"https://github.com/mesosphere/marathon/pull/1439.patch","issue_url":"https://api.github.com/repos/mesosphere/marathon/issues/1439","number":1439,"state":"open","locked":false,"title":"Fixes #1438 - Make AppDeployIntegrationTest resilient to event reordering","user":{"login":"kolloch","id":339354,"avatar_url":"https://avatars.githubusercontent.com/u/339354?v=3","gravatar_id":"","url":"https://api.github.com/users/kolloch","html_url":"https://github.com/kolloch","followers_url":"https://api.github.com/users/kolloch/followers","following_url":"https://api.github.com/users/kolloch/following{/other_user}","gists_url":"https://api.github.com/users/kolloch/gists{/gist_id}","starred_url":"https://api.github.com/users/kolloch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kolloch/subscriptions","organizations_url":"https://api.github.com/users/kolloch/orgs","repos_url":"https://api.github.com/users/kolloch/repos","events_url":"https://api.github.com/users/kolloch/events{/privacy}","received_events_url":"https://api.github.com/users/kolloch/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-28T14:47:47Z","updated_at":"2015-05-04T08:38:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7d0f8c0869c7404eaa37bc621f79d24b88839368","assignee":{"login":"aquamatthias","id":330485,"avatar_url":"https://avatars.githubusercontent.com/u/330485?v=3","gravatar_id":"","url":"https://api.github.com/users/aquamatthias","html_url":"https://github.com/aquamatthias","followers_url":"https://api.github.com/users/aquamatthias/followers","following_url":"https://api.github.com/users/aquamatthias/following{/other_user}","gists_url":"https://api.github.com/users/aquamatthias/gists{/gist_id}","starred_url":"https://api.github.com/users/aquamatthias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aquamatthias/subscriptions","organizations_url":"https://api.github.com/users/aquamatthias/orgs","repos_url":"https://api.github.com/users/aquamatthias/repos","events_url":"https://api.github.com/users/aquamatthias/events{/privacy}","received_events_url":"https://api.github.com/users/aquamatthias/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/mesosphere/marathon/milestones/16","html_url":"https://github.com/mesosphere/marathon/milestones/0.8.3","labels_url":"https://api.github.com/repos/mesosphere/marathon/milestones/16/labels","id":1042543,"number":16,"title":"0.8.3","description":"","creator":{"login":"drexin","id":433020,"avatar_url":"https://avatars.githubusercontent.com/u/433020?v=3","gravatar_id":"","url":"https://api.github.com/users/drexin","html_url":"https://github.com/drexin","followers_url":"https://api.github.com/users/drexin/followers","following_url":"https://api.github.com/users/drexin/following{/other_user}","gists_url":"https://api.github.com/users/drexin/gists{/gist_id}","starred_url":"https://api.github.com/users/drexin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drexin/subscriptions","organizations_url":"https://api.github.com/users/drexin/orgs","repos_url":"https://api.github.com/users/drexin/repos","events_url":"https://api.github.com/users/drexin/events{/privacy}","received_events_url":"https://api.github.com/users/drexin/received_events","type":"User","site_admin":false},"open_issues":24,"closed_issues":3,"state":"open","created_at":"2015-03-27T23:49:35Z","updated_at":"2015-04-30T20:10:13Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/mesosphere/marathon/pulls/1439/commits","review_comments_url":"https://api.github.com/repos/mesosphere/marathon/pulls/1439/comments","review_comment_url":"https://api.github.com/repos/mesosphere/marathon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mesosphere/marathon/issues/1439/comments","statuses_url":"https://api.github.com/repos/mesosphere/marathon/statuses/3f85c41486628f5969b7e44570e68fcaa4e5e678","head":{"label":"mesosphere:pk/itest-event-reordering","ref":"pk/itest-event-reordering","sha":"3f85c41486628f5969b7e44570e68fcaa4e5e678","user":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":10941409,"name":"marathon","full_name":"mesosphere/marathon","owner":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesosphere/marathon","description":"Deploy and manage containers (including Docker) on top of Apache Mesos at scale.","fork":false,"url":"https://api.github.com/repos/mesosphere/marathon","forks_url":"https://api.github.com/repos/mesosphere/marathon/forks","keys_url":"https://api.github.com/repos/mesosphere/marathon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesosphere/marathon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesosphere/marathon/teams","hooks_url":"https://api.github.com/repos/mesosphere/marathon/hooks","issue_events_url":"https://api.github.com/repos/mesosphere/marathon/issues/events{/number}","events_url":"https://api.github.com/repos/mesosphere/marathon/events","assignees_url":"https://api.github.com/repos/mesosphere/marathon/assignees{/user}","branches_url":"https://api.github.com/repos/mesosphere/marathon/branches{/branch}","tags_url":"https://api.github.com/repos/mesosphere/marathon/tags","blobs_url":"https://api.github.com/repos/mesosphere/marathon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesosphere/marathon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesosphere/marathon/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesosphere/marathon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesosphere/marathon/statuses/{sha}","languages_url":"https://api.github.com/repos/mesosphere/marathon/languages","stargazers_url":"https://api.github.com/repos/mesosphere/marathon/stargazers","contributors_url":"https://api.github.com/repos/mesosphere/marathon/contributors","subscribers_url":"https://api.github.com/repos/mesosphere/marathon/subscribers","subscription_url":"https://api.github.com/repos/mesosphere/marathon/subscription","commits_url":"https://api.github.com/repos/mesosphere/marathon/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesosphere/marathon/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesosphere/marathon/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesosphere/marathon/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesosphere/marathon/contents/{+path}","compare_url":"https://api.github.com/repos/mesosphere/marathon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesosphere/marathon/merges","archive_url":"https://api.github.com/repos/mesosphere/marathon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesosphere/marathon/downloads","issues_url":"https://api.github.com/repos/mesosphere/marathon/issues{/number}","pulls_url":"https://api.github.com/repos/mesosphere/marathon/pulls{/number}","milestones_url":"https://api.github.com/repos/mesosphere/marathon/milestones{/number}","notifications_url":"https://api.github.com/repos/mesosphere/marathon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesosphere/marathon/labels{/name}","releases_url":"https://api.github.com/repos/mesosphere/marathon/releases{/id}","created_at":"2013-06-25T14:56:34Z","updated_at":"2015-05-04T08:38:32Z","pushed_at":"2015-04-30T20:38:03Z","git_url":"git://github.com/mesosphere/marathon.git","ssh_url":"git@github.com:mesosphere/marathon.git","clone_url":"https://github.com/mesosphere/marathon.git","svn_url":"https://github.com/mesosphere/marathon","homepage":"https://mesosphere.github.io/marathon/","size":25708,"stargazers_count":1395,"watchers_count":1395,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":296,"mirror_url":null,"open_issues_count":214,"forks":296,"open_issues":214,"watchers":1395,"default_branch":"master"}},"base":{"label":"mesosphere:master","ref":"master","sha":"b5a22d0a79cb73bef5545c039cf40562cba402d8","user":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":10941409,"name":"marathon","full_name":"mesosphere/marathon","owner":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesosphere/marathon","description":"Deploy and manage containers (including Docker) on top of Apache Mesos at scale.","fork":false,"url":"https://api.github.com/repos/mesosphere/marathon","forks_url":"https://api.github.com/repos/mesosphere/marathon/forks","keys_url":"https://api.github.com/repos/mesosphere/marathon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesosphere/marathon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesosphere/marathon/teams","hooks_url":"https://api.github.com/repos/mesosphere/marathon/hooks","issue_events_url":"https://api.github.com/repos/mesosphere/marathon/issues/events{/number}","events_url":"https://api.github.com/repos/mesosphere/marathon/events","assignees_url":"https://api.github.com/repos/mesosphere/marathon/assignees{/user}","branches_url":"https://api.github.com/repos/mesosphere/marathon/branches{/branch}","tags_url":"https://api.github.com/repos/mesosphere/marathon/tags","blobs_url":"https://api.github.com/repos/mesosphere/marathon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesosphere/marathon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesosphere/marathon/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesosphere/marathon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesosphere/marathon/statuses/{sha}","languages_url":"https://api.github.com/repos/mesosphere/marathon/languages","stargazers_url":"https://api.github.com/repos/mesosphere/marathon/stargazers","contributors_url":"https://api.github.com/repos/mesosphere/marathon/contributors","subscribers_url":"https://api.github.com/repos/mesosphere/marathon/subscribers","subscription_url":"https://api.github.com/repos/mesosphere/marathon/subscription","commits_url":"https://api.github.com/repos/mesosphere/marathon/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesosphere/marathon/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesosphere/marathon/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesosphere/marathon/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesosphere/marathon/contents/{+path}","compare_url":"https://api.github.com/repos/mesosphere/marathon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesosphere/marathon/merges","archive_url":"https://api.github.com/repos/mesosphere/marathon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesosphere/marathon/downloads","issues_url":"https://api.github.com/repos/mesosphere/marathon/issues{/number}","pulls_url":"https://api.github.com/repos/mesosphere/marathon/pulls{/number}","milestones_url":"https://api.github.com/repos/mesosphere/marathon/milestones{/number}","notifications_url":"https://api.github.com/repos/mesosphere/marathon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesosphere/marathon/labels{/name}","releases_url":"https://api.github.com/repos/mesosphere/marathon/releases{/id}","created_at":"2013-06-25T14:56:34Z","updated_at":"2015-05-04T08:38:32Z","pushed_at":"2015-04-30T20:38:03Z","git_url":"git://github.com/mesosphere/marathon.git","ssh_url":"git@github.com:mesosphere/marathon.git","clone_url":"https://github.com/mesosphere/marathon.git","svn_url":"https://github.com/mesosphere/marathon","homepage":"https://mesosphere.github.io/marathon/","size":25708,"stargazers_count":1395,"watchers_count":1395,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":296,"mirror_url":null,"open_issues_count":214,"forks":296,"open_issues":214,"watchers":1395,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/1439"},"html":{"href":"https://github.com/mesosphere/marathon/pull/1439"},"issue":{"href":"https://api.github.com/repos/mesosphere/marathon/issues/1439"},"comments":{"href":"https://api.github.com/repos/mesosphere/marathon/issues/1439/comments"},"review_comments":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/1439/comments"},"review_comment":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/1439/commits"},"statuses":{"href":"https://api.github.com/repos/mesosphere/marathon/statuses/3f85c41486628f5969b7e44570e68fcaa4e5e678"}}}}