diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc index b2453ca3bb3..9a20a5a5711 100644 --- a/src/compiler/cpp_generator.cc +++ b/src/compiler/cpp_generator.cc @@ -604,10 +604,6 @@ void PrintHeaderClientMethodCallbackInterfaces( "virtual void $Method$(::grpc::ClientContext* context, " "const $Request$* request, $Response$* response, " "std::function) = 0;\n"); - printer->Print(*vars, - "virtual void $Method$(::grpc::ClientContext* context, " - "const ::grpc::ByteBuffer* request, $Response$* response, " - "std::function) = 0;\n"); // TODO(vjpai): Remove experimental versions and macros when callback API is // fully de-experimentalized. printer->Print(*vars, @@ -620,16 +616,6 @@ void PrintHeaderClientMethodCallbackInterfaces( "const $Request$* request, $Response$* response, " "::grpc::experimental::ClientUnaryReactor* reactor) = 0;\n" "#endif\n"); - printer->Print(*vars, - "#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL\n" - "virtual void $Method$(::grpc::ClientContext* context, " - "const ::grpc::ByteBuffer* request, $Response$* response, " - "::grpc::ClientUnaryReactor* reactor) = 0;\n" - "#else\n" - "virtual void $Method$(::grpc::ClientContext* context, " - "const ::grpc::ByteBuffer* request, $Response$* response, " - "::grpc::experimental::ClientUnaryReactor* reactor) = 0;\n" - "#endif\n"); } else if (ClientOnlyStreaming(method)) { printer->Print(*vars, "#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL\n" @@ -716,10 +702,6 @@ void PrintHeaderClientMethodCallback(grpc_generator::Printer* printer, "void $Method$(::grpc::ClientContext* context, " "const $Request$* request, $Response$* response, " "std::function) override;\n"); - printer->Print(*vars, - "void $Method$(::grpc::ClientContext* context, " - "const ::grpc::ByteBuffer* request, $Response$* response, " - "std::function) override;\n"); printer->Print( *vars, "#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL\n" @@ -731,17 +713,6 @@ void PrintHeaderClientMethodCallback(grpc_generator::Printer* printer, "const $Request$* request, $Response$* response, " "::grpc::experimental::ClientUnaryReactor* reactor) override;\n" "#endif\n"); - printer->Print( - *vars, - "#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL\n" - "void $Method$(::grpc::ClientContext* context, " - "const ::grpc::ByteBuffer* request, $Response$* response, " - "::grpc::ClientUnaryReactor* reactor) override;\n" - "#else\n" - "void $Method$(::grpc::ClientContext* context, " - "const ::grpc::ByteBuffer* request, $Response$* response, " - "::grpc::experimental::ClientUnaryReactor* reactor) override;\n" - "#endif\n"); } else if (ClientOnlyStreaming(method)) { printer->Print(*vars, "#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL\n" @@ -1929,16 +1900,6 @@ void PrintSourceClientMethod(grpc_generator::Printer* printer, "(stub_->channel_.get(), stub_->rpcmethod_$Method$_, " "context, request, response, std::move(f));\n}\n\n"); - printer->Print(*vars, - "void $ns$$Service$::Stub::experimental_async::$Method$(" - "::grpc::ClientContext* context, " - "const ::grpc::ByteBuffer* request, $Response$* response, " - "std::function f) {\n"); - printer->Print(*vars, - " ::grpc::internal::CallbackUnaryCall" - "(stub_->channel_.get(), stub_->rpcmethod_$Method$_, " - "context, request, response, std::move(f));\n}\n\n"); - printer->Print(*vars, "void $ns$$Service$::Stub::experimental_async::$Method$(" "::grpc::ClientContext* context, " @@ -1949,16 +1910,6 @@ void PrintSourceClientMethod(grpc_generator::Printer* printer, "(stub_->channel_.get(), stub_->rpcmethod_$Method$_, " "context, request, response, reactor);\n}\n\n"); - printer->Print(*vars, - "void $ns$$Service$::Stub::experimental_async::$Method$(" - "::grpc::ClientContext* context, " - "const ::grpc::ByteBuffer* request, $Response$* response, " - "::grpc::experimental::ClientUnaryReactor* reactor) {\n"); - printer->Print(*vars, - " ::grpc::internal::ClientCallbackUnaryFactory::Create" - "(stub_->channel_.get(), stub_->rpcmethod_$Method$_, " - "context, request, response, reactor);\n}\n\n"); - printer->Print(*vars, "::grpc::ClientAsyncResponseReader< $Response$>* " "$ns$$Service$::Stub::PrepareAsync$Method$Raw(::grpc::" diff --git a/test/cpp/end2end/client_callback_end2end_test.cc b/test/cpp/end2end/client_callback_end2end_test.cc index 34493ee048b..61a7d8844e6 100644 --- a/test/cpp/end2end/client_callback_end2end_test.cc +++ b/test/cpp/end2end/client_callback_end2end_test.cc @@ -227,36 +227,6 @@ class ClientCallbackEnd2endTest } } - void SendRpcsRawReq(int num_rpcs) { - std::string test_string("Hello raw world."); - EchoRequest request; - request.set_message(test_string); - std::unique_ptr send_buf = SerializeToByteBuffer(&request); - - for (int i = 0; i < num_rpcs; i++) { - EchoResponse response; - ClientContext cli_ctx; - - std::mutex mu; - std::condition_variable cv; - bool done = false; - stub_->experimental_async()->Echo( - &cli_ctx, send_buf.get(), &response, - [&request, &response, &done, &mu, &cv](Status s) { - GPR_ASSERT(s.ok()); - - EXPECT_EQ(request.message(), response.message()); - std::lock_guard l(mu); - done = true; - cv.notify_one(); - }); - std::unique_lock l(mu); - while (!done) { - cv.wait(l); - } - } - } - void SendRpcsGeneric(int num_rpcs, bool maybe_except) { const std::string kMethodName("/grpc.testing.EchoTestService/Echo"); std::string test_string(""); @@ -515,12 +485,6 @@ TEST_P(ClientCallbackEnd2endTest, SequentialRpcs) { SendRpcs(10, false); } -TEST_P(ClientCallbackEnd2endTest, SequentialRpcsRawReq) { - MAYBE_SKIP_TEST; - ResetStub(); - SendRpcsRawReq(10); -} - TEST_P(ClientCallbackEnd2endTest, SendClientInitialMetadata) { MAYBE_SKIP_TEST; ResetStub();