diff options
author | Mark D. Roth <roth@google.com> | 2016-11-02 08:42:49 -0700 |
---|---|---|
committer | Mark D. Roth <roth@google.com> | 2016-11-02 08:42:49 -0700 |
commit | 6c8492de8a27b3b6afa3533543eeac167b5c94cc (patch) | |
tree | d487ad8a8745abfe706a92b31a5a1c54f866aead /test/cpp | |
parent | f464a3700d3ca78fc35b2f3bd69c71883a849843 (diff) | |
parent | 57f30d15185f030de0c71d6a39e533d418b2a22e (diff) |
Merge remote-tracking branch 'upstream/master' into remove_fake_resolver
Diffstat (limited to 'test/cpp')
-rw-r--r-- | test/cpp/grpclb/grpclb_test.cc | 18 | ||||
-rw-r--r-- | test/cpp/util/proto_reflection_descriptor_database.h | 7 |
2 files changed, 15 insertions, 10 deletions
diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index c67249e4b1..70d50ec2fa 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -76,10 +76,22 @@ extern "C" { // - Send a serverlist with faulty ip:port addresses (port > 2^16, etc). // - Test reception of invalid serverlist // - Test pinging -// - Test against a non-LB server. That server should return UNIMPLEMENTED and -// the call should fail. +// - Test against a non-LB server. // - Random LB server closing the stream unexpectedly. // - Test using DNS-resolvable names (localhost?) +// +// Findings from end to end testing to be covered here: +// - Handling of LB servers restart, including reconnection after backing-off +// retries. +// - Destruction of load balanced channel (and therefore of grpclb instance) +// while: +// 1) the internal LB call is still active. This should work by virtue +// of the weak reference the LB call holds. The call should be terminated as +// part of the grpclb shutdown process. +// 2) the retry timer is active. Again, the weak reference it holds should +// prevent a premature call to \a glb_destroy. +// - Restart of backend servers with no changes to serverlist. This exercises +// the RR handover mechanism. namespace grpc { namespace { @@ -144,7 +156,6 @@ static gpr_slice build_response_payload_slice( // disfunctional implementation of std::to_string in gcc 4.4, which doesn't // have a version for int but does have one for long long int. string token_data = "token" + std::to_string((long long int)ports[i]); - token_data.resize(64, '-'); server->set_load_balance_token(token_data); } const grpc::string &enc_resp = response.SerializeAsString(); @@ -333,7 +344,6 @@ static void start_backend_server(server_fixture *sf) { // disfunctional implementation of std::to_string in gcc 4.4, which doesn't // have a version for int but does have one for long long int. string expected_token = "token" + std::to_string((long long int)sf->port); - expected_token.resize(64, '-'); GPR_ASSERT(contains_metadata(&request_metadata_recv, "lb-token", expected_token.c_str())); diff --git a/test/cpp/util/proto_reflection_descriptor_database.h b/test/cpp/util/proto_reflection_descriptor_database.h index dfa36044d9..4637c043f1 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.h +++ b/test/cpp/util/proto_reflection_descriptor_database.h @@ -38,14 +38,9 @@ #include <unordered_set> #include <vector> -// GRPC_NO_GENERATED_CODE indicates generated pb files should not be used -#ifdef GRPC_NO_GENERATED_CODE -#include "src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h" -#else -#include <grpc++/ext/reflection.grpc.pb.h> -#endif // GRPC_NO_GENERATED_CODE #include <grpc++/grpc++.h> #include <grpc++/impl/codegen/config_protobuf.h> +#include "src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h" namespace grpc { |