{"action":"created","comment":{"url":"https://api.github.com/repos/netty/netty/pulls/comments/33624851","id":33624851,"diff_hunk":"@@ -0,0 +1,132 @@\n+/*\n+ * Copyright 2015 The Netty Project\n+ *\n+ * The Netty Project licenses this file to you under the Apache License, version 2.0 (the\n+ * \"License\"); you may not use this file except in compliance with the License. You may obtain a\n+ * copy of the License at:\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software distributed under the License\n+ * is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n+ * or implied. See the License for the specific language governing permissions and limitations under\n+ * the License.\n+ */\n+package io.netty.channel;\n+\n+import io.netty.buffer.ByteBuf;\n+import io.netty.buffer.PooledByteBufAllocator;\n+import io.netty.buffer.Unpooled;\n+import io.netty.util.concurrent.ImmediateEventExecutor;\n+import org.junit.Before;\n+import org.junit.Test;\n+import org.mockito.Mock;\n+import org.mockito.MockitoAnnotations;\n+\n+import java.nio.charset.Charset;\n+\n+import static junit.framework.Assert.assertSame;\n+import static org.junit.Assert.assertEquals;\n+import static org.junit.Assert.assertFalse;\n+import static org.junit.Assert.assertTrue;\n+\n+/**\n+ * Tests for {@link CoalescingBufferQueue}.\n+ */\n+public class CoalescingBufferQueueTest {\n+\n+    public ByteBuf cat = Unpooled.wrappedBuffer(\"cat\".getBytes(Charset.defaultCharset()));\n+    public ByteBuf mouse = Unpooled.wrappedBuffer(\"mouse\".getBytes(Charset.defaultCharset()));\n+\n+    ChannelPromise catPromise, mousePromise;","path":"transport/src/test/java/io/netty/channel/CoalescingBufferQueueTest.java","position":41,"original_position":41,"commit_id":"e55c6f7e20f62b4d5e43d7a79c32b207f389359e","original_commit_id":"e55c6f7e20f62b4d5e43d7a79c32b207f389359e","user":{"login":"louiscryan","id":9046588,"avatar_url":"https://avatars.githubusercontent.com/u/9046588?v=3","gravatar_id":"","url":"https://api.github.com/users/louiscryan","html_url":"https://github.com/louiscryan","followers_url":"https://api.github.com/users/louiscryan/followers","following_url":"https://api.github.com/users/louiscryan/following{/other_user}","gists_url":"https://api.github.com/users/louiscryan/gists{/gist_id}","starred_url":"https://api.github.com/users/louiscryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/louiscryan/subscriptions","organizations_url":"https://api.github.com/users/louiscryan/orgs","repos_url":"https://api.github.com/users/louiscryan/repos","events_url":"https://api.github.com/users/louiscryan/events{/privacy}","received_events_url":"https://api.github.com/users/louiscryan/received_events","type":"User","site_admin":false},"body":"Done","created_at":"2015-06-30T21:17:59Z","updated_at":"2015-06-30T21:17:59Z","html_url":"https://github.com/netty/netty/pull/3926#discussion_r33624851","pull_request_url":"https://api.github.com/repos/netty/netty/pulls/3926","_links":{"self":{"href":"https://api.github.com/repos/netty/netty/pulls/comments/33624851"},"html":{"href":"https://github.com/netty/netty/pull/3926#discussion_r33624851"},"pull_request":{"href":"https://api.github.com/repos/netty/netty/pulls/3926"}}},"pull_request":{"url":"https://api.github.com/repos/netty/netty/pulls/3926","id":38916605,"html_url":"https://github.com/netty/netty/pull/3926","diff_url":"https://github.com/netty/netty/pull/3926.diff","patch_url":"https://github.com/netty/netty/pull/3926.patch","issue_url":"https://api.github.com/repos/netty/netty/issues/3926","number":3926,"state":"open","locked":false,"title":"Utility for enqueuing buffers with promises and dequeueing them in arbitrary chunks","user":{"login":"louiscryan","id":9046588,"avatar_url":"https://avatars.githubusercontent.com/u/9046588?v=3","gravatar_id":"","url":"https://api.github.com/users/louiscryan","html_url":"https://github.com/louiscryan","followers_url":"https://api.github.com/users/louiscryan/followers","following_url":"https://api.github.com/users/louiscryan/following{/other_user}","gists_url":"https://api.github.com/users/louiscryan/gists{/gist_id}","starred_url":"https://api.github.com/users/louiscryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/louiscryan/subscriptions","organizations_url":"https://api.github.com/users/louiscryan/orgs","repos_url":"https://api.github.com/users/louiscryan/repos","events_url":"https://api.github.com/users/louiscryan/events{/privacy}","received_events_url":"https://api.github.com/users/louiscryan/received_events","type":"User","site_admin":false},"body":"@Scottmitch @nmittler @normanmaurer \r\n\r\nUtility for enqueuing buffers with promises and dequeueing them in arbitrary chunks such that when the last byte of a buffer is dequeued its enqueued promise will complete when the promise used to dequeue it completes.","created_at":"2015-06-30T19:46:32Z","updated_at":"2015-06-30T21:17:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"09b9aedc9e38338101679261040848e373809b3a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/netty/netty/pulls/3926/commits","review_comments_url":"https://api.github.com/repos/netty/netty/pulls/3926/comments","review_comment_url":"https://api.github.com/repos/netty/netty/pulls/comments{/number}","comments_url":"https://api.github.com/repos/netty/netty/issues/3926/comments","statuses_url":"https://api.github.com/repos/netty/netty/statuses/e55c6f7e20f62b4d5e43d7a79c32b207f389359e","head":{"label":"louiscryan:AggregatingWriteQueue","ref":"AggregatingWriteQueue","sha":"e55c6f7e20f62b4d5e43d7a79c32b207f389359e","user":{"login":"louiscryan","id":9046588,"avatar_url":"https://avatars.githubusercontent.com/u/9046588?v=3","gravatar_id":"","url":"https://api.github.com/users/louiscryan","html_url":"https://github.com/louiscryan","followers_url":"https://api.github.com/users/louiscryan/followers","following_url":"https://api.github.com/users/louiscryan/following{/other_user}","gists_url":"https://api.github.com/users/louiscryan/gists{/gist_id}","starred_url":"https://api.github.com/users/louiscryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/louiscryan/subscriptions","organizations_url":"https://api.github.com/users/louiscryan/orgs","repos_url":"https://api.github.com/users/louiscryan/repos","events_url":"https://api.github.com/users/louiscryan/events{/privacy}","received_events_url":"https://api.github.com/users/louiscryan/received_events","type":"User","site_admin":false},"repo":{"id":29745959,"name":"netty","full_name":"louiscryan/netty","owner":{"login":"louiscryan","id":9046588,"avatar_url":"https://avatars.githubusercontent.com/u/9046588?v=3","gravatar_id":"","url":"https://api.github.com/users/louiscryan","html_url":"https://github.com/louiscryan","followers_url":"https://api.github.com/users/louiscryan/followers","following_url":"https://api.github.com/users/louiscryan/following{/other_user}","gists_url":"https://api.github.com/users/louiscryan/gists{/gist_id}","starred_url":"https://api.github.com/users/louiscryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/louiscryan/subscriptions","organizations_url":"https://api.github.com/users/louiscryan/orgs","repos_url":"https://api.github.com/users/louiscryan/repos","events_url":"https://api.github.com/users/louiscryan/events{/privacy}","received_events_url":"https://api.github.com/users/louiscryan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/louiscryan/netty","description":"Netty project - an event-driven asynchronous network application framework","fork":true,"url":"https://api.github.com/repos/louiscryan/netty","forks_url":"https://api.github.com/repos/louiscryan/netty/forks","keys_url":"https://api.github.com/repos/louiscryan/netty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/louiscryan/netty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/louiscryan/netty/teams","hooks_url":"https://api.github.com/repos/louiscryan/netty/hooks","issue_events_url":"https://api.github.com/repos/louiscryan/netty/issues/events{/number}","events_url":"https://api.github.com/repos/louiscryan/netty/events","assignees_url":"https://api.github.com/repos/louiscryan/netty/assignees{/user}","branches_url":"https://api.github.com/repos/louiscryan/netty/branches{/branch}","tags_url":"https://api.github.com/repos/louiscryan/netty/tags","blobs_url":"https://api.github.com/repos/louiscryan/netty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/louiscryan/netty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/louiscryan/netty/git/refs{/sha}","trees_url":"https://api.github.com/repos/louiscryan/netty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/louiscryan/netty/statuses/{sha}","languages_url":"https://api.github.com/repos/louiscryan/netty/languages","stargazers_url":"https://api.github.com/repos/louiscryan/netty/stargazers","contributors_url":"https://api.github.com/repos/louiscryan/netty/contributors","subscribers_url":"https://api.github.com/repos/louiscryan/netty/subscribers","subscription_url":"https://api.github.com/repos/louiscryan/netty/subscription","commits_url":"https://api.github.com/repos/louiscryan/netty/commits{/sha}","git_commits_url":"https://api.github.com/repos/louiscryan/netty/git/commits{/sha}","comments_url":"https://api.github.com/repos/louiscryan/netty/comments{/number}","issue_comment_url":"https://api.github.com/repos/louiscryan/netty/issues/comments{/number}","contents_url":"https://api.github.com/repos/louiscryan/netty/contents/{+path}","compare_url":"https://api.github.com/repos/louiscryan/netty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/louiscryan/netty/merges","archive_url":"https://api.github.com/repos/louiscryan/netty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/louiscryan/netty/downloads","issues_url":"https://api.github.com/repos/louiscryan/netty/issues{/number}","pulls_url":"https://api.github.com/repos/louiscryan/netty/pulls{/number}","milestones_url":"https://api.github.com/repos/louiscryan/netty/milestones{/number}","notifications_url":"https://api.github.com/repos/louiscryan/netty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/louiscryan/netty/labels{/name}","releases_url":"https://api.github.com/repos/louiscryan/netty/releases{/id}","created_at":"2015-01-23T18:13:14Z","updated_at":"2015-05-04T20:10:55Z","pushed_at":"2015-06-30T19:46:45Z","git_url":"git://github.com/louiscryan/netty.git","ssh_url":"git@github.com:louiscryan/netty.git","clone_url":"https://github.com/louiscryan/netty.git","svn_url":"https://github.com/louiscryan/netty","homepage":"http://netty.io/","size":42217,"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":"netty:master","ref":"master","sha":"c15aa42d3201f9183ee9f2d89b32f6e808dc953e","user":{"login":"netty","id":473791,"avatar_url":"https://avatars.githubusercontent.com/u/473791?v=3","gravatar_id":"","url":"https://api.github.com/users/netty","html_url":"https://github.com/netty","followers_url":"https://api.github.com/users/netty/followers","following_url":"https://api.github.com/users/netty/following{/other_user}","gists_url":"https://api.github.com/users/netty/gists{/gist_id}","starred_url":"https://api.github.com/users/netty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netty/subscriptions","organizations_url":"https://api.github.com/users/netty/orgs","repos_url":"https://api.github.com/users/netty/repos","events_url":"https://api.github.com/users/netty/events{/privacy}","received_events_url":"https://api.github.com/users/netty/received_events","type":"Organization","site_admin":false},"repo":{"id":1064563,"name":"netty","full_name":"netty/netty","owner":{"login":"netty","id":473791,"avatar_url":"https://avatars.githubusercontent.com/u/473791?v=3","gravatar_id":"","url":"https://api.github.com/users/netty","html_url":"https://github.com/netty","followers_url":"https://api.github.com/users/netty/followers","following_url":"https://api.github.com/users/netty/following{/other_user}","gists_url":"https://api.github.com/users/netty/gists{/gist_id}","starred_url":"https://api.github.com/users/netty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netty/subscriptions","organizations_url":"https://api.github.com/users/netty/orgs","repos_url":"https://api.github.com/users/netty/repos","events_url":"https://api.github.com/users/netty/events{/privacy}","received_events_url":"https://api.github.com/users/netty/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/netty/netty","description":"Netty project - an event-driven asynchronous network application framework","fork":false,"url":"https://api.github.com/repos/netty/netty","forks_url":"https://api.github.com/repos/netty/netty/forks","keys_url":"https://api.github.com/repos/netty/netty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/netty/netty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/netty/netty/teams","hooks_url":"https://api.github.com/repos/netty/netty/hooks","issue_events_url":"https://api.github.com/repos/netty/netty/issues/events{/number}","events_url":"https://api.github.com/repos/netty/netty/events","assignees_url":"https://api.github.com/repos/netty/netty/assignees{/user}","branches_url":"https://api.github.com/repos/netty/netty/branches{/branch}","tags_url":"https://api.github.com/repos/netty/netty/tags","blobs_url":"https://api.github.com/repos/netty/netty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/netty/netty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/netty/netty/git/refs{/sha}","trees_url":"https://api.github.com/repos/netty/netty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/netty/netty/statuses/{sha}","languages_url":"https://api.github.com/repos/netty/netty/languages","stargazers_url":"https://api.github.com/repos/netty/netty/stargazers","contributors_url":"https://api.github.com/repos/netty/netty/contributors","subscribers_url":"https://api.github.com/repos/netty/netty/subscribers","subscription_url":"https://api.github.com/repos/netty/netty/subscription","commits_url":"https://api.github.com/repos/netty/netty/commits{/sha}","git_commits_url":"https://api.github.com/repos/netty/netty/git/commits{/sha}","comments_url":"https://api.github.com/repos/netty/netty/comments{/number}","issue_comment_url":"https://api.github.com/repos/netty/netty/issues/comments{/number}","contents_url":"https://api.github.com/repos/netty/netty/contents/{+path}","compare_url":"https://api.github.com/repos/netty/netty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/netty/netty/merges","archive_url":"https://api.github.com/repos/netty/netty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/netty/netty/downloads","issues_url":"https://api.github.com/repos/netty/netty/issues{/number}","pulls_url":"https://api.github.com/repos/netty/netty/pulls{/number}","milestones_url":"https://api.github.com/repos/netty/netty/milestones{/number}","notifications_url":"https://api.github.com/repos/netty/netty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/netty/netty/labels{/name}","releases_url":"https://api.github.com/repos/netty/netty/releases{/id}","created_at":"2010-11-09T09:22:21Z","updated_at":"2015-06-30T12:12:20Z","pushed_at":"2015-06-30T19:46:47Z","git_url":"git://github.com/netty/netty.git","ssh_url":"git@github.com:netty/netty.git","clone_url":"https://github.com/netty/netty.git","svn_url":"https://github.com/netty/netty","homepage":"http://netty.io/","size":129191,"stargazers_count":4843,"watchers_count":4843,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2403,"mirror_url":null,"open_issues_count":289,"forks":2403,"open_issues":289,"watchers":4843,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/netty/netty/pulls/3926"},"html":{"href":"https://github.com/netty/netty/pull/3926"},"issue":{"href":"https://api.github.com/repos/netty/netty/issues/3926"},"comments":{"href":"https://api.github.com/repos/netty/netty/issues/3926/comments"},"review_comments":{"href":"https://api.github.com/repos/netty/netty/pulls/3926/comments"},"review_comment":{"href":"https://api.github.com/repos/netty/netty/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/netty/netty/pulls/3926/commits"},"statuses":{"href":"https://api.github.com/repos/netty/netty/statuses/e55c6f7e20f62b4d5e43d7a79c32b207f389359e"}}}}