diff --git a/iothub_client/tests/common_dt_e2e/iothubclient_common_dt_e2e.c b/iothub_client/tests/common_dt_e2e/iothubclient_common_dt_e2e.c index 229a226249..6726178e03 100644 --- a/iothub_client/tests/common_dt_e2e/iothubclient_common_dt_e2e.c +++ b/iothub_client/tests/common_dt_e2e/iothubclient_common_dt_e2e.c @@ -905,6 +905,11 @@ void dt_e2e_send_module_id_test(IOTHUB_CLIENT_TRANSPORT_PROVIDER protocol, IOTHU char *twinData = dt_e2e_get_twin_from_service(serviceClientDeviceTwinHandle, deviceToUse); + IoTHubDeviceTwin_Destroy(serviceClientDeviceTwinHandle); + IoTHubServiceClientAuth_Destroy(iotHubServiceClientHandle); + destroy_on_device_or_module(); + device_desired_deinit(deviceDesiredData); + JSON_Value *rootValue = json_parse_string(twinData); ASSERT_IS_NOT_NULL(rootValue); JSON_Object *rootObject = json_value_get_object(rootValue); @@ -916,10 +921,6 @@ void dt_e2e_send_module_id_test(IOTHUB_CLIENT_TRANSPORT_PROVIDER protocol, IOTHU // cleanup json_value_free(rootValue); free(twinData); - IoTHubDeviceTwin_Destroy(serviceClientDeviceTwinHandle); - IoTHubServiceClientAuth_Destroy(iotHubServiceClientHandle); - destroy_on_device_or_module(); - device_desired_deinit(deviceDesiredData); } diff --git a/iothub_client/tests/common_e2e/iothubclient_common_e2e.c b/iothub_client/tests/common_e2e/iothubclient_common_e2e.c index a91fa00a3c..59a752012e 100644 --- a/iothub_client/tests/common_e2e/iothubclient_common_e2e.c +++ b/iothub_client/tests/common_e2e/iothubclient_common_e2e.c @@ -607,7 +607,7 @@ static void client_connect_to_hub(IOTHUB_PROVISIONED_DEVICE* deviceToUse, IOTHUB if (test_protocol_type == TEST_AMQP || test_protocol_type == TEST_AMQP_WEBSOCKETS) { - unsigned int svc2cl_keep_alive_timeout_secs = 120; // service will send pings at 120 x 7/8 = 105 seconds. Higher the value, lesser the frequency of service side pings. + size_t svc2cl_keep_alive_timeout_secs = 120; // service will send pings at 120 x 7/8 = 105 seconds. Higher the value, lesser the frequency of service side pings. setoption_on_device_or_module(OPTION_SERVICE_SIDE_KEEP_ALIVE_FREQ_SECS, &svc2cl_keep_alive_timeout_secs, "Cannot set OPTION_SERVICE_SIDE_KEEP_ALIVE_FREQ_SECS"); // Set keep alive for remote idle is optional. If it is not set the default ratio of 1/2 will be used. For default value of 4 minutes, it will be 2 minutes (120 seconds)