diff options
Diffstat (limited to 'test/cpp')
-rw-r--r-- | test/cpp/end2end/async_end2end_test.cc | 6 | ||||
-rw-r--r-- | test/cpp/interop/interop_client.cc | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index e0649bd694..45f5eb1ddd 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -245,8 +245,8 @@ class AsyncEnd2endTest : public ::testing::TestWithParam<TestScenario> { void SetUp() GRPC_OVERRIDE { poll_overrider_.reset(new PollingOverrider(!GetParam().disable_blocking)); - int port = grpc_pick_unused_port_or_die(); - server_address_ << "localhost:" << port; + port_ = grpc_pick_unused_port_or_die(); + server_address_ << "localhost:" << port_; // Setup server ServerBuilder builder; @@ -274,6 +274,7 @@ class AsyncEnd2endTest : public ::testing::TestWithParam<TestScenario> { ; poll_overrider_.reset(); gpr_tls_set(&g_is_async_end2end_test, 0); + grpc_recycle_unused_port(port_); } void ResetStub() { @@ -325,6 +326,7 @@ class AsyncEnd2endTest : public ::testing::TestWithParam<TestScenario> { std::unique_ptr<Server> server_; grpc::testing::EchoTestService::AsyncService service_; std::ostringstream server_address_; + int port_; std::unique_ptr<PollingOverrider> poll_overrider_; }; diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index cba52b111f..189e4a8aab 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -60,7 +60,7 @@ static const char* kRandomFile = "test/cpp/interop/rnd.dat"; namespace { // The same value is defined by the Java client. const std::vector<int> request_stream_sizes = {27182, 8, 1828, 45904}; -const std::vector<int> response_stream_sizes = {31415, 9, 2653, 58979}; +const std::vector<int> response_stream_sizes = {31415, 59, 2653, 58979}; const int kNumResponseMessages = 2000; const int kResponseMessageSize = 1030; const int kReceiveDelayMilliSeconds = 20; |