aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/transport/connectivity_state_test.c
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2016-06-29 07:50:18 -0700
committerGravatar Mark D. Roth <roth@google.com>2016-06-29 07:50:18 -0700
commit89ebe55985a705ddee72d28c1b93cfa681585a8c (patch)
treef062eab0150ddbdcfd486726aa12955de34c7a57 /test/core/transport/connectivity_state_test.c
parent07cd9c9e064e636c432500724bf5f91ad15d041a (diff)
parent76d24420d7a6471dc3b135b62318277991ebdb08 (diff)
Merge branch 'filter_call_init_failure' into filter_api
Diffstat (limited to 'test/core/transport/connectivity_state_test.c')
-rw-r--r--test/core/transport/connectivity_state_test.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/test/core/transport/connectivity_state_test.c b/test/core/transport/connectivity_state_test.c
index 38dea01cc6..1050059eff 100644
--- a/test/core/transport/connectivity_state_test.c
+++ b/test/core/transport/connectivity_state_test.c
@@ -43,14 +43,15 @@
int g_counter;
-static void must_succeed(grpc_exec_ctx *exec_ctx, void *arg, bool success) {
- GPR_ASSERT(success);
+static void must_succeed(grpc_exec_ctx *exec_ctx, void *arg,
+ grpc_error *error) {
+ GPR_ASSERT(error == GRPC_ERROR_NONE);
GPR_ASSERT(arg == THE_ARG);
g_counter++;
}
-static void must_fail(grpc_exec_ctx *exec_ctx, void *arg, bool success) {
- GPR_ASSERT(!success);
+static void must_fail(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
+ GPR_ASSERT(error != GRPC_ERROR_NONE);
GPR_ASSERT(arg == THE_ARG);
g_counter++;
}
@@ -67,15 +68,18 @@ static void test_connectivity_state_name(void) {
0 == strcmp(grpc_connectivity_state_name(GRPC_CHANNEL_TRANSIENT_FAILURE),
"TRANSIENT_FAILURE"));
GPR_ASSERT(0 == strcmp(grpc_connectivity_state_name(GRPC_CHANNEL_SHUTDOWN),
- "FATAL_FAILURE"));
+ "SHUTDOWN"));
}
static void test_check(void) {
grpc_connectivity_state_tracker tracker;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_error *error;
gpr_log(GPR_DEBUG, "test_check");
grpc_connectivity_state_init(&tracker, GRPC_CHANNEL_IDLE, "xxx");
- GPR_ASSERT(grpc_connectivity_state_check(&tracker) == GRPC_CHANNEL_IDLE);
+ GPR_ASSERT(grpc_connectivity_state_check(&tracker, &error) ==
+ GRPC_CHANNEL_IDLE);
+ GPR_ASSERT(error == GRPC_ERROR_NONE);
grpc_connectivity_state_destroy(&exec_ctx, &tracker);
grpc_exec_ctx_finish(&exec_ctx);
}