diff options
author | 2016-12-01 15:12:27 -0800 | |
---|---|---|
committer | 2016-12-01 15:12:27 -0800 | |
commit | 2239ebc966b68325475d90237f0aaffb99c5c4b7 (patch) | |
tree | 6c1560b0719d058a66d6110d3a0ce99053462b93 | |
parent | 731a8e6db3a31968dfc3d4d9a5011e3f433f343d (diff) |
Simplify
-rw-r--r-- | test/core/client_channel/lb_policies_test.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/test/core/client_channel/lb_policies_test.c b/test/core/client_channel/lb_policies_test.c index bf657f89ee..51df52c3e3 100644 --- a/test/core/client_channel/lb_policies_test.c +++ b/test/core/client_channel/lb_policies_test.c @@ -40,7 +40,6 @@ #include <grpc/support/log.h> #include <grpc/support/string_util.h> #include <grpc/support/time.h> -#include <grpc/support/useful.h> #include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/client_channel/lb_policy_registry.h" @@ -788,12 +787,8 @@ static void verify_total_carnage_round_robin(const servers_fixture *f, * subchannel already transitioned to retrying. */ for (size_t i = 0; i < sequences->n; i++) { const grpc_connectivity_state actual = sequences->connectivity_states[i]; - uint32_t expected_bitset; - GPR_BITSET(&expected_bitset, GRPC_CHANNEL_TRANSIENT_FAILURE); - GPR_BITSET(&expected_bitset, GRPC_CHANNEL_CONNECTING); - uint32_t actual_bitset; - GPR_BITSET(&actual_bitset, actual); - if ((actual_bitset & expected_bitset) == 0) { + if (actual != GRPC_CHANNEL_TRANSIENT_FAILURE && + actual != GRPC_CHANNEL_CONNECTING) { gpr_log(GPR_ERROR, "CONNECTIVITY STATUS SEQUENCE FAILURE: expected " "GRPC_CHANNEL_TRANSIENT_FAILURE or GRPC_CHANNEL_CONNECTING, got " @@ -850,13 +845,9 @@ static void verify_partial_carnage_round_robin( * are gone. May also be CONNECTING if, under load, this check took too long * to run and the subchannel already transitioned to retrying. */ actual = sequences->connectivity_states[num_iters - 1]; - uint32_t expected_bitset; - GPR_BITSET(&expected_bitset, GRPC_CHANNEL_TRANSIENT_FAILURE); - GPR_BITSET(&expected_bitset, GRPC_CHANNEL_CONNECTING); - uint32_t actual_bitset; - GPR_BITSET(&actual_bitset, actual); for (i = 0; i < sequences->n; i++) { - if ((actual_bitset & expected_bitset) == 0) { + if (actual != GRPC_CHANNEL_TRANSIENT_FAILURE && + actual != GRPC_CHANNEL_CONNECTING) { gpr_log(GPR_ERROR, "CONNECTIVITY STATUS SEQUENCE FAILURE: expected " "GRPC_CHANNEL_TRANSIENT_FAILURE or GRPC_CHANNEL_CONNECTING, got " |