{"action":"created","comment":{"url":"https://api.github.com/repos/grpc/grpc.github.io/pulls/comments/190677184","pull_request_review_id":123105956,"id":190677184,"diff_hunk":"@@ -0,0 +1,111 @@\n+---\n+layout: post\n+title: Let's gracefully clean up in gRPC JUnit tests\n+published: false\n+permalink: blog/gracefully_clean_up_in_grpc_junit_tests\n+author: Dapeng Zhang\n+company: Google\n+company-link: https://www.google.com\n+---\n+\n+As a good programmer, it's important that you remember to always clean up gRPC resources such as client channels, servers, and previously attached Contexts whenever they are no longer needed. This is even true for JUnit tests, because otherwise leaked resource will not only linger in your machine forever in some cases but also interfere with subsequent tests. A not-so-bad case is that subsequent tests can not pass because of the leaked resource in the previous test. The worst case is that some subsequent tests pass but in fact they wouldn't have passed if the previously passed test had not leaked resource.\n+\n+<!--more-->\n+\n+So cleanup, cleanup, cleanup...\\","path":"_posts/2018-05-23-gracefully_clean_up_in_grpc_junit_tests.md","position":15,"original_position":15,"commit_id":"19ed6ed8f0229ac7a5a231412876e019d416327a","original_commit_id":"19ed6ed8f0229ac7a5a231412876e019d416327a","user":{"login":"dapengzhang0","id":4779759,"avatar_url":"https://avatars2.githubusercontent.com/u/4779759?v=4","gravatar_id":"","url":"https://api.github.com/users/dapengzhang0","html_url":"https://github.com/dapengzhang0","followers_url":"https://api.github.com/users/dapengzhang0/followers","following_url":"https://api.github.com/users/dapengzhang0/following{/other_user}","gists_url":"https://api.github.com/users/dapengzhang0/gists{/gist_id}","starred_url":"https://api.github.com/users/dapengzhang0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dapengzhang0/subscriptions","organizations_url":"https://api.github.com/users/dapengzhang0/orgs","repos_url":"https://api.github.com/users/dapengzhang0/repos","events_url":"https://api.github.com/users/dapengzhang0/events{/privacy}","received_events_url":"https://api.github.com/users/dapengzhang0/received_events","type":"User","site_admin":false},"body":"This is a line break in markdown\r\nhttps://spec.commonmark.org/0.28/#hard-line-break","created_at":"2018-05-24T17:57:53Z","updated_at":"2018-05-24T17:57:53Z","html_url":"https://github.com/grpc/grpc.github.io/pull/669#discussion_r190677184","pull_request_url":"https://api.github.com/repos/grpc/grpc.github.io/pulls/669","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc.github.io/pulls/comments/190677184"},"html":{"href":"https://github.com/grpc/grpc.github.io/pull/669#discussion_r190677184"},"pull_request":{"href":"https://api.github.com/repos/grpc/grpc.github.io/pulls/669"}},"in_reply_to_id":190674921},"pull_request":{"url":"https://api.github.com/repos/grpc/grpc.github.io/pulls/669","id":190133643,"html_url":"https://github.com/grpc/grpc.github.io/pull/669","diff_url":"https://github.com/grpc/grpc.github.io/pull/669.diff","patch_url":"https://github.com/grpc/grpc.github.io/pull/669.patch","issue_url":"https://api.github.com/repos/grpc/grpc.github.io/issues/669","number":669,"state":"open","locked":false,"title":"blogpost: gracefully clean up in gRPC JUnit tests","user":{"login":"dapengzhang0","id":4779759,"avatar_url":"https://avatars2.githubusercontent.com/u/4779759?v=4","gravatar_id":"","url":"https://api.github.com/users/dapengzhang0","html_url":"https://github.com/dapengzhang0","followers_url":"https://api.github.com/users/dapengzhang0/followers","following_url":"https://api.github.com/users/dapengzhang0/following{/other_user}","gists_url":"https://api.github.com/users/dapengzhang0/gists{/gist_id}","starred_url":"https://api.github.com/users/dapengzhang0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dapengzhang0/subscriptions","organizations_url":"https://api.github.com/users/dapengzhang0/orgs","repos_url":"https://api.github.com/users/dapengzhang0/repos","events_url":"https://api.github.com/users/dapengzhang0/events{/privacy}","received_events_url":"https://api.github.com/users/dapengzhang0/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-23T23:39:24Z","updated_at":"2018-05-24T17:57:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"31748ddcc2abc4537b46d1966641f6ffa483bce7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/grpc/grpc.github.io/pulls/669/commits","review_comments_url":"https://api.github.com/repos/grpc/grpc.github.io/pulls/669/comments","review_comment_url":"https://api.github.com/repos/grpc/grpc.github.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grpc/grpc.github.io/issues/669/comments","statuses_url":"https://api.github.com/repos/grpc/grpc.github.io/statuses/19ed6ed8f0229ac7a5a231412876e019d416327a","head":{"label":"dapengzhang0:patch-1","ref":"patch-1","sha":"19ed6ed8f0229ac7a5a231412876e019d416327a","user":{"login":"dapengzhang0","id":4779759,"avatar_url":"https://avatars2.githubusercontent.com/u/4779759?v=4","gravatar_id":"","url":"https://api.github.com/users/dapengzhang0","html_url":"https://github.com/dapengzhang0","followers_url":"https://api.github.com/users/dapengzhang0/followers","following_url":"https://api.github.com/users/dapengzhang0/following{/other_user}","gists_url":"https://api.github.com/users/dapengzhang0/gists{/gist_id}","starred_url":"https://api.github.com/users/dapengzhang0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dapengzhang0/subscriptions","organizations_url":"https://api.github.com/users/dapengzhang0/orgs","repos_url":"https://api.github.com/users/dapengzhang0/repos","events_url":"https://api.github.com/users/dapengzhang0/events{/privacy}","received_events_url":"https://api.github.com/users/dapengzhang0/received_events","type":"User","site_admin":false},"repo":{"id":64152459,"name":"grpc.github.io","full_name":"dapengzhang0/grpc.github.io","owner":{"login":"dapengzhang0","id":4779759,"avatar_url":"https://avatars2.githubusercontent.com/u/4779759?v=4","gravatar_id":"","url":"https://api.github.com/users/dapengzhang0","html_url":"https://github.com/dapengzhang0","followers_url":"https://api.github.com/users/dapengzhang0/followers","following_url":"https://api.github.com/users/dapengzhang0/following{/other_user}","gists_url":"https://api.github.com/users/dapengzhang0/gists{/gist_id}","starred_url":"https://api.github.com/users/dapengzhang0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dapengzhang0/subscriptions","organizations_url":"https://api.github.com/users/dapengzhang0/orgs","repos_url":"https://api.github.com/users/dapengzhang0/repos","events_url":"https://api.github.com/users/dapengzhang0/events{/privacy}","received_events_url":"https://api.github.com/users/dapengzhang0/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dapengzhang0/grpc.github.io","description":"The grpc.io website. (on GitHub pages)","fork":true,"url":"https://api.github.com/repos/dapengzhang0/grpc.github.io","forks_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/forks","keys_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/teams","hooks_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/hooks","issue_events_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/events","assignees_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/tags","blobs_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/languages","stargazers_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/stargazers","contributors_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/contributors","subscribers_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/subscribers","subscription_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/subscription","commits_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/merges","archive_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/downloads","issues_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/labels{/name}","releases_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/releases{/id}","deployments_url":"https://api.github.com/repos/dapengzhang0/grpc.github.io/deployments","created_at":"2016-07-25T16:58:52Z","updated_at":"2016-07-25T16:58:53Z","pushed_at":"2018-05-24T17:22:20Z","git_url":"git://github.com/dapengzhang0/grpc.github.io.git","ssh_url":"git@github.com:dapengzhang0/grpc.github.io.git","clone_url":"https://github.com/dapengzhang0/grpc.github.io.git","svn_url":"https://github.com/dapengzhang0/grpc.github.io","homepage":"","size":5257,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"grpc:master","ref":"master","sha":"81512395aa7aac5be556c0d5f485513042b97395","user":{"login":"grpc","id":7802525,"avatar_url":"https://avatars1.githubusercontent.com/u/7802525?v=4","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"repo":{"id":30666740,"name":"grpc.github.io","full_name":"grpc/grpc.github.io","owner":{"login":"grpc","id":7802525,"avatar_url":"https://avatars1.githubusercontent.com/u/7802525?v=4","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/grpc/grpc.github.io","description":"The grpc.io website. (on GitHub pages)","fork":false,"url":"https://api.github.com/repos/grpc/grpc.github.io","forks_url":"https://api.github.com/repos/grpc/grpc.github.io/forks","keys_url":"https://api.github.com/repos/grpc/grpc.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grpc/grpc.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grpc/grpc.github.io/teams","hooks_url":"https://api.github.com/repos/grpc/grpc.github.io/hooks","issue_events_url":"https://api.github.com/repos/grpc/grpc.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/grpc/grpc.github.io/events","assignees_url":"https://api.github.com/repos/grpc/grpc.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/grpc/grpc.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/grpc/grpc.github.io/tags","blobs_url":"https://api.github.com/repos/grpc/grpc.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grpc/grpc.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grpc/grpc.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/grpc/grpc.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grpc/grpc.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/grpc/grpc.github.io/languages","stargazers_url":"https://api.github.com/repos/grpc/grpc.github.io/stargazers","contributors_url":"https://api.github.com/repos/grpc/grpc.github.io/contributors","subscribers_url":"https://api.github.com/repos/grpc/grpc.github.io/subscribers","subscription_url":"https://api.github.com/repos/grpc/grpc.github.io/subscription","commits_url":"https://api.github.com/repos/grpc/grpc.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/grpc/grpc.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/grpc/grpc.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/grpc/grpc.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/grpc/grpc.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/grpc/grpc.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grpc/grpc.github.io/merges","archive_url":"https://api.github.com/repos/grpc/grpc.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grpc/grpc.github.io/downloads","issues_url":"https://api.github.com/repos/grpc/grpc.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/grpc/grpc.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/grpc/grpc.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/grpc/grpc.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grpc/grpc.github.io/labels{/name}","releases_url":"https://api.github.com/repos/grpc/grpc.github.io/releases{/id}","deployments_url":"https://api.github.com/repos/grpc/grpc.github.io/deployments","created_at":"2015-02-11T19:55:59Z","updated_at":"2018-05-21T16:20:19Z","pushed_at":"2018-05-24T17:22:20Z","git_url":"git://github.com/grpc/grpc.github.io.git","ssh_url":"git@github.com:grpc/grpc.github.io.git","clone_url":"https://github.com/grpc/grpc.github.io.git","svn_url":"https://github.com/grpc/grpc.github.io","homepage":"","size":5259,"stargazers_count":174,"watchers_count":174,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":316,"mirror_url":null,"archived":false,"open_issues_count":64,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":316,"open_issues":64,"watchers":174,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc.github.io/pulls/669"},"html":{"href":"https://github.com/grpc/grpc.github.io/pull/669"},"issue":{"href":"https://api.github.com/repos/grpc/grpc.github.io/issues/669"},"comments":{"href":"https://api.github.com/repos/grpc/grpc.github.io/issues/669/comments"},"review_comments":{"href":"https://api.github.com/repos/grpc/grpc.github.io/pulls/669/comments"},"review_comment":{"href":"https://api.github.com/repos/grpc/grpc.github.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grpc/grpc.github.io/pulls/669/commits"},"statuses":{"href":"https://api.github.com/repos/grpc/grpc.github.io/statuses/19ed6ed8f0229ac7a5a231412876e019d416327a"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"dapengzhang0"}}