mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-02 18:10:57 +02:00
test(cpp): fixed cpp test case mem leak
This commit is contained in:
@@ -268,7 +268,7 @@ TEST_CASE("call destructors for thread_local classes CXX", "[misc]")
|
|||||||
is_tls_class_destructor_called = false;
|
is_tls_class_destructor_called = false;
|
||||||
s_slow_init_sem = xSemaphoreCreateCounting(1, 0);
|
s_slow_init_sem = xSemaphoreCreateCounting(1, 0);
|
||||||
xTaskCreate(test_thread_local_destructors, "test_thread_local_destructors", 2048, NULL, 10, NULL);
|
xTaskCreate(test_thread_local_destructors, "test_thread_local_destructors", 2048, NULL, 10, NULL);
|
||||||
vTaskDelay(1); /* Triggers IDLE task to call prvCheckTasksWaitingTermination() which cleans task-specific data */
|
vTaskDelay(10); /* Triggers IDLE task to call prvCheckTasksWaitingTermination() which cleans task-specific data */
|
||||||
TEST_ASSERT_TRUE(xSemaphoreTake(s_slow_init_sem, 500 / portTICK_PERIOD_MS));
|
TEST_ASSERT_TRUE(xSemaphoreTake(s_slow_init_sem, 500 / portTICK_PERIOD_MS));
|
||||||
vSemaphoreDelete(s_slow_init_sem);
|
vSemaphoreDelete(s_slow_init_sem);
|
||||||
TEST_ASSERT_TRUE(is_tls_class_destructor_called);
|
TEST_ASSERT_TRUE(is_tls_class_destructor_called);
|
||||||
|
Reference in New Issue
Block a user