Skip to content

Commit 5824a44

Browse files
committed
Merge branch 'metrics_mqtt5' of github.com:awslabs/aws-c-mqtt into metrics_adapter
2 parents f074bdb + 1e05304 commit 5824a44

1 file changed

Lines changed: 1 addition & 28 deletions

File tree

tests/v5/mqtt5_operation_and_storage_tests.c

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -675,17 +675,6 @@ static int s_mqtt5_connect_storage_new_set_all_fn(struct aws_allocator *allocato
675675
.topic = aws_byte_cursor_from_c_str(PUBLISH_TOPIC),
676676
};
677677

678-
struct aws_mqtt_iot_sdk_metrics metrics = {
679-
.library_name = aws_byte_cursor_from_c_str("TestSDK/1.0"),
680-
// TODO: add more metrics fields as needed
681-
// .metadata_entries = NULL,
682-
// .metadata_count = 0,
683-
};
684-
685-
struct aws_mqtt5_client_options client_options = {
686-
.metrics = &metrics,
687-
};
688-
689678
struct aws_mqtt5_packet_connect_view connect_options = {
690679
.keep_alive_interval_seconds = 50,
691680
.client_id = aws_byte_cursor_from_string(s_client_id),
@@ -708,27 +697,11 @@ static int s_mqtt5_connect_storage_new_set_all_fn(struct aws_allocator *allocato
708697
struct aws_mqtt5_packet_connect_storage connect_storage;
709698
AWS_ZERO_STRUCT(connect_storage);
710699

711-
struct aws_mqtt5_client_options_storage *options_storage =
712-
aws_mqtt5_client_options_storage_new(allocator, &client_options);
713-
714-
ASSERT_SUCCESS(
715-
aws_mqtt5_packet_connect_storage_init(&connect_storage, allocator, &connect_options, options_storage));
716-
717-
aws_mqtt5_client_options_storage_destroy(options_storage);
718-
700+
ASSERT_SUCCESS(aws_mqtt5_packet_connect_storage_init(&connect_storage, allocator, &connect_options, NULL));
719701
ASSERT_SUCCESS(s_aws_mqtt5_connect_storage_verify_required_properties(&connect_storage, &connect_options));
720702

721703
struct aws_mqtt5_packet_connect_view *stored_view = &connect_storage.storage_view;
722704

723-
/* Build expected username with metrics */
724-
struct aws_byte_buf expected_username;
725-
AWS_ZERO_STRUCT(expected_username);
726-
aws_test_mqtt_build_expected_metrics(
727-
allocator, connect_options.username, metrics.library_name, NULL, &expected_username);
728-
ASSERT_BIN_ARRAYS_EQUALS(
729-
expected_username.buffer, expected_username.len, connect_storage.username.ptr, connect_storage.username.len);
730-
aws_byte_buf_clean_up(&expected_username);
731-
732705
AWS_VERIFY_VIEW_STORAGE_RELATIONSHIP_NULLABLE_CURSOR(&connect_storage, &connect_options, username);
733706
AWS_VERIFY_VIEW_STORAGE_RELATIONSHIP_NULLABLE_CURSOR(&connect_storage, &connect_options, password);
734707
AWS_VERIFY_VIEW_STORAGE_RELATIONSHIP_NULLABLE_UINT(

0 commit comments

Comments
 (0)