gtestify test/core/compression (#30204)

* gtestify core/compression

* Fix
pull/30295/head
Esun Kim 3 years ago committed by GitHub
parent 672be80d84
commit 57de9d7353
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 130
      CMakeLists.txt
  2. 42
      build_autogenerated.yaml
  3. 2
      test/core/compression/BUILD
  4. 114
      test/core/compression/compression_test.cc
  5. 75
      test/core/compression/message_compress_test.cc
  6. 96
      tools/run_tests/generated/tests.json

130
CMakeLists.txt generated

@ -790,7 +790,6 @@ if(gRPC_BUILD_TESTS)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_dependencies(buildtests_c combiner_test) add_dependencies(buildtests_c combiner_test)
endif() endif()
add_dependencies(buildtests_c compression_test)
add_dependencies(buildtests_c connection_refused_test) add_dependencies(buildtests_c connection_refused_test)
add_dependencies(buildtests_c cpu_test) add_dependencies(buildtests_c cpu_test)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
@ -816,7 +815,6 @@ if(gRPC_BUILD_TESTS)
add_dependencies(buildtests_c inproc_callback_test) add_dependencies(buildtests_c inproc_callback_test)
add_dependencies(buildtests_c invalid_call_argument_test) add_dependencies(buildtests_c invalid_call_argument_test)
add_dependencies(buildtests_c load_file_test) add_dependencies(buildtests_c load_file_test)
add_dependencies(buildtests_c message_compress_test)
add_dependencies(buildtests_c minimal_stack_is_minimal_test) add_dependencies(buildtests_c minimal_stack_is_minimal_test)
add_dependencies(buildtests_c multiple_server_queues_test) add_dependencies(buildtests_c multiple_server_queues_test)
add_dependencies(buildtests_c murmur_hash_test) add_dependencies(buildtests_c murmur_hash_test)
@ -939,6 +937,7 @@ if(gRPC_BUILD_TESTS)
add_dependencies(buildtests_cxx codegen_test_full) add_dependencies(buildtests_cxx codegen_test_full)
add_dependencies(buildtests_cxx codegen_test_minimal) add_dependencies(buildtests_cxx codegen_test_minimal)
add_dependencies(buildtests_cxx completion_queue_threading_test) add_dependencies(buildtests_cxx completion_queue_threading_test)
add_dependencies(buildtests_cxx compression_test)
add_dependencies(buildtests_cxx concurrent_connectivity_test) add_dependencies(buildtests_cxx concurrent_connectivity_test)
add_dependencies(buildtests_cxx connection_prefix_bad_client_test) add_dependencies(buildtests_cxx connection_prefix_bad_client_test)
add_dependencies(buildtests_cxx connectivity_state_test) add_dependencies(buildtests_cxx connectivity_state_test)
@ -1059,6 +1058,7 @@ if(gRPC_BUILD_TESTS)
endif() endif()
add_dependencies(buildtests_cxx memory_quota_test) add_dependencies(buildtests_cxx memory_quota_test)
add_dependencies(buildtests_cxx message_allocator_end2end_test) add_dependencies(buildtests_cxx message_allocator_end2end_test)
add_dependencies(buildtests_cxx message_compress_test)
add_dependencies(buildtests_cxx metadata_map_test) add_dependencies(buildtests_cxx metadata_map_test)
add_dependencies(buildtests_cxx miscompile_with_no_unique_address_test) add_dependencies(buildtests_cxx miscompile_with_no_unique_address_test)
add_dependencies(buildtests_cxx mock_stream_test) add_dependencies(buildtests_cxx mock_stream_test)
@ -4509,34 +4509,6 @@ endif()
endif() endif()
if(gRPC_BUILD_TESTS) if(gRPC_BUILD_TESTS)
add_executable(compression_test
test/core/compression/args_utils.cc
test/core/compression/compression_test.cc
)
target_include_directories(compression_test
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
${_gRPC_RE2_INCLUDE_DIR}
${_gRPC_SSL_INCLUDE_DIR}
${_gRPC_UPB_GENERATED_DIR}
${_gRPC_UPB_GRPC_GENERATED_DIR}
${_gRPC_UPB_INCLUDE_DIR}
${_gRPC_XXHASH_INCLUDE_DIR}
${_gRPC_ZLIB_INCLUDE_DIR}
)
target_link_libraries(compression_test
${_gRPC_ALLTARGETS_LIBRARIES}
grpc_test_util
)
endif()
if(gRPC_BUILD_TESTS)
add_executable(connection_refused_test add_executable(connection_refused_test
test/core/end2end/connection_refused_test.cc test/core/end2end/connection_refused_test.cc
test/core/end2end/cq_verifier.cc test/core/end2end/cq_verifier.cc
@ -4966,33 +4938,6 @@ target_link_libraries(load_file_test
) )
endif()
if(gRPC_BUILD_TESTS)
add_executable(message_compress_test
test/core/compression/message_compress_test.cc
)
target_include_directories(message_compress_test
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
${_gRPC_RE2_INCLUDE_DIR}
${_gRPC_SSL_INCLUDE_DIR}
${_gRPC_UPB_GENERATED_DIR}
${_gRPC_UPB_GRPC_GENERATED_DIR}
${_gRPC_UPB_INCLUDE_DIR}
${_gRPC_XXHASH_INCLUDE_DIR}
${_gRPC_ZLIB_INCLUDE_DIR}
)
target_link_libraries(message_compress_test
${_gRPC_ALLTARGETS_LIBRARIES}
grpc_test_util
)
endif() endif()
if(gRPC_BUILD_TESTS) if(gRPC_BUILD_TESTS)
@ -8529,6 +8474,42 @@ target_link_libraries(completion_queue_threading_test
) )
endif()
if(gRPC_BUILD_TESTS)
add_executable(compression_test
test/core/compression/args_utils.cc
test/core/compression/compression_test.cc
third_party/googletest/googletest/src/gtest-all.cc
third_party/googletest/googlemock/src/gmock-all.cc
)
target_include_directories(compression_test
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
${_gRPC_RE2_INCLUDE_DIR}
${_gRPC_SSL_INCLUDE_DIR}
${_gRPC_UPB_GENERATED_DIR}
${_gRPC_UPB_GRPC_GENERATED_DIR}
${_gRPC_UPB_INCLUDE_DIR}
${_gRPC_XXHASH_INCLUDE_DIR}
${_gRPC_ZLIB_INCLUDE_DIR}
third_party/googletest/googletest/include
third_party/googletest/googletest
third_party/googletest/googlemock/include
third_party/googletest/googlemock
${_gRPC_PROTO_GENS_DIR}
)
target_link_libraries(compression_test
${_gRPC_PROTOBUF_LIBRARIES}
${_gRPC_ALLTARGETS_LIBRARIES}
grpc_test_util
)
endif() endif()
if(gRPC_BUILD_TESTS) if(gRPC_BUILD_TESTS)
@ -12977,6 +12958,41 @@ target_link_libraries(message_allocator_end2end_test
) )
endif()
if(gRPC_BUILD_TESTS)
add_executable(message_compress_test
test/core/compression/message_compress_test.cc
third_party/googletest/googletest/src/gtest-all.cc
third_party/googletest/googlemock/src/gmock-all.cc
)
target_include_directories(message_compress_test
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
${_gRPC_RE2_INCLUDE_DIR}
${_gRPC_SSL_INCLUDE_DIR}
${_gRPC_UPB_GENERATED_DIR}
${_gRPC_UPB_GRPC_GENERATED_DIR}
${_gRPC_UPB_INCLUDE_DIR}
${_gRPC_XXHASH_INCLUDE_DIR}
${_gRPC_ZLIB_INCLUDE_DIR}
third_party/googletest/googletest/include
third_party/googletest/googletest
third_party/googletest/googlemock/include
third_party/googletest/googlemock
${_gRPC_PROTO_GENS_DIR}
)
target_link_libraries(message_compress_test
${_gRPC_PROTOBUF_LIBRARIES}
${_gRPC_ALLTARGETS_LIBRARIES}
grpc_test_util
)
endif() endif()
if(gRPC_BUILD_TESTS) if(gRPC_BUILD_TESTS)

