GOAWAY & Reconnection support.
Clients stay connected to a server after it shutdowns until all active calls
have completed, and then they drop.
After a GOAWAY or a disconnect, clients will attempt to re-resolve and
reconnect to the server.
Change on 2014/12/15 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82178515
diff --git a/test/core/end2end/fixtures/chttp2_socket_pair.c b/test/core/end2end/fixtures/chttp2_socket_pair.c
index 7ec17e3..1410477 100644
--- a/test/core/end2end/fixtures/chttp2_socket_pair.c
+++ b/test/core/end2end/fixtures/chttp2_socket_pair.c
@@ -32,6 +32,9 @@
*/
#include "test/core/end2end/end2end_tests.h"
+
+#include <string.h>
+
#include "src/core/channel/client_channel.h"
#include "src/core/channel/connected_channel.h"
#include "src/core/channel/http_filter.h"
@@ -88,11 +91,10 @@
grpc_endpoint_pair *sfd = gpr_malloc(sizeof(grpc_endpoint_pair));
grpc_end2end_test_fixture f;
+ memset(&f, 0, sizeof(f));
f.fixture_data = sfd;
f.client_cq = grpc_completion_queue_create();
f.server_cq = grpc_completion_queue_create();
- f.server = grpc_server_create_from_filters(f.server_cq, NULL, 0, server_args);
- f.client = NULL;
*sfd = grpc_iomgr_create_endpoint_pair(65536);
@@ -113,6 +115,9 @@
static void chttp2_init_server_socketpair(grpc_end2end_test_fixture *f,
grpc_channel_args *server_args) {
grpc_endpoint_pair *sfd = f->fixture_data;
+ GPR_ASSERT(!f->server);
+ f->server =
+ grpc_server_create_from_filters(f->server_cq, NULL, 0, server_args);
grpc_create_chttp2_transport(server_setup_transport, f, server_args,
sfd->server, NULL, 0, grpc_mdctx_create(), 0);
}