Go to the documentation of this file.
21 #include <gtest/gtest.h>
30 #include "src/proto/grpc/testing/echo.grpc.pb.h"
37 TEST(ServerRequestCallTest, ShortDeadlineDoesNotCauseOkayFalse) {
39 bool shutting_down =
false;
45 const string address =
s.str();
46 testing::EchoTestService::AsyncService
service;
55 for (
int n = 0;
true;
n++) {
57 testing::EchoRequest
req;
58 ServerAsyncResponseWriter<testing::EchoResponse> responder(&
ctx);
62 std::lock_guard<std::mutex> lock(
mu);
65 reinterpret_cast<void*
>(1));
78 std::lock_guard<std::mutex> lock(
mu);
79 if (!shutting_down && !
ok) {
83 if (shutting_down && !
ok) {
98 std::lock_guard<std::mutex> lock(
mu);
101 "shut down while processing call, not calling Finish()");
107 reinterpret_cast<void*
>(2));
116 auto stub = testing::EchoTestService::NewStub(
119 for (
int i = 0;
i < 100;
i++) {
134 ctx.set_fail_fast(
false);
136 std::chrono::milliseconds(1));
146 std::lock_guard<std::mutex> lock(
mu);
147 shutting_down =
true;
159 int main(
int argc,
char** argv) {
static struct test_ctx ctx
static void * tag(intptr_t t)
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
GPRAPI void gpr_sleep_until(gpr_timespec until)
static const Status & OK
An OK pre-defined instance.
std::shared_ptr< Channel > CreateChannel(const grpc::string &target, const std::shared_ptr< ChannelCredentials > &creds)
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
int grpc_pick_unused_port_or_die(void)
GPRAPI gpr_timespec gpr_now(gpr_clock_type clock)
GTEST_API_ void InitGoogleTest(int *argc, char **argv)
GPRAPI gpr_timespec gpr_time_add(gpr_timespec a, gpr_timespec b)
int main(int argc, char **argv)
TEST(CredentialsTest, StsCredentialsOptionsFromEnv)
std::shared_ptr< ServerCredentials > InsecureServerCredentials()
EXPECT_EQ(grpc::StatusCode::INVALID_ARGUMENT, status.error_code())
std::shared_ptr< ChannelCredentials > InsecureChannelCredentials()
Credentials for an unencrypted, unauthenticated channel.
__attribute__((deprecated("Please use GRPCProtoMethod."))) @interface ProtoMethod NSString * service
static uv_thread_t thread
static grpc_completion_queue * cq
GPRAPI gpr_timespec gpr_time_from_seconds(int64_t s, gpr_clock_type clock_type)
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:17