aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2017-07-21 16:23:08 -0700
committerGravatar Muxi Yan <mxyan@google.com>2017-07-21 16:23:08 -0700
commitc97fc14a0ece99339f56b313b862f1a28f48c8b8 (patch)
tree3ab8cc2c3d9744c61f97be53a818ec709c800cd9 /test/core
parent6a9833b377a4d76f70cbd67253954ecac0dcdc7c (diff)
Revert "Stream compression configuration"
Diffstat (limited to 'test/core')
-rw-r--r--test/core/compression/algorithm_test.c22
-rw-r--r--test/core/compression/message_compress_test.c3
2 files changed, 4 insertions, 21 deletions
diff --git a/test/core/compression/algorithm_test.c b/test/core/compression/algorithm_test.c
index ad1bea5092..e37c8c3010 100644
--- a/test/core/compression/algorithm_test.c
+++ b/test/core/compression/algorithm_test.c
@@ -42,29 +42,15 @@ static void test_algorithm_mesh(void) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
GPR_ASSERT(
grpc_compression_algorithm_name((grpc_compression_algorithm)i, &name));
- if (GRPC_IS_MESSAGE_COMPRESSION_ALGORITHM(i) || i == GRPC_COMPRESS_NONE) {
- GPR_ASSERT(grpc_compression_algorithm_parse(
- grpc_slice_from_static_string(name), &parsed));
- } else {
- GPR_ASSERT(grpc_stream_compression_algorithm_parse(
- grpc_slice_from_static_string(name), &parsed));
- }
+ GPR_ASSERT(grpc_compression_algorithm_parse(
+ grpc_slice_from_static_string(name), &parsed));
GPR_ASSERT((int)parsed == i);
mdstr = grpc_slice_from_copied_string(name);
GPR_ASSERT(grpc_slice_eq(mdstr, grpc_compression_algorithm_slice(parsed)));
- if (GRPC_IS_MESSAGE_COMPRESSION_ALGORITHM(i) || i == GRPC_COMPRESS_NONE) {
- GPR_ASSERT(parsed == grpc_compression_algorithm_from_slice(mdstr));
- } else {
- GPR_ASSERT(parsed == grpc_stream_compression_algorithm_from_slice(mdstr));
- }
+ GPR_ASSERT(parsed == grpc_compression_algorithm_from_slice(mdstr));
mdelem = grpc_compression_encoding_mdelem(parsed);
GPR_ASSERT(grpc_slice_eq(GRPC_MDVALUE(mdelem), mdstr));
- if (GRPC_IS_MESSAGE_COMPRESSION_ALGORITHM(i) || i == GRPC_COMPRESS_NONE) {
- GPR_ASSERT(grpc_slice_eq(GRPC_MDKEY(mdelem), GRPC_MDSTR_GRPC_ENCODING));
- } else {
- GPR_ASSERT(
- grpc_slice_eq(GRPC_MDKEY(mdelem), GRPC_MDSTR_CONTENT_ENCODING));
- }
+ GPR_ASSERT(grpc_slice_eq(GRPC_MDKEY(mdelem), GRPC_MDSTR_GRPC_ENCODING));
grpc_slice_unref_internal(&exec_ctx, mdstr);
GRPC_MDELEM_UNREF(&exec_ctx, mdelem);
grpc_exec_ctx_finish(&exec_ctx);
diff --git a/test/core/compression/message_compress_test.c b/test/core/compression/message_compress_test.c
index 28693b7eaa..fd692fe5a5 100644
--- a/test/core/compression/message_compress_test.c
+++ b/test/core/compression/message_compress_test.c
@@ -297,9 +297,6 @@ int main(int argc, char **argv) {
grpc_init();
for (i = 0; i < GRPC_COMPRESS_ALGORITHMS_COUNT; i++) {
- if (i != GRPC_COMPRESS_NONE && !GRPC_IS_MESSAGE_COMPRESSION_ALGORITHM(i)) {
- continue;
- }
for (j = 0; j < GPR_ARRAY_SIZE(uncompressed_split_modes); j++) {
for (k = 0; k < GPR_ARRAY_SIZE(compressed_split_modes); k++) {
for (m = 0; m < TEST_VALUE_COUNT; m++) {