@ -3279,17 +3279,6 @@ targets:
- linux - linux
- posix - posix
- mac - mac
- name: compression_test
build: test
language: c
headers:
- test/core/compression/args_utils.h
src:
- test/core/compression/args_utils.cc
- test/core/compression/compression_test.cc
deps:
- grpc_test_util
uses_polling: false
- name: connection_refused_test - name: connection_refused_test
build: test build: test
language: c language: c
@ -3459,15 +3448,6 @@ targets:
deps: deps:
- grpc_test_util - grpc_test_util
uses_polling: false uses_polling: false
- name: message_compress_test
build: test
language: c
headers: []
src:
- test/core/compression/message_compress_test.cc
deps:
- grpc_test_util
uses_polling: false
- name: minimal_stack_is_minimal_test - name: minimal_stack_is_minimal_test
build: test build: test
language: c language: c
@ -4919,6 +4899,18 @@ targets:
- test/core/surface/completion_queue_threading_test.cc - test/core/surface/completion_queue_threading_test.cc
deps: deps:
- grpc_test_util - grpc_test_util
- name: compression_test
gtest: true
build: test
language: c++
headers:
- test/core/compression/args_utils.h
src:
- test/core/compression/args_utils.cc
- test/core/compression/compression_test.cc
deps:
- grpc_test_util
uses_polling: false
- name: concurrent_connectivity_test - name: concurrent_connectivity_test
gtest: true gtest: true
build: test build: test
@ -6813,6 +6805,16 @@ targets:
- test/cpp/end2end/test_service_impl.cc - test/cpp/end2end/test_service_impl.cc
deps: deps:
- grpc++_test_util - grpc++_test_util
- name: message_compress_test
gtest: true
build: test
language: c++
headers: []
src:
- test/core/compression/message_compress_test.cc
deps:
- grpc_test_util
uses_polling: false
- name: metadata_map_test - name: metadata_map_test
gtest: true gtest: true
build: test build: test

