Commit 07924786 authored by Juergen Kosel's avatar Juergen Kosel

Consider any not freed memory as test failure

Signed-off-by: 's avatarJuergen Kosel <juergen.kosel@softing.com>
parent bed5c09a
...@@ -326,11 +326,14 @@ int test_373(struct Options options) ...@@ -326,11 +326,14 @@ int test_373(struct Options options)
MySleep(5000); MySleep(5000);
MyLog(LOGA_INFO, "PublishCnt %d, FailedCnt %d, Pending %d maxPending %d", MyLog(LOGA_INFO, "PublishCnt %d, FailedCnt %d, Pending %d maxPending %d",
goodPublishCnt,failedPublishCnt,pendingMessageCnt,pendingMessageCntMax); goodPublishCnt,failedPublishCnt,pendingMessageCnt,pendingMessageCntMax);
mqtt_mem = Heap_get_info();
MyLog(LOGA_INFO, "MQTT mem current %ld, max %ld",mqtt_mem->current_size,mqtt_mem->max_size); MyLog(LOGA_INFO, "MQTT mem current %ld, max %ld",mqtt_mem->current_size,mqtt_mem->max_size);
MQTTAsync_disconnect(mqttasyncContext, NULL); MQTTAsync_disconnect(mqttasyncContext, NULL);
mqtt_mem = Heap_get_info();
MyLog(LOGA_INFO, "PublishCnt %d, FailedCnt %d, Pending %d maxPending %d", MyLog(LOGA_INFO, "PublishCnt %d, FailedCnt %d, Pending %d maxPending %d",
goodPublishCnt,failedPublishCnt,pendingMessageCnt,pendingMessageCntMax); goodPublishCnt,failedPublishCnt,pendingMessageCnt,pendingMessageCntMax);
MyLog(LOGA_INFO, "MQTT mem current %ld, max %ld",mqtt_mem->current_size,mqtt_mem->max_size); MyLog(LOGA_INFO, "MQTT mem current %ld, max %ld",mqtt_mem->current_size,mqtt_mem->max_size);
if (mqtt_mem->current_size > 0) failures++; /* consider any not freed memory as failure */
exit: exit:
MQTTAsync_destroy(&mqttasyncContext); MQTTAsync_destroy(&mqttasyncContext);
return failures; return failures;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment