@@ -384,7 +384,7 @@ AWS_TEST_CASE_FIXTURE(
384
384
& s_test_data )
385
385
386
386
/* send various valid messages in serial to make sure the happy path of message parsing is correct. */
387
- static int s_test_channel_handler_msg_too_large_fails (struct aws_allocator * allocator , void * ctx ) {
387
+ static int s_test_channel_handler_large_msg_success (struct aws_allocator * allocator , void * ctx ) {
388
388
(void )allocator ;
389
389
390
390
struct test_data * test_data = ctx ;
@@ -395,7 +395,8 @@ static int s_test_channel_handler_msg_too_large_fails(struct aws_allocator *allo
395
395
test_data -> received_fn = s_test_on_single_message ;
396
396
test_data -> user_data = & message_test_data ;
397
397
398
- /* message is 1 byte too large */
398
+ /* message length is 16MB + 1 byte. We used to have our stream message limit set at 16MB. Now this test validates
399
+ * that we can send messages > 16MB */
399
400
uint8_t empty_message [] = {
400
401
0x01 ,
401
402
0x00 ,
@@ -417,15 +418,14 @@ static int s_test_channel_handler_msg_too_large_fails(struct aws_allocator *allo
417
418
418
419
struct aws_byte_cursor empty_message_cursor = aws_byte_cursor_from_array (empty_message , sizeof (empty_message ));
419
420
ASSERT_SUCCESS (testing_channel_push_read_data (& s_test_data .testing_channel , empty_message_cursor ));
420
- ASSERT_UINT_EQUALS (AWS_ERROR_EVENT_STREAM_MESSAGE_FIELD_SIZE_EXCEEDED , message_test_data .last_error_code );
421
-
421
+ ASSERT_UINT_EQUALS (AWS_OP_SUCCESS , message_test_data .last_error_code );
422
422
return AWS_OP_SUCCESS ;
423
423
}
424
424
425
425
AWS_TEST_CASE_FIXTURE (
426
- test_channel_handler_msg_too_large_fails ,
426
+ test_channel_handler_large_msg_success ,
427
427
s_fixture_setup ,
428
- s_test_channel_handler_msg_too_large_fails ,
428
+ s_test_channel_handler_large_msg_success ,
429
429
s_fixture_shutdown ,
430
430
& s_test_data )
431
431
0 commit comments