Merge pull request #23635 from veblush/fix-transport-test

Added call to grpc::testing::TestEnvironment in transports tests
pull/23629/head^2
Esun Kim 4 years ago committed by GitHub
commit 5cc76cf450
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      test/core/transport/byte_stream_test.cc
  2. 2
      test/core/transport/connectivity_state_test.cc
  3. 2
      test/core/transport/static_metadata_test.cc
  4. 4
      test/core/transport/status_conversion_test.cc
  5. 5
      test/core/transport/status_metadata_test.cc

@ -246,8 +246,8 @@ TEST(CachingByteStream, SharedCache) {
} // namespace grpc_core
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
grpc::testing::TestEnvironment env(argc, argv);
::testing::InitGoogleTest(&argc, argv);
grpc_init();
int retval = RUN_ALL_TESTS();
grpc_shutdown();

@ -233,8 +233,8 @@ TEST(StateTracker, DoNotNotifyShutdownAtDestructionIfAlreadyInShutdown) {
} // namespace grpc_core
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
grpc::testing::TestEnvironment env(argc, argv);
::testing::InitGoogleTest(&argc, argv);
grpc_init();
grpc_core::testing::grpc_tracer_enable_flag(
&grpc_core::grpc_connectivity_state_trace);

@ -42,9 +42,9 @@ TEST(StaticMetadataTest, ReadAllStaticElements) {
} // namespace grpc_core
int main(int argc, char** argv) {
grpc::testing::TestEnvironment env(argc, argv);
::testing::InitGoogleTest(&argc, argv);
grpc_init();
grpc::testing::TestEnvironment env(argc, argv);
int retval = RUN_ALL_TESTS();
grpc_shutdown();
return retval;

@ -162,8 +162,6 @@ static void test_http2_status_to_grpc_status() {
}
int main(int argc, char** argv) {
int i;
grpc::testing::TestEnvironment env(argc, argv);
grpc_init();
@ -173,7 +171,7 @@ int main(int argc, char** argv) {
test_http2_status_to_grpc_status();
/* check all status values can be converted */
for (i = 0; i <= 999; i++) {
for (int i = 0; i <= 999; i++) {
grpc_http2_status_to_grpc_status(i);
}

@ -17,11 +17,11 @@
*/
#include "src/core/lib/transport/status_metadata.h"
#include "src/core/lib/transport/static_metadata.h"
#include "test/core/util/test_config.h"
#include <gtest/gtest.h>
#include "src/core/lib/transport/static_metadata.h"
namespace {
TEST(GetStatusCodeFromMetadata, OK) {
@ -56,6 +56,7 @@ TEST(GetStatusCodeFromMetadata, Unparseable) {
} // namespace
int main(int argc, char** argv) {
grpc::testing::TestEnvironment env(argc, argv);
::testing::InitGoogleTest(&argc, argv);
grpc_init();
int ret = RUN_ALL_TESTS();

Loading…
Cancel
Save