@ -36,6 +36,7 @@ grpc_cc_library(
grpc_cc_test( grpc_cc_test(
name = "compression_test", name = "compression_test",
srcs = ["compression_test.cc"], srcs = ["compression_test.cc"],
external_deps = ["gtest"],
language = "C++", language = "C++",
uses_event_engine = False, uses_event_engine = False,
uses_polling = False, uses_polling = False,
@ -76,6 +77,7 @@ grpc_fuzzer(
grpc_cc_test( grpc_cc_test(
name = "message_compress_test", name = "message_compress_test",
srcs = ["message_compress_test.cc"], srcs = ["message_compress_test.cc"],
external_deps = ["gtest"],
language = "C++", language = "C++",
uses_event_engine = False, uses_event_engine = False,
uses_polling = False, uses_polling = False,

@ -19,6 +19,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <gtest/gtest.h>
#include <grpc/compression.h> #include <grpc/compression.h>
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
@ -30,7 +32,7 @@
#include "test/core/compression/args_utils.h" #include "test/core/compression/args_utils.h"
#include "test/core/util/test_config.h" #include "test/core/util/test_config.h"
static void test_compression_algorithm_parse(void) { TEST(CompressionTest, CompressionAlgorithmParse) {
size_t i; size_t i;
const char* valid_names[] = {"identity", "gzip", "deflate"}; const char* valid_names[] = {"identity", "gzip", "deflate"};
const grpc_compression_algorithm valid_algorithms[] = { const grpc_compression_algorithm valid_algorithms[] = {
@ -47,8 +49,8 @@ static void test_compression_algorithm_parse(void) {
grpc_compression_algorithm algorithm; grpc_compression_algorithm algorithm;
const int success = grpc_compression_algorithm_parse( const int success = grpc_compression_algorithm_parse(
grpc_slice_from_static_string(valid_name), &algorithm); grpc_slice_from_static_string(valid_name), &algorithm);
GPR_ASSERT(success != 0); ASSERT_NE(success, 0);
GPR_ASSERT(algorithm == valid_algorithms[i]); ASSERT_EQ(algorithm, valid_algorithms[i]);
} }
for (i = 0; i < GPR_ARRAY_SIZE(invalid_names); i++) { for (i = 0; i < GPR_ARRAY_SIZE(invalid_names); i++) {
@ -57,12 +59,12 @@ static void test_compression_algorithm_parse(void) {
int success; int success;
success = grpc_compression_algorithm_parse( success = grpc_compression_algorithm_parse(
grpc_slice_from_static_string(invalid_name), &algorithm); grpc_slice_from_static_string(invalid_name), &algorithm);
GPR_ASSERT(success == 0); ASSERT_EQ(success, 0);
/* the value of "algorithm" is undefined upon failure */ /* the value of "algorithm" is undefined upon failure */
} }
} }
static void test_compression_algorithm_name(void) { TEST(CompressionTest, CompressionAlgorithmName) {
int success; int success;
const char* name; const char* name;
size_t i; size_t i;
@ -77,17 +79,17 @@ static void test_compression_algorithm_name(void) {
for (i = 0; i < GPR_ARRAY_SIZE(valid_algorithms); i++) { for (i = 0; i < GPR_ARRAY_SIZE(valid_algorithms); i++) {
success = grpc_compression_algorithm_name(valid_algorithms[i], &name); success = grpc_compression_algorithm_name(valid_algorithms[i], &name);
GPR_ASSERT(success != 0); ASSERT_NE(success, 0);
GPR_ASSERT(strcmp(name, valid_names[i]) == 0); ASSERT_STREQ(name, valid_names[i]);
} }
success = success =
grpc_compression_algorithm_name(GRPC_COMPRESS_ALGORITHMS_COUNT, &name); grpc_compression_algorithm_name(GRPC_COMPRESS_ALGORITHMS_COUNT, &name);
GPR_ASSERT(success == 0); ASSERT_EQ(success, 0);
/* the value of "name" is undefined upon failure */ /* the value of "name" is undefined upon failure */
} }
static void test_compression_algorithm_for_level(void) { TEST(CompressionTest, CompressionAlgorithmForLevel) {
gpr_log(GPR_DEBUG, "test_compression_algorithm_for_level"); gpr_log(GPR_DEBUG, "test_compression_algorithm_for_level");
{ {
@ -95,19 +97,19 @@ static void test_compression_algorithm_for_level(void) {
uint32_t accepted_encodings = 0; uint32_t accepted_encodings = 0;
grpc_core::SetBit(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */ grpc_core::SetBit(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */
GPR_ASSERT(GRPC_COMPRESS_NONE == ASSERT_EQ(GRPC_COMPRESS_NONE,
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE, grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE,
accepted_encodings)); accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_NONE == ASSERT_EQ(GRPC_COMPRESS_NONE,
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW, grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW,
accepted_encodings)); accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_NONE == ASSERT_EQ(GRPC_COMPRESS_NONE,
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED, grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED,
accepted_encodings)); accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_NONE == ASSERT_EQ(GRPC_COMPRESS_NONE,
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH, grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH,
accepted_encodings)); accepted_encodings));
} }
@ -118,19 +120,19 @@ static void test_compression_algorithm_for_level(void) {
grpc_core::SetBit(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */ grpc_core::SetBit(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */
grpc_core::SetBit(&accepted_encodings, GRPC_COMPRESS_GZIP); grpc_core::SetBit(&accepted_encodings, GRPC_COMPRESS_GZIP);
GPR_ASSERT(GRPC_COMPRESS_NONE == ASSERT_EQ(GRPC_COMPRESS_NONE,
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE, grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE,
accepted_encodings)); accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_GZIP == ASSERT_EQ(GRPC_COMPRESS_GZIP,
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW, grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW,
accepted_encodings)); accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_GZIP == ASSERT_EQ(GRPC_COMPRESS_GZIP,
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED, grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED,
accepted_encodings)); accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_GZIP == ASSERT_EQ(GRPC_COMPRESS_GZIP,
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH, grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH,
accepted_encodings)); accepted_encodings));
} }
@ -141,19 +143,19 @@ static void test_compression_algorithm_for_level(void) {
grpc_core::SetBit(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */ grpc_core::SetBit(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */
grpc_core::SetBit(&accepted_encodings, GRPC_COMPRESS_DEFLATE); grpc_core::SetBit(&accepted_encodings, GRPC_COMPRESS_DEFLATE);
GPR_ASSERT(GRPC_COMPRESS_NONE == ASSERT_EQ(GRPC_COMPRESS_NONE,
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE, grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE,
accepted_encodings)); accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_DEFLATE == ASSERT_EQ(GRPC_COMPRESS_DEFLATE,
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW, grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW,
accepted_encodings)); accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_DEFLATE == ASSERT_EQ(GRPC_COMPRESS_DEFLATE,
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED, grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED,
accepted_encodings)); accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_DEFLATE == ASSERT_EQ(GRPC_COMPRESS_DEFLATE,
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH, grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH,
accepted_encodings)); accepted_encodings));
} }
@ -165,19 +167,19 @@ static void test_compression_algorithm_for_level(void) {
grpc_core::SetBit(&accepted_encodings, GRPC_COMPRESS_GZIP); grpc_core::SetBit(&accepted_encodings, GRPC_COMPRESS_GZIP);
grpc_core::SetBit(&accepted_encodings, GRPC_COMPRESS_DEFLATE); grpc_core::SetBit(&accepted_encodings, GRPC_COMPRESS_DEFLATE);
GPR_ASSERT(GRPC_COMPRESS_NONE == ASSERT_EQ(GRPC_COMPRESS_NONE,
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE, grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE,
accepted_encodings)); accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_GZIP == ASSERT_EQ(GRPC_COMPRESS_GZIP,
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW, grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW,
accepted_encodings)); accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_DEFLATE == ASSERT_EQ(GRPC_COMPRESS_DEFLATE,
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED, grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED,
accepted_encodings)); accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_DEFLATE == ASSERT_EQ(GRPC_COMPRESS_DEFLATE,
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH, grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH,
accepted_encodings)); accepted_encodings));
} }
@ -189,25 +191,25 @@ static void test_compression_algorithm_for_level(void) {
grpc_core::SetBit(&accepted_encodings, GRPC_COMPRESS_GZIP); grpc_core::SetBit(&accepted_encodings, GRPC_COMPRESS_GZIP);
grpc_core::SetBit(&accepted_encodings, GRPC_COMPRESS_DEFLATE); grpc_core::SetBit(&accepted_encodings, GRPC_COMPRESS_DEFLATE);
GPR_ASSERT(GRPC_COMPRESS_NONE == ASSERT_EQ(GRPC_COMPRESS_NONE,
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE, grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE,
accepted_encodings)); accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_GZIP == ASSERT_EQ(GRPC_COMPRESS_GZIP,
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW, grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW,
accepted_encodings)); accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_DEFLATE == ASSERT_EQ(GRPC_COMPRESS_DEFLATE,
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED, grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED,
accepted_encodings)); accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_DEFLATE == ASSERT_EQ(GRPC_COMPRESS_DEFLATE,
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH, grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH,
accepted_encodings)); accepted_encodings));
} }
} }
static void test_compression_enable_disable_algorithm(void) { TEST(CompressionTest, CompressionEnableDisableAlgorithm) {
grpc_compression_options options; grpc_compression_options options;
grpc_compression_algorithm algorithm; grpc_compression_algorithm algorithm;
@ -219,8 +221,8 @@ static void test_compression_enable_disable_algorithm(void) {
algorithm = static_cast<grpc_compression_algorithm>( algorithm = static_cast<grpc_compression_algorithm>(
static_cast<int>(algorithm) + 1)) { static_cast<int>(algorithm) + 1)) {
/* all algorithms are enabled by default */ /* all algorithms are enabled by default */
GPR_ASSERT(grpc_compression_options_is_algorithm_enabled(&options, ASSERT_NE(
algorithm) != 0); grpc_compression_options_is_algorithm_enabled(&options, algorithm), 0);
} }
/* disable one by one */ /* disable one by one */
for (algorithm = GRPC_COMPRESS_NONE; for (algorithm = GRPC_COMPRESS_NONE;
@ -228,8 +230,8 @@ static void test_compression_enable_disable_algorithm(void) {
algorithm = static_cast<grpc_compression_algorithm>( algorithm = static_cast<grpc_compression_algorithm>(
static_cast<int>(algorithm) + 1)) { static_cast<int>(algorithm) + 1)) {
grpc_compression_options_disable_algorithm(&options, algorithm); grpc_compression_options_disable_algorithm(&options, algorithm);
GPR_ASSERT(grpc_compression_options_is_algorithm_enabled(&options, ASSERT_EQ(
algorithm) == 0); grpc_compression_options_is_algorithm_enabled(&options, algorithm), 0);
} }
/* re-enable one by one */ /* re-enable one by one */
for (algorithm = GRPC_COMPRESS_NONE; for (algorithm = GRPC_COMPRESS_NONE;
@ -237,26 +239,26 @@ static void test_compression_enable_disable_algorithm(void) {
algorithm = static_cast<grpc_compression_algorithm>( algorithm = static_cast<grpc_compression_algorithm>(
static_cast<int>(algorithm) + 1)) { static_cast<int>(algorithm) + 1)) {
grpc_compression_options_enable_algorithm(&options, algorithm); grpc_compression_options_enable_algorithm(&options, algorithm);
GPR_ASSERT(grpc_compression_options_is_algorithm_enabled(&options, ASSERT_NE(
algorithm) != 0); grpc_compression_options_is_algorithm_enabled(&options, algorithm), 0);
} }
} }
static void test_channel_args_set_compression_algorithm(void) { TEST(CompressionTest, ChannelArgsSetCompressionAlgorithm) {
grpc_core::ExecCtx exec_ctx; grpc_core::ExecCtx exec_ctx;
const grpc_channel_args* ch_args; const grpc_channel_args* ch_args;
ch_args = grpc_channel_args_set_channel_default_compression_algorithm( ch_args = grpc_channel_args_set_channel_default_compression_algorithm(
nullptr, GRPC_COMPRESS_GZIP); nullptr, GRPC_COMPRESS_GZIP);
GPR_ASSERT(ch_args->num_args == 1); ASSERT_EQ(ch_args->num_args, 1);
GPR_ASSERT(strcmp(ch_args->args[0].key, ASSERT_STREQ(ch_args->args[0].key,
GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM) == 0); GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM);
GPR_ASSERT(ch_args->args[0].type == GRPC_ARG_INTEGER); ASSERT_EQ(ch_args->args[0].type, GRPC_ARG_INTEGER);
grpc_channel_args_destroy(ch_args); grpc_channel_args_destroy(ch_args);
} }
static void test_channel_args_compression_algorithm_states(void) { TEST(CompressionTest, ChannelArgsCompressionAlgorithmStates) {
grpc_core::ExecCtx exec_ctx; grpc_core::ExecCtx exec_ctx;
grpc_core::CompressionAlgorithmSet states; grpc_core::CompressionAlgorithmSet states;
@ -266,40 +268,40 @@ static void test_channel_args_compression_algorithm_states(void) {
states = grpc_core::CompressionAlgorithmSet::FromChannelArgs(ch_args); states = grpc_core::CompressionAlgorithmSet::FromChannelArgs(ch_args);
for (size_t i = 0; i < GRPC_COMPRESS_ALGORITHMS_COUNT; i++) { for (size_t i = 0; i < GRPC_COMPRESS_ALGORITHMS_COUNT; i++) {
GPR_ASSERT(states.IsSet(static_cast<grpc_compression_algorithm>(i))); ASSERT_TRUE(states.IsSet(static_cast<grpc_compression_algorithm>(i)));
} }
/* disable gzip and deflate and stream/gzip */ /* disable gzip and deflate and stream/gzip */
const grpc_channel_args* ch_args_wo_gzip = const grpc_channel_args* ch_args_wo_gzip =
grpc_channel_args_compression_algorithm_set_state(&ch_args, grpc_channel_args_compression_algorithm_set_state(&ch_args,
GRPC_COMPRESS_GZIP, 0); GRPC_COMPRESS_GZIP, 0);
GPR_ASSERT(ch_args == ch_args_wo_gzip); ASSERT_EQ(ch_args, ch_args_wo_gzip);
const grpc_channel_args* ch_args_wo_gzip_deflate = const grpc_channel_args* ch_args_wo_gzip_deflate =
grpc_channel_args_compression_algorithm_set_state( grpc_channel_args_compression_algorithm_set_state(
&ch_args_wo_gzip, GRPC_COMPRESS_DEFLATE, 0); &ch_args_wo_gzip, GRPC_COMPRESS_DEFLATE, 0);
GPR_ASSERT(ch_args_wo_gzip == ch_args_wo_gzip_deflate); ASSERT_EQ(ch_args_wo_gzip, ch_args_wo_gzip_deflate);
states = grpc_core::CompressionAlgorithmSet::FromChannelArgs( states = grpc_core::CompressionAlgorithmSet::FromChannelArgs(
ch_args_wo_gzip_deflate); ch_args_wo_gzip_deflate);
for (size_t i = 0; i < GRPC_COMPRESS_ALGORITHMS_COUNT; i++) { for (size_t i = 0; i < GRPC_COMPRESS_ALGORITHMS_COUNT; i++) {
if (i == GRPC_COMPRESS_GZIP || i == GRPC_COMPRESS_DEFLATE) { if (i == GRPC_COMPRESS_GZIP || i == GRPC_COMPRESS_DEFLATE) {
GPR_ASSERT(!states.IsSet(static_cast<grpc_compression_algorithm>(i))); ASSERT_FALSE(states.IsSet(static_cast<grpc_compression_algorithm>(i)));
} else { } else {
GPR_ASSERT(states.IsSet(static_cast<grpc_compression_algorithm>(i))); ASSERT_TRUE(states.IsSet(static_cast<grpc_compression_algorithm>(i)));
} }
} }
/* re-enabled gzip only */ /* re-enabled gzip only */
ch_args_wo_gzip = grpc_channel_args_compression_algorithm_set_state( ch_args_wo_gzip = grpc_channel_args_compression_algorithm_set_state(
&ch_args_wo_gzip_deflate, GRPC_COMPRESS_GZIP, 1); &ch_args_wo_gzip_deflate, GRPC_COMPRESS_GZIP, 1);
GPR_ASSERT(ch_args_wo_gzip == ch_args_wo_gzip_deflate); ASSERT_EQ(ch_args_wo_gzip, ch_args_wo_gzip_deflate);
states = grpc_core::CompressionAlgorithmSet::FromChannelArgs(ch_args_wo_gzip); states = grpc_core::CompressionAlgorithmSet::FromChannelArgs(ch_args_wo_gzip);
for (size_t i = 0; i < GRPC_COMPRESS_ALGORITHMS_COUNT; i++) { for (size_t i = 0; i < GRPC_COMPRESS_ALGORITHMS_COUNT; i++) {
if (i == GRPC_COMPRESS_DEFLATE) { if (i == GRPC_COMPRESS_DEFLATE) {
GPR_ASSERT(!states.IsSet(static_cast<grpc_compression_algorithm>(i))); ASSERT_FALSE(states.IsSet(static_cast<grpc_compression_algorithm>(i)));
} else { } else {
GPR_ASSERT(states.IsSet(static_cast<grpc_compression_algorithm>(i))); ASSERT_TRUE(states.IsSet(static_cast<grpc_compression_algorithm>(i)));
} }
} }
@ -308,13 +310,7 @@ static void test_channel_args_compression_algorithm_states(void) {
int main(int argc, char** argv) { int main(int argc, char** argv) {
grpc::testing::TestEnvironment env(&argc, argv); grpc::testing::TestEnvironment env(&argc, argv);
grpc_init(); ::testing::InitGoogleTest(&argc, argv);
test_compression_algorithm_parse(); grpc::testing::TestGrpcScope grpc_scope;
test_compression_algorithm_name(); return RUN_ALL_TESTS();
test_compression_algorithm_for_level();
test_compression_enable_disable_algorithm();
test_channel_args_set_compression_algorithm();
test_channel_args_compression_algorithm_states();
grpc_shutdown();
return 0;
} }

@ -21,6 +21,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <gtest/gtest.h>
#include <grpc/compression.h> #include <grpc/compression.h>
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
@ -52,7 +54,7 @@ static void assert_passthrough(grpc_slice value,
int was_compressed; int was_compressed;
const char* algorithm_name; const char* algorithm_name;
GPR_ASSERT(grpc_compression_algorithm_name(algorithm, &algorithm_name) != 0); ASSERT_NE(grpc_compression_algorithm_name(algorithm, &algorithm_name), 0);
gpr_log(GPR_INFO, gpr_log(GPR_INFO,
"assert_passthrough: value_length=%" PRIuPTR "assert_passthrough: value_length=%" PRIuPTR
" value_hash=0x%08x " " value_hash=0x%08x "
@ -74,14 +76,14 @@ static void assert_passthrough(grpc_slice value,
grpc_core::ExecCtx exec_ctx; grpc_core::ExecCtx exec_ctx;
was_compressed = grpc_msg_compress(algorithm, &input, &compressed_raw); was_compressed = grpc_msg_compress(algorithm, &input, &compressed_raw);
} }
GPR_ASSERT(input.count > 0); ASSERT_GT(input.count, 0);
switch (compress_result_check) { switch (compress_result_check) {
case SHOULD_NOT_COMPRESS: case SHOULD_NOT_COMPRESS:
GPR_ASSERT(was_compressed == 0); ASSERT_EQ(was_compressed, 0);
break; break;
case SHOULD_COMPRESS: case SHOULD_COMPRESS:
GPR_ASSERT(was_compressed == 1); ASSERT_EQ(was_compressed, 1);
break; break;
case MAYBE_COMPRESSES: case MAYBE_COMPRESSES:
/* no check */ /* no check */
@ -92,12 +94,12 @@ static void assert_passthrough(grpc_slice value,
{ {
grpc_core::ExecCtx exec_ctx; grpc_core::ExecCtx exec_ctx;
GPR_ASSERT(grpc_msg_decompress( ASSERT_TRUE(grpc_msg_decompress(
was_compressed ? algorithm : GRPC_COMPRESS_NONE, &compressed, &output)); was_compressed ? algorithm : GRPC_COMPRESS_NONE, &compressed, &output));
} }
final = grpc_slice_merge(output.slices, output.count); final = grpc_slice_merge(output.slices, output.count);
GPR_ASSERT(grpc_slice_eq(value, final)); ASSERT_TRUE(grpc_slice_eq(value, final));
grpc_slice_buffer_destroy(&input); grpc_slice_buffer_destroy(&input);
grpc_slice_buffer_destroy(&compressed); grpc_slice_buffer_destroy(&compressed);
@ -141,7 +143,7 @@ static grpc_slice create_test_value(test_value id) {
return grpc_slice_from_copied_string("bad value"); return grpc_slice_from_copied_string("bad value");
} }
static void test_tiny_data_compress(void) { TEST(MessageCompressTest, TinyDataCompress) {
grpc_slice_buffer input; grpc_slice_buffer input;
grpc_slice_buffer output; grpc_slice_buffer output;
@ -152,17 +154,16 @@ static void test_tiny_data_compress(void) {
for (int i = 0; i < GRPC_COMPRESS_ALGORITHMS_COUNT; i++) { for (int i = 0; i < GRPC_COMPRESS_ALGORITHMS_COUNT; i++) {
if (i == GRPC_COMPRESS_NONE) continue; if (i == GRPC_COMPRESS_NONE) continue;
grpc_core::ExecCtx exec_ctx; grpc_core::ExecCtx exec_ctx;
GPR_ASSERT(0 == ASSERT_EQ(0, grpc_msg_compress(static_cast<grpc_compression_algorithm>(i),
grpc_msg_compress(static_cast<grpc_compression_algorithm>(i),
&input, &output)); &input, &output));
GPR_ASSERT(1 == output.count); ASSERT_EQ(1, output.count);
} }
grpc_slice_buffer_destroy(&input); grpc_slice_buffer_destroy(&input);
grpc_slice_buffer_destroy(&output); grpc_slice_buffer_destroy(&output);
} }
static void test_bad_decompression_data_crc(void) { TEST(MessageCompressTest, BadDecompressionDataCrc) {
grpc_slice_buffer input; grpc_slice_buffer input;
grpc_slice_buffer corrupted; grpc_slice_buffer corrupted;
grpc_slice_buffer output; grpc_slice_buffer output;
@ -178,20 +179,20 @@ static void test_bad_decompression_data_crc(void) {
/* compress it */ /* compress it */
grpc_msg_compress(GRPC_COMPRESS_GZIP, &input, &corrupted); grpc_msg_compress(GRPC_COMPRESS_GZIP, &input, &corrupted);
/* corrupt the output by smashing the CRC */ /* corrupt the output by smashing the CRC */
GPR_ASSERT(corrupted.count > 1); ASSERT_GT(corrupted.count, 1);
GPR_ASSERT(GRPC_SLICE_LENGTH(corrupted.slices[1]) > 8); ASSERT_GT(GRPC_SLICE_LENGTH(corrupted.slices[1]), 8);
idx = GRPC_SLICE_LENGTH(corrupted.slices[1]) - 8; idx = GRPC_SLICE_LENGTH(corrupted.slices[1]) - 8;
memcpy(GRPC_SLICE_START_PTR(corrupted.slices[1]) + idx, &bad, 4); memcpy(GRPC_SLICE_START_PTR(corrupted.slices[1]) + idx, &bad, 4);
/* try (and fail) to decompress the corrupted compresed buffer */ /* try (and fail) to decompress the corrupted compresed buffer */
GPR_ASSERT(0 == grpc_msg_decompress(GRPC_COMPRESS_GZIP, &corrupted, &output)); ASSERT_EQ(0, grpc_msg_decompress(GRPC_COMPRESS_GZIP, &corrupted, &output));
grpc_slice_buffer_destroy(&input); grpc_slice_buffer_destroy(&input);
grpc_slice_buffer_destroy(&corrupted); grpc_slice_buffer_destroy(&corrupted);
grpc_slice_buffer_destroy(&output); grpc_slice_buffer_destroy(&output);
} }
static void test_bad_decompression_data_missing_trailer(void) { TEST(MessageCompressTest, BadDecompressionDataMissingTrailer) {
grpc_slice_buffer input; grpc_slice_buffer input;
grpc_slice_buffer decompressed; grpc_slice_buffer decompressed;
grpc_slice_buffer garbage; grpc_slice_buffer garbage;
@ -206,12 +207,11 @@ static void test_bad_decompression_data_missing_trailer(void) {
grpc_core::ExecCtx exec_ctx; grpc_core::ExecCtx exec_ctx;
/* compress it */ /* compress it */
grpc_msg_compress(GRPC_COMPRESS_GZIP, &input, &decompressed); grpc_msg_compress(GRPC_COMPRESS_GZIP, &input, &decompressed);
GPR_ASSERT(decompressed.length > 8); ASSERT_GT(decompressed.length, 8);
/* Remove the footer from the decompressed message */ /* Remove the footer from the decompressed message */
grpc_slice_buffer_trim_end(&decompressed, 8, &garbage); grpc_slice_buffer_trim_end(&decompressed, 8, &garbage);
/* try (and fail) to decompress the compressed buffer without the footer */ /* try (and fail) to decompress the compressed buffer without the footer */
GPR_ASSERT(0 == ASSERT_EQ(0, grpc_msg_decompress(GRPC_COMPRESS_GZIP, &decompressed, &output));
grpc_msg_decompress(GRPC_COMPRESS_GZIP, &decompressed, &output));
grpc_slice_buffer_destroy(&input); grpc_slice_buffer_destroy(&input);
grpc_slice_buffer_destroy(&decompressed); grpc_slice_buffer_destroy(&decompressed);
@ -219,7 +219,7 @@ static void test_bad_decompression_data_missing_trailer(void) {
grpc_slice_buffer_destroy(&output); grpc_slice_buffer_destroy(&output);
} }
static void test_bad_decompression_data_trailing_garbage(void) { TEST(MessageCompressTest, BadDecompressionDataTrailingGarbage) {
grpc_slice_buffer input; grpc_slice_buffer input;
grpc_slice_buffer output; grpc_slice_buffer output;
@ -232,13 +232,13 @@ static void test_bad_decompression_data_trailing_garbage(void) {
/* try (and fail) to decompress the invalid compresed buffer */ /* try (and fail) to decompress the invalid compresed buffer */
grpc_core::ExecCtx exec_ctx; grpc_core::ExecCtx exec_ctx;
GPR_ASSERT(0 == grpc_msg_decompress(GRPC_COMPRESS_DEFLATE, &input, &output)); ASSERT_EQ(0, grpc_msg_decompress(GRPC_COMPRESS_DEFLATE, &input, &output));
grpc_slice_buffer_destroy(&input); grpc_slice_buffer_destroy(&input);
grpc_slice_buffer_destroy(&output); grpc_slice_buffer_destroy(&output);
} }
static void test_bad_decompression_data_stream(void) { TEST(MessageCompressTest, BadDecompressionDataStream) {
grpc_slice_buffer input; grpc_slice_buffer input;
grpc_slice_buffer output; grpc_slice_buffer output;
@ -249,13 +249,13 @@ static void test_bad_decompression_data_stream(void) {
/* try (and fail) to decompress the invalid compresed buffer */ /* try (and fail) to decompress the invalid compresed buffer */
grpc_core::ExecCtx exec_ctx; grpc_core::ExecCtx exec_ctx;
GPR_ASSERT(0 == grpc_msg_decompress(GRPC_COMPRESS_DEFLATE, &input, &output)); ASSERT_EQ(0, grpc_msg_decompress(GRPC_COMPRESS_DEFLATE, &input, &output));
grpc_slice_buffer_destroy(&input); grpc_slice_buffer_destroy(&input);
grpc_slice_buffer_destroy(&output); grpc_slice_buffer_destroy(&output);
} }
static void test_bad_compression_algorithm(void) { TEST(MessageCompressTest, BadCompressionAlgorithm) {
grpc_slice_buffer input; grpc_slice_buffer input;
grpc_slice_buffer output; grpc_slice_buffer output;
int was_compressed; int was_compressed;
@ -268,18 +268,18 @@ static void test_bad_compression_algorithm(void) {
grpc_core::ExecCtx exec_ctx; grpc_core::ExecCtx exec_ctx;
was_compressed = was_compressed =
grpc_msg_compress(GRPC_COMPRESS_ALGORITHMS_COUNT, &input, &output); grpc_msg_compress(GRPC_COMPRESS_ALGORITHMS_COUNT, &input, &output);
GPR_ASSERT(0 == was_compressed); ASSERT_EQ(0, was_compressed);
was_compressed = grpc_msg_compress(static_cast<grpc_compression_algorithm>( was_compressed = grpc_msg_compress(static_cast<grpc_compression_algorithm>(
GRPC_COMPRESS_ALGORITHMS_COUNT + 123), GRPC_COMPRESS_ALGORITHMS_COUNT + 123),
&input, &output); &input, &output);
GPR_ASSERT(0 == was_compressed); ASSERT_EQ(0, was_compressed);
grpc_slice_buffer_destroy(&input); grpc_slice_buffer_destroy(&input);
grpc_slice_buffer_destroy(&output); grpc_slice_buffer_destroy(&output);
} }
static void test_bad_decompression_algorithm(void) { TEST(MessageCompressTest, BadDecompressionAlgorithm) {
grpc_slice_buffer input; grpc_slice_buffer input;
grpc_slice_buffer output; grpc_slice_buffer output;
int was_decompressed; int was_decompressed;
@ -292,29 +292,29 @@ static void test_bad_decompression_algorithm(void) {
grpc_core::ExecCtx exec_ctx; grpc_core::ExecCtx exec_ctx;
was_decompressed = was_decompressed =
grpc_msg_decompress(GRPC_COMPRESS_ALGORITHMS_COUNT, &input, &output); grpc_msg_decompress(GRPC_COMPRESS_ALGORITHMS_COUNT, &input, &output);
GPR_ASSERT(0 == was_decompressed); ASSERT_EQ(0, was_decompressed);
was_decompressed = was_decompressed =
grpc_msg_decompress(static_cast<grpc_compression_algorithm>( grpc_msg_decompress(static_cast<grpc_compression_algorithm>(
GRPC_COMPRESS_ALGORITHMS_COUNT + 123), GRPC_COMPRESS_ALGORITHMS_COUNT + 123),
&input, &output); &input, &output);
GPR_ASSERT(0 == was_decompressed); ASSERT_EQ(0, was_decompressed);
grpc_slice_buffer_destroy(&input); grpc_slice_buffer_destroy(&input);
grpc_slice_buffer_destroy(&output); grpc_slice_buffer_destroy(&output);
} }
int main(int argc, char** argv) { int main(int argc, char** argv) {
grpc::testing::TestEnvironment env(&argc, argv);
::testing::InitGoogleTest(&argc, argv);
grpc::testing::TestGrpcScope grpc_scope;
unsigned i, j, k, m; unsigned i, j, k, m;
grpc_slice_split_mode uncompressed_split_modes[] = { grpc_slice_split_mode uncompressed_split_modes[] = {
GRPC_SLICE_SPLIT_IDENTITY, GRPC_SLICE_SPLIT_ONE_BYTE}; GRPC_SLICE_SPLIT_IDENTITY, GRPC_SLICE_SPLIT_ONE_BYTE};
grpc_slice_split_mode compressed_split_modes[] = {GRPC_SLICE_SPLIT_MERGE_ALL, grpc_slice_split_mode compressed_split_modes[] = {GRPC_SLICE_SPLIT_MERGE_ALL,
GRPC_SLICE_SPLIT_IDENTITY, GRPC_SLICE_SPLIT_IDENTITY,
GRPC_SLICE_SPLIT_ONE_BYTE}; GRPC_SLICE_SPLIT_ONE_BYTE};
grpc::testing::TestEnvironment env(&argc, argv);
grpc_init();
for (i = 0; i < GRPC_COMPRESS_ALGORITHMS_COUNT; i++) { for (i = 0; i < GRPC_COMPRESS_ALGORITHMS_COUNT; i++) {
for (j = 0; j < GPR_ARRAY_SIZE(uncompressed_split_modes); j++) { for (j = 0; j < GPR_ARRAY_SIZE(uncompressed_split_modes); j++) {
for (k = 0; k < GPR_ARRAY_SIZE(compressed_split_modes); k++) { for (k = 0; k < GPR_ARRAY_SIZE(compressed_split_modes); k++) {
@ -332,14 +332,5 @@ int main(int argc, char** argv) {
} }
} }
test_tiny_data_compress(); return RUN_ALL_TESTS();
test_bad_decompression_data_crc();
test_bad_decompression_data_missing_trailer();
test_bad_decompression_data_stream();
test_bad_decompression_data_trailing_garbage();
test_bad_compression_algorithm();
test_bad_decompression_algorithm();
grpc_shutdown();
return 0;
} }

@ -187,30 +187,6 @@
], ],
"uses_polling": true "uses_polling": true
}, },
{
"args": [],
"benchmark": false,
"ci_platforms": [
"linux",
"mac",
"posix",
"windows"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
"flaky": false,
"gtest": false,
"language": "c",
"name": "compression_test",
"platforms": [
"linux",
"mac",
"posix",
"windows"
],
"uses_polling": false
},
{ {
"args": [], "args": [],
"benchmark": false, "benchmark": false,
@ -561,30 +537,6 @@
], ],
"uses_polling": false "uses_polling": false
}, },
{
"args": [],
"benchmark": false,
"ci_platforms": [
"linux",
"mac",
"posix",
"windows"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
"flaky": false,
"gtest": false,
"language": "c",
"name": "message_compress_test",
"platforms": [
"linux",
"mac",
"posix",
"windows"
],
"uses_polling": false
},
{ {
"args": [], "args": [],
"benchmark": false, "benchmark": false,
@ -2673,6 +2625,30 @@
], ],
"uses_polling": false "uses_polling": false
}, },
{
"args": [],
"benchmark": false,
"ci_platforms": [
"linux",
"mac",
"posix",
"windows"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
"flaky": false,
"gtest": true,
"language": "c++",
"name": "compression_test",
"platforms": [
"linux",
"mac",
"posix",
"windows"
],
"uses_polling": false
},
{ {
"args": [], "args": [],
"benchmark": false, "benchmark": false,
@ -4831,6 +4807,30 @@
], ],
"uses_polling": true "uses_polling": true
}, },
{
"args": [],
"benchmark": false,
"ci_platforms": [
"linux",
"mac",
"posix",
"windows"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
"flaky": false,
"gtest": true,
"language": "c++",
"name": "message_compress_test",
"platforms": [
"linux",
"mac",
"posix",
"windows"
],
"uses_polling": false
},
{ {
"args": [], "args": [],
"benchmark": false, "benchmark": false,

Loading…
Cancel
Save