{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/27089093","id":27089093,"diff_hunk":"@@ -68,26 +68,32 @@ func TestGetSetPods(t *testing.T) {\n \tupdates := append(expectedPods, mirrorPod)\n \tpodManager, _ := newFakePodManager()\n \tpodManager.SetPods(updates)\n+\n+\t// Tests that all regular pods are recorded corrrectly.\n \tactualPods := podManager.GetPods()\n-\tif !reflect.DeepEqual(expectedPods, actualPods) {\n-\t\tt.Errorf(\"pods are not set correctly; expected %#v, got %#v\", expectedPods, actualPods)\n-\t}\n-\tactualPod, ok := podManager.mirrorPodByUID[mirrorPod.UID]\n-\tif !ok {\n-\t\tt.Errorf(\"mirror pod %q is not found in the mirror pod map by UID\", mirrorPod.UID)\n-\t} else if !reflect.DeepEqual(&mirrorPod, actualPod) {\n-\t\tt.Errorf(\"mirror pod is recorded incorrectly. expect: %v, got: %v\", mirrorPod, actualPod)\n-\t}\n-\tactualPod, ok = podManager.mirrorPodByFullName[GetPodFullName(&mirrorPod)]\n-\tif !ok {\n-\t\tt.Errorf(\"mirror pod %q is not found in the mirror pod map by full name\", GetPodFullName(&mirrorPod))\n-\t} else if !reflect.DeepEqual(&mirrorPod, actualPod) {\n-\t\tt.Errorf(\"mirror pod is recorded incorrectly. expect: %v, got: %v\", mirrorPod, actualPod)\n+\tfor _, expected := range expectedPods {\n+\t\tfound := false\n+\t\tfor _, actual := range actualPods {\n+\t\t\tif actual.UID == expected.UID {\n+\t\t\t\tif !reflect.DeepEqual(&expected, &actual) {\n+\t\t\t\t\tt.Errorf(\"pod was recorded incorrectly. expect: %v, got: %v\", expected, actual)\n+\t\t\t\t}\n+\t\t\t\tfound = true\n+\t\t\t\tbreak\n+\t\t\t}\n+\t\t}\n+\t\tif !found {\n+\t\t\tt.Errorf(\"pod %q was not found in the pod manager\", expected.UID)","path":"pkg/kubelet/pod_manager_test.go","position":null,"original_position":33,"commit_id":"ff3d36edc53ff889c81316dacb78fdff7162033c","original_commit_id":"6d37b16ff8d920e9447af1f6d9601fa5e6bebe42","user":{"login":"yujuhong","id":10524058,"avatar_url":"https://avatars.githubusercontent.com/u/10524058?v=3","gravatar_id":"","url":"https://api.github.com/users/yujuhong","html_url":"https://github.com/yujuhong","followers_url":"https://api.github.com/users/yujuhong/followers","following_url":"https://api.github.com/users/yujuhong/following{/other_user}","gists_url":"https://api.github.com/users/yujuhong/gists{/gist_id}","starred_url":"https://api.github.com/users/yujuhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yujuhong/subscriptions","organizations_url":"https://api.github.com/users/yujuhong/orgs","repos_url":"https://api.github.com/users/yujuhong/repos","events_url":"https://api.github.com/users/yujuhong/events{/privacy}","received_events_url":"https://api.github.com/users/yujuhong/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2015-03-25T01:30:07Z","updated_at":"2015-03-25T01:30:07Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/5894#discussion_r27089093","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/5894","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/27089093"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/5894#discussion_r27089093"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/5894"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/5894","id":31885352,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/5894","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/5894.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/5894.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/5894","number":5894,"state":"open","locked":false,"title":"Fix flakey TestGetSetPods","user":{"login":"yujuhong","id":10524058,"avatar_url":"https://avatars.githubusercontent.com/u/10524058?v=3","gravatar_id":"","url":"https://api.github.com/users/yujuhong","html_url":"https://github.com/yujuhong","followers_url":"https://api.github.com/users/yujuhong/followers","following_url":"https://api.github.com/users/yujuhong/following{/other_user}","gists_url":"https://api.github.com/users/yujuhong/gists{/gist_id}","starred_url":"https://api.github.com/users/yujuhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yujuhong/subscriptions","organizations_url":"https://api.github.com/users/yujuhong/orgs","repos_url":"https://api.github.com/users/yujuhong/repos","events_url":"https://api.github.com/users/yujuhong/events{/privacy}","received_events_url":"https://api.github.com/users/yujuhong/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-25T01:08:08Z","updated_at":"2015-03-25T01:30:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9cd0fc4f4b770d8b7c26ae2cc1ddab8b4cab5947","assignee":{"login":"vmarmol","id":985208,"avatar_url":"https://avatars.githubusercontent.com/u/985208?v=3","gravatar_id":"","url":"https://api.github.com/users/vmarmol","html_url":"https://github.com/vmarmol","followers_url":"https://api.github.com/users/vmarmol/followers","following_url":"https://api.github.com/users/vmarmol/following{/other_user}","gists_url":"https://api.github.com/users/vmarmol/gists{/gist_id}","starred_url":"https://api.github.com/users/vmarmol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmarmol/subscriptions","organizations_url":"https://api.github.com/users/vmarmol/orgs","repos_url":"https://api.github.com/users/vmarmol/repos","events_url":"https://api.github.com/users/vmarmol/events{/privacy}","received_events_url":"https://api.github.com/users/vmarmol/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/5894/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/5894/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/5894/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/ff3d36edc53ff889c81316dacb78fdff7162033c","head":{"label":"yujuhong:fix_order","ref":"fix_order","sha":"ff3d36edc53ff889c81316dacb78fdff7162033c","user":{"login":"yujuhong","id":10524058,"avatar_url":"https://avatars.githubusercontent.com/u/10524058?v=3","gravatar_id":"","url":"https://api.github.com/users/yujuhong","html_url":"https://github.com/yujuhong","followers_url":"https://api.github.com/users/yujuhong/followers","following_url":"https://api.github.com/users/yujuhong/following{/other_user}","gists_url":"https://api.github.com/users/yujuhong/gists{/gist_id}","starred_url":"https://api.github.com/users/yujuhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yujuhong/subscriptions","organizations_url":"https://api.github.com/users/yujuhong/orgs","repos_url":"https://api.github.com/users/yujuhong/repos","events_url":"https://api.github.com/users/yujuhong/events{/privacy}","received_events_url":"https://api.github.com/users/yujuhong/received_events","type":"User","site_admin":false},"repo":{"id":29618390,"name":"kubernetes","full_name":"yujuhong/kubernetes","owner":{"login":"yujuhong","id":10524058,"avatar_url":"https://avatars.githubusercontent.com/u/10524058?v=3","gravatar_id":"","url":"https://api.github.com/users/yujuhong","html_url":"https://github.com/yujuhong","followers_url":"https://api.github.com/users/yujuhong/followers","following_url":"https://api.github.com/users/yujuhong/following{/other_user}","gists_url":"https://api.github.com/users/yujuhong/gists{/gist_id}","starred_url":"https://api.github.com/users/yujuhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yujuhong/subscriptions","organizations_url":"https://api.github.com/users/yujuhong/orgs","repos_url":"https://api.github.com/users/yujuhong/repos","events_url":"https://api.github.com/users/yujuhong/events{/privacy}","received_events_url":"https://api.github.com/users/yujuhong/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yujuhong/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/yujuhong/kubernetes","forks_url":"https://api.github.com/repos/yujuhong/kubernetes/forks","keys_url":"https://api.github.com/repos/yujuhong/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yujuhong/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yujuhong/kubernetes/teams","hooks_url":"https://api.github.com/repos/yujuhong/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/yujuhong/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/yujuhong/kubernetes/events","assignees_url":"https://api.github.com/repos/yujuhong/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/yujuhong/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/yujuhong/kubernetes/tags","blobs_url":"https://api.github.com/repos/yujuhong/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yujuhong/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yujuhong/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/yujuhong/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yujuhong/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/yujuhong/kubernetes/languages","stargazers_url":"https://api.github.com/repos/yujuhong/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/yujuhong/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/yujuhong/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/yujuhong/kubernetes/subscription","commits_url":"https://api.github.com/repos/yujuhong/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/yujuhong/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/yujuhong/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/yujuhong/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/yujuhong/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/yujuhong/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yujuhong/kubernetes/merges","archive_url":"https://api.github.com/repos/yujuhong/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yujuhong/kubernetes/downloads","issues_url":"https://api.github.com/repos/yujuhong/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/yujuhong/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/yujuhong/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/yujuhong/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yujuhong/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/yujuhong/kubernetes/releases{/id}","created_at":"2015-01-21T21:45:40Z","updated_at":"2015-03-24T22:40:39Z","pushed_at":"2015-03-25T01:29:45Z","git_url":"git://github.com/yujuhong/kubernetes.git","ssh_url":"git@github.com:yujuhong/kubernetes.git","clone_url":"https://github.com/yujuhong/kubernetes.git","svn_url":"https://github.com/yujuhong/kubernetes","homepage":"http://kubernetes.io","size":38671,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"a9c9d27fdd22a80e9b4993296e9e60e6db3837a4","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"GoogleCloudPlatform/kubernetes","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-03-25T01:09:32Z","pushed_at":"2015-03-25T01:29:45Z","git_url":"git://github.com/GoogleCloudPlatform/kubernetes.git","ssh_url":"git@github.com:GoogleCloudPlatform/kubernetes.git","clone_url":"https://github.com/GoogleCloudPlatform/kubernetes.git","svn_url":"https://github.com/GoogleCloudPlatform/kubernetes","homepage":"http://kubernetes.io","size":114037,"stargazers_count":6732,"watchers_count":6732,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1267,"mirror_url":null,"open_issues_count":805,"forks":1267,"open_issues":805,"watchers":6732,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/5894"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/5894"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/5894"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/5894/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/5894/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/5894/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/ff3d36edc53ff889c81316dacb78fdff7162033c"}}}}