diff --git a/inc/azure_umqtt_c/mqtt_client.h b/inc/azure_umqtt_c/mqtt_client.h index ba52020..a13186a 100644 --- a/inc/azure_umqtt_c/mqtt_client.h +++ b/inc/azure_umqtt_c/mqtt_client.h @@ -48,7 +48,7 @@ typedef void(*ON_MQTT_ERROR_CALLBACK)(MQTT_CLIENT_HANDLE handle, MQTT_CLIENT_EVE typedef void(*ON_MQTT_MESSAGE_RECV_CALLBACK)(MQTT_MESSAGE_HANDLE msgHandle, void* callbackCtx); typedef void(*ON_MQTT_DISCONNECTED_CALLBACK)(void* callbackCtx); -MOCKABLE_FUNCTION(, void, mqtt_client_clear_xio, MQTT_CLIENT_HANDLE, mqtt_client); +MOCKABLE_FUNCTION(, void, mqtt_client_clear_xio, MQTT_CLIENT_HANDLE, handle); MOCKABLE_FUNCTION(, MQTT_CLIENT_HANDLE, mqtt_client_init, ON_MQTT_MESSAGE_RECV_CALLBACK, msgRecv, ON_MQTT_OPERATION_CALLBACK, opCallback, void*, opCallbackCtx, ON_MQTT_ERROR_CALLBACK, onErrorCallBack, void*, errorCBCtx); MOCKABLE_FUNCTION(, void, mqtt_client_deinit, MQTT_CLIENT_HANDLE, handle); diff --git a/tests/mqtt_client_ut/mqtt_client_ut.c b/tests/mqtt_client_ut/mqtt_client_ut.c index 8899a4d..784f63e 100644 --- a/tests/mqtt_client_ut/mqtt_client_ut.c +++ b/tests/mqtt_client_ut/mqtt_client_ut.c @@ -833,6 +833,9 @@ TEST_FUNCTION(mqtt_client_clear_xio_succeeds) // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); + + // cleanup + mqtt_client_deinit(mqttHandle); } TEST_FUNCTION(mqtt_client_clear_xio_after_connect_and_do_work_succeeds)