{"action":"created","comment":{"url":"https://api.github.com/repos/mesosphere/marathon/pulls/comments/78333774","id":78333774,"diff_hunk":"@@ -29,29 +33,56 @@ trait MarathonCallbackTestSupport extends ExternalMarathonIntegrationTest {\n     marathon.subscribe(callbackUrl)\n   }\n \n-  override def handleEvent(event: CallbackEvent): Unit = events.add(event)\n+  override def handleEvent(event: CallbackEvent): Unit = {\n+    log.info(s\"Add event to events list: $event\")\n+    events.add(event)\n+  }\n \n   def waitForEvent(kind: String, maxWait: FiniteDuration = 60.seconds): CallbackEvent = waitForEventWith(kind, _ => true, maxWait)\n \n   def waitForDeploymentId(deploymentId: String, maxWait: FiniteDuration = 30.seconds): CallbackEvent = {\n-    waitForEventWith(\"deployment_success\", _.id == deploymentId, maxWait)\n+    waitForEventWith(\"deployment_success\", { c: CallbackEvent => c.info(\"id\").toString == deploymentId }, maxWait)\n   }\n \n   def waitForChange(change: RestResult[ITDeploymentResult], maxWait: FiniteDuration = 30.seconds): CallbackEvent = {\n     waitForDeploymentId(change.value.deploymentId, maxWait)\n   }\n \n   def waitForEventMatching(description: String, maxWait: FiniteDuration = 30.seconds)(fn: CallbackEvent => Boolean): CallbackEvent = {\n-    @tailrec\n-    def nextEvent: Option[CallbackEvent] = if (events.isEmpty) None else {\n-      val event = events.poll()\n-      if (fn(event)) Some(event) else nextEvent\n+\n+    def findEvent: Option[CallbackEvent] = {","path":"src/test/scala/mesosphere/marathon/integration/setup/MarathonCallbackTestSupport.scala","position":46,"original_position":46,"commit_id":"dfea69e8311ee791ea65f3e35178e25bd7a3350f","original_commit_id":"dfea69e8311ee791ea65f3e35178e25bd7a3350f","user":{"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},"body":"I am pretty sure, there are some integration test, that rely on the fact, that not matching events are discarded.\r\nWhat is the reasoning of this change?\r\nPerhaps make a separate `waitForEventXXX` method?","created_at":"2016-09-12T08:41:50Z","updated_at":"2016-09-12T08:41:50Z","html_url":"https://github.com/mesosphere/marathon/pull/4339#discussion_r78333774","pull_request_url":"https://api.github.com/repos/mesosphere/marathon/pulls/4339","_links":{"self":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/comments/78333774"},"html":{"href":"https://github.com/mesosphere/marathon/pull/4339#discussion_r78333774"},"pull_request":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/4339"}}},"pull_request":{"url":"https://api.github.com/repos/mesosphere/marathon/pulls/4339","id":84621345,"html_url":"https://github.com/mesosphere/marathon/pull/4339","diff_url":"https://github.com/mesosphere/marathon/pull/4339.diff","patch_url":"https://github.com/mesosphere/marathon/pull/4339.patch","issue_url":"https://api.github.com/repos/mesosphere/marathon/issues/4339","number":4339,"state":"open","locked":false,"title":"Log more context in integration tests.","user":{"login":"jeschkies","id":2418440,"avatar_url":"https://avatars.githubusercontent.com/u/2418440?v=3","gravatar_id":"","url":"https://api.github.com/users/jeschkies","html_url":"https://github.com/jeschkies","followers_url":"https://api.github.com/users/jeschkies/followers","following_url":"https://api.github.com/users/jeschkies/following{/other_user}","gists_url":"https://api.github.com/users/jeschkies/gists{/gist_id}","starred_url":"https://api.github.com/users/jeschkies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeschkies/subscriptions","organizations_url":"https://api.github.com/users/jeschkies/orgs","repos_url":"https://api.github.com/users/jeschkies/repos","events_url":"https://api.github.com/users/jeschkies/events{/privacy}","received_events_url":"https://api.github.com/users/jeschkies/received_events","type":"User","site_admin":false},"body":"This is a WIP to trigger integration test and see wha'ts going on.","created_at":"2016-09-09T09:38:04Z","updated_at":"2016-09-12T08:41:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"76f8158ef154c78594521047c71fe1a3e5ca8a5b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mesosphere/marathon/pulls/4339/commits","review_comments_url":"https://api.github.com/repos/mesosphere/marathon/pulls/4339/comments","review_comment_url":"https://api.github.com/repos/mesosphere/marathon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mesosphere/marathon/issues/4339/comments","statuses_url":"https://api.github.com/repos/mesosphere/marathon/statuses/dfea69e8311ee791ea65f3e35178e25bd7a3350f","head":{"label":"mesosphere:karsten/feature/pods-integ-tests","ref":"karsten/feature/pods-integ-tests","sha":"dfea69e8311ee791ea65f3e35178e25bd7a3350f","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}","deployments_url":"https://api.github.com/repos/mesosphere/marathon/deployments","created_at":"2013-06-25T14:56:34Z","updated_at":"2016-09-12T08:02:06Z","pushed_at":"2016-09-12T08:35:18Z","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":30474,"stargazers_count":2766,"watchers_count":2766,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":614,"mirror_url":null,"open_issues_count":689,"forks":614,"open_issues":689,"watchers":2766,"default_branch":"master"}},"base":{"label":"mesosphere:feature/pods","ref":"feature/pods","sha":"7e317efeebe4d15c8287403b5d4e5bd15ee037aa","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}","deployments_url":"https://api.github.com/repos/mesosphere/marathon/deployments","created_at":"2013-06-25T14:56:34Z","updated_at":"2016-09-12T08:02:06Z","pushed_at":"2016-09-12T08:35:18Z","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":30474,"stargazers_count":2766,"watchers_count":2766,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":614,"mirror_url":null,"open_issues_count":689,"forks":614,"open_issues":689,"watchers":2766,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/4339"},"html":{"href":"https://github.com/mesosphere/marathon/pull/4339"},"issue":{"href":"https://api.github.com/repos/mesosphere/marathon/issues/4339"},"comments":{"href":"https://api.github.com/repos/mesosphere/marathon/issues/4339/comments"},"review_comments":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/4339/comments"},"review_comment":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/4339/commits"},"statuses":{"href":"https://api.github.com/repos/mesosphere/marathon/statuses/dfea69e8311ee791ea65f3e35178e25bd7a3350f"}}}}
{"actor":{"display_login":"aquamatthias"}}