Make sure event_engine is alive before checking for MAYBE_SKIP_TEST

pull/19054/head
Vijay Pai 6 years ago
parent a8ac2e613e
commit 41191323ec
  1. 8
      test/cpp/end2end/client_callback_end2end_test.cc
  2. 6
      test/cpp/end2end/end2end_test.cc

@ -104,10 +104,6 @@ class ClientCallbackEnd2endTest
// TODO(vjpai): Support testing of AuthMetadataProcessor
if (GetParam().protocol == Protocol::TCP) {
if (!grpc_iomgr_run_in_background()) {
do_not_test_ = true;
return;
}
picked_port_ = grpc_pick_unused_port_or_die();
server_address_ << "localhost:" << picked_port_;
builder.AddListeningPort(server_address_.str(), server_creds);
@ -133,6 +129,10 @@ class ClientCallbackEnd2endTest
server_ = builder.BuildAndStart();
is_server_started_ = true;
if (GetParam().protocol == Protocol::TCP &&
!grpc_iomgr_run_in_background()) {
do_not_test_ = true;
}
}
void ResetStub() {

@ -2110,6 +2110,10 @@ INSTANTIATE_TEST_CASE_P(
int main(int argc, char** argv) {
GPR_GLOBAL_CONFIG_SET(grpc_client_channel_backup_poll_interval_ms, 200);
grpc::testing::TestEnvironment env(argc, argv);
// The grpc_init is to cover the MAYBE_SKIP_TEST.
grpc_init();
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
int ret = RUN_ALL_TESTS();
grpc_shutdown();
return ret;
}

Loading…
Cancel
Save