diff options
Diffstat (limited to 'test/core/surface/byte_buffer_reader_test.cc')
-rw-r--r-- | test/core/surface/byte_buffer_reader_test.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/test/core/surface/byte_buffer_reader_test.cc b/test/core/surface/byte_buffer_reader_test.cc index 94a8615b3c..0c8a07c7fd 100644 --- a/test/core/surface/byte_buffer_reader_test.cc +++ b/test/core/surface/byte_buffer_reader_test.cc @@ -109,7 +109,7 @@ static void test_read_corrupted_slice(void) { LOG_TEST("test_read_corrupted_slice"); slice = grpc_slice_from_copied_string("test"); buffer = grpc_raw_byte_buffer_create(&slice, 1); - buffer->data.raw.compression = GRPC_COMPRESS_GZIP; /* lies! */ + buffer->data.raw.compression = GRPC_COMPRESS_MESSAGE_GZIP; /* lies! */ grpc_slice_unref(slice); GPR_ASSERT(!grpc_byte_buffer_reader_init(&reader, buffer)); grpc_byte_buffer_destroy(buffer); @@ -133,7 +133,10 @@ static void read_compressed_slice(grpc_compression_algorithm algorithm, grpc_slice_buffer_add(&sliceb_in, input_slice); /* takes ownership */ { grpc_core::ExecCtx exec_ctx; - GPR_ASSERT(grpc_msg_compress(algorithm, &sliceb_in, &sliceb_out)); + GPR_ASSERT(grpc_msg_compress( + + grpc_compression_algorithm_to_message_compression_algorithm(algorithm), + &sliceb_in, &sliceb_out)); } buffer = grpc_raw_compressed_byte_buffer_create(sliceb_out.slices, @@ -158,13 +161,13 @@ static void read_compressed_slice(grpc_compression_algorithm algorithm, static void test_read_gzip_compressed_slice(void) { const size_t INPUT_SIZE = 2048; LOG_TEST("test_read_gzip_compressed_slice"); - read_compressed_slice(GRPC_COMPRESS_GZIP, INPUT_SIZE); + read_compressed_slice(GRPC_COMPRESS_MESSAGE_GZIP, INPUT_SIZE); } static void test_read_deflate_compressed_slice(void) { const size_t INPUT_SIZE = 2048; LOG_TEST("test_read_deflate_compressed_slice"); - read_compressed_slice(GRPC_COMPRESS_DEFLATE, INPUT_SIZE); + read_compressed_slice(GRPC_COMPRESS_MESSAGE_DEFLATE, INPUT_SIZE); } static void test_byte_buffer_from_reader(void) { @@ -265,7 +268,6 @@ static void test_byte_buffer_copy(void) { int main(int argc, char** argv) { grpc_test_init(argc, argv); - grpc_init(); test_read_one_slice(); test_read_one_slice_malloc(); test_read_none_compressed_slice(); @@ -275,6 +277,5 @@ int main(int argc, char** argv) { test_byte_buffer_from_reader(); test_byte_buffer_copy(); test_readall(); - grpc_shutdown(); return 0; } |