|
|
@ -683,10 +683,14 @@ TEST_P(End2endTest, RequestStreamServerEarlyCancelTest) { |
|
|
|
auto stream = stub_->RequestStream(&context, &response); |
|
|
|
auto stream = stub_->RequestStream(&context, &response); |
|
|
|
request.set_message("hello"); |
|
|
|
request.set_message("hello"); |
|
|
|
int send_messages = 20; |
|
|
|
int send_messages = 20; |
|
|
|
while (send_messages > 0) { |
|
|
|
while (send_messages > 10) { |
|
|
|
EXPECT_TRUE(stream->Write(request)); |
|
|
|
EXPECT_TRUE(stream->Write(request)); |
|
|
|
send_messages--; |
|
|
|
send_messages--; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
while (send_messages > 0) { |
|
|
|
|
|
|
|
stream->Write(request); |
|
|
|
|
|
|
|
send_messages--; |
|
|
|
|
|
|
|
} |
|
|
|
stream->WritesDone(); |
|
|
|
stream->WritesDone(); |
|
|
|
Status s = stream->Finish(); |
|
|
|
Status s = stream->Finish(); |
|
|
|
EXPECT_EQ(s.error_code(), StatusCode::CANCELLED); |
|
|
|
EXPECT_EQ(s.error_code(), StatusCode::CANCELLED); |
|
|
|