aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/end2end')
-rw-r--r--test/core/end2end/README3
-rw-r--r--test/core/end2end/cq_verifier.c16
-rw-r--r--test/core/end2end/dualstack_socket_test.c1
-rw-r--r--test/core/end2end/tests/census_simple_request.c1
-rw-r--r--test/core/end2end/tests/max_concurrent_streams.c3
-rw-r--r--test/core/end2end/tests/simple_request.c5
6 files changed, 12 insertions, 17 deletions
diff --git a/test/core/end2end/README b/test/core/end2end/README
index 31598b61b8..59daec45d0 100644
--- a/test/core/end2end/README
+++ b/test/core/end2end/README
@@ -5,6 +5,3 @@ To add a new test or fixture:
- add the code to the relevant directory
- update gen_build_json.py to reflect the change
- regenerate projects
-// MOE:begin_strip
-- update net/grpc/c/BUILD to reflect the change
-// MOE:end_strip \ No newline at end of file
diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c
index 287f83eebc..904ed77283 100644
--- a/test/core/end2end/cq_verifier.c
+++ b/test/core/end2end/cq_verifier.c
@@ -70,6 +70,7 @@ typedef struct expectation {
union {
grpc_op_error finish_accepted;
grpc_op_error write_accepted;
+ grpc_op_error ioreq;
struct {
const char *method;
const char *host;
@@ -180,9 +181,6 @@ static void verify_matches(expectation *e, grpc_event *ev) {
case GRPC_WRITE_ACCEPTED:
GPR_ASSERT(e->data.write_accepted == ev->data.write_accepted);
break;
- case GRPC_INVOKE_ACCEPTED:
- abort();
- break;
case GRPC_SERVER_RPC_NEW:
GPR_ASSERT(string_equivalent(e->data.server_rpc_new.method,
ev->data.server_rpc_new.method));
@@ -222,6 +220,9 @@ static void verify_matches(expectation *e, grpc_event *ev) {
GPR_ASSERT(ev->data.read == NULL);
}
break;
+ case GRPC_IOREQ:
+ GPR_ASSERT(e->data.ioreq == ev->data.ioreq);
+ break;
case GRPC_SERVER_SHUTDOWN:
break;
case GRPC_COMPLETION_DO_NOT_USE:
@@ -242,7 +243,9 @@ static void metadata_expectation(gpr_strvec *buf, metadata *md) {
gpr_asprintf(&tmp, "%c%s:%s", i ? ',' : '{', md->keys[i], md->values[i]);
gpr_strvec_add(buf, tmp);
}
- gpr_strvec_add(buf, gpr_strdup("}"));
+ if (md->count) {
+ gpr_strvec_add(buf, gpr_strdup("}"));
+ }
}
}
@@ -261,8 +264,9 @@ static void expectation_to_strvec(gpr_strvec *buf, expectation *e) {
e->data.write_accepted);
gpr_strvec_add(buf, tmp);
break;
- case GRPC_INVOKE_ACCEPTED:
- gpr_strvec_add(buf, gpr_strdup("GRPC_INVOKE_ACCEPTED"));
+ case GRPC_IOREQ:
+ gpr_asprintf(&tmp, "GRPC_IOREQ result=%d", e->data.ioreq);
+ gpr_strvec_add(buf, tmp);
break;
case GRPC_SERVER_RPC_NEW:
timeout = gpr_time_sub(e->data.server_rpc_new.deadline, gpr_now());
diff --git a/test/core/end2end/dualstack_socket_test.c b/test/core/end2end/dualstack_socket_test.c
index eeb454ca58..9d893f67a1 100644
--- a/test/core/end2end/dualstack_socket_test.c
+++ b/test/core/end2end/dualstack_socket_test.c
@@ -142,7 +142,6 @@ void test_connect(const char *server_host, const char *client_host, int port,
cq_verify(v_client);
cq_expect_finish_accepted(v_server, tag(5), GRPC_OP_OK);
- cq_verify(v_server);
cq_expect_finished(v_server, tag(102), NULL);
cq_verify(v_server);
diff --git a/test/core/end2end/tests/census_simple_request.c b/test/core/end2end/tests/census_simple_request.c
index 1edb5b0d3a..4cbaa65b32 100644
--- a/test/core/end2end/tests/census_simple_request.c
+++ b/test/core/end2end/tests/census_simple_request.c
@@ -135,7 +135,6 @@ static void test_body(grpc_end2end_test_fixture f) {
cq_verify(v_client);
cq_expect_finish_accepted(v_server, tag(5), GRPC_OP_OK);
- cq_verify(v_server);
cq_expect_finished(v_server, tag(102), NULL);
cq_verify(v_server);
grpc_call_destroy(c);
diff --git a/test/core/end2end/tests/max_concurrent_streams.c b/test/core/end2end/tests/max_concurrent_streams.c
index 0e26577903..4830b85f9b 100644
--- a/test/core/end2end/tests/max_concurrent_streams.c
+++ b/test/core/end2end/tests/max_concurrent_streams.c
@@ -138,7 +138,6 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
cq_verify(v_client);
cq_expect_finish_accepted(v_server, tag(5), GRPC_OP_OK);
- cq_verify(v_server);
cq_expect_finished(v_server, tag(102), NULL);
cq_verify(v_server);
@@ -207,7 +206,7 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) {
/* The /alpha or /beta calls started above could be invoked (but NOT both);
* check this here */
/* We'll get tag 303 or 403, we want 300, 400 */
- live_call = ((int)(gpr_intptr)ev->tag) - 3;
+ live_call = ((int)(gpr_intptr) ev->tag) - 3;
grpc_event_finish(ev);
cq_expect_server_rpc_new(v_server, &s1, tag(100),
diff --git a/test/core/end2end/tests/simple_request.c b/test/core/end2end/tests/simple_request.c
index 192d1ab87d..db0d6d8160 100644
--- a/test/core/end2end/tests/simple_request.c
+++ b/test/core/end2end/tests/simple_request.c
@@ -139,7 +139,6 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
cq_verify(v_client);
cq_expect_finish_accepted(v_server, tag(5), GRPC_OP_OK);
- cq_verify(v_server);
cq_expect_finished(v_server, tag(102), NULL);
cq_verify(v_server);
@@ -180,16 +179,14 @@ static void simple_request_body2(grpc_end2end_test_fixture f) {
GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_write_status_old(
s, GRPC_STATUS_UNIMPLEMENTED, "xyz", tag(5)));
- cq_expect_finish_accepted(v_server, tag(5), GRPC_OP_OK);
cq_verify(v_server);
cq_expect_client_metadata_read(v_client, tag(2), NULL);
- cq_verify(v_client);
-
cq_expect_finished_with_status(v_client, tag(3), GRPC_STATUS_UNIMPLEMENTED,
"xyz", NULL);
cq_verify(v_client);
+ cq_expect_finish_accepted(v_server, tag(5), GRPC_OP_OK);
cq_expect_finished(v_server, tag(102), NULL);
cq_verify(v_server);