Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
1ed96ba2
Commit
1ed96ba2
authored
9 years ago
by
Craig Tiller
Browse files
Options
Downloads
Plain Diff
Merge branch 'flow_control_buf_fix' of github.com:yang-g/grpc into virtuous-velvit-velociraptor
parents
5126bb6d
6f30decf
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/core/transport/chttp2/writing.c
+2
-1
2 additions, 1 deletion
src/core/transport/chttp2/writing.c
test/cpp/end2end/end2end_test.cc
+20
-0
20 additions, 0 deletions
test/cpp/end2end/end2end_test.cc
test/cpp/util/messages.proto
+1
-0
1 addition, 0 deletions
test/cpp/util/messages.proto
with
23 additions
and
1 deletion
src/core/transport/chttp2/writing.c
+
2
−
1
View file @
1ed96ba2
...
...
@@ -66,7 +66,8 @@ int grpc_chttp2_unlocking_check_writes(
/* for each grpc_chttp2_stream that's become writable, frame it's data
(according to
available window sizes) and add to the output buffer */
while
(
grpc_chttp2_list_pop_writable_stream
(
transport_global
,
while
(
transport_global
->
outgoing_window
>
0
&&
grpc_chttp2_list_pop_writable_stream
(
transport_global
,
transport_writing
,
&
stream_global
,
&
stream_writing
))
{
stream_writing
->
id
=
stream_global
->
id
;
...
...
This diff is collapsed.
Click to expand it.
test/cpp/end2end/end2end_test.cc
+
20
−
0
View file @
1ed96ba2
...
...
@@ -144,6 +144,11 @@ class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service {
if
(
request
->
has_param
()
&&
request
->
param
().
check_auth_context
())
{
CheckAuthContext
(
context
);
}
if
(
request
->
has_param
()
&&
request
->
param
().
response_message_length
()
>
0
)
{
response
->
set_message
(
grpc
::
string
(
request
->
param
().
response_message_length
(),
'\0'
));
}
return
Status
::
OK
;
}
...
...
@@ -786,6 +791,21 @@ TEST_F(End2endTest, ClientAuthContext) {
CheckAuthContext
(
&
context
);
}
// Make the response larger than the flow control window.
TEST_F
(
End2endTest
,
HugeResponse
)
{
ResetStub
();
EchoRequest
request
;
EchoResponse
response
;
request
.
set_message
(
"huge response"
);
const
int
kResponseSize
=
1024
*
(
1024
+
10
);
request
.
mutable_param
()
->
set_response_message_length
(
kResponseSize
);
ClientContext
context
;
Status
s
=
stub_
->
Echo
(
&
context
,
request
,
&
response
);
EXPECT_EQ
(
kResponseSize
,
response
.
message
().
size
());
EXPECT_TRUE
(
s
.
ok
());
}
}
// namespace testing
}
// namespace grpc
...
...
This diff is collapsed.
Click to expand it.
test/cpp/util/messages.proto
+
1
−
0
View file @
1ed96ba2
...
...
@@ -38,6 +38,7 @@ message RequestParams {
optional
int32
server_cancel_after_us
=
3
;
optional
bool
echo_metadata
=
4
;
optional
bool
check_auth_context
=
5
;
optional
int32
response_message_length
=
6
;
}
message
EchoRequest
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment