From dd79d441b0ca35b8f717f8c65eaead3e9e347689 Mon Sep 17 00:00:00 2001 From: Konstantin Kondrashov Date: Tue, 17 Feb 2026 17:11:37 +0200 Subject: [PATCH] fix(esp_system): Fix flaky tests with memory leak in sleep test --- .../test_apps/esp_system_unity_tests/main/test_sleep.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/esp_system/test_apps/esp_system_unity_tests/main/test_sleep.c b/components/esp_system/test_apps/esp_system_unity_tests/main/test_sleep.c index 58bde0ffb09..edbba1ba4e1 100644 --- a/components/esp_system/test_apps/esp_system_unity_tests/main/test_sleep.c +++ b/components/esp_system/test_apps/esp_system_unity_tests/main/test_sleep.c @@ -96,6 +96,7 @@ TEST_CASE("light sleep stress test", "[lightsleep]") #if CONFIG_FREERTOS_NUMBER_OF_CORES == 2 xSemaphoreTake(done, portMAX_DELAY); #endif + vTaskDelay(10 / portTICK_PERIOD_MS); // Give some time for the test task to suspend itself vSemaphoreDelete(done); } @@ -122,6 +123,7 @@ TEST_CASE("light sleep stress test with periodic esp_timer", "[lightsleep]") #if CONFIG_FREERTOS_NUMBER_OF_CORES == 2 xSemaphoreTake(done, portMAX_DELAY); #endif + vTaskDelay(10 / portTICK_PERIOD_MS); // Give some time for the test task to suspend itself vSemaphoreDelete(done); esp_timer_stop(timer); esp_timer_delete(timer);