From 9c2277275826ddf13d8cc395d870ca7c18b2fc4a Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 4 Jul 2025 11:40:11 -0500 Subject: [PATCH 1/2] fix scope issue --- tests/integration/fixtures/defer_fifo_simple.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/fixtures/defer_fifo_simple.yaml b/tests/integration/fixtures/defer_fifo_simple.yaml index a221256f6c..db24ebf601 100644 --- a/tests/integration/fixtures/defer_fifo_simple.yaml +++ b/tests/integration/fixtures/defer_fifo_simple.yaml @@ -87,7 +87,8 @@ api: } }; - TestComponent test_component; + // Use a static instance so it doesn't go out of scope + static TestComponent test_component; test_component.test_defer(); ESP_LOGD("defer_test", "Deferred 10 items using defer(), waiting for execution..."); From b7fca5488a04f13a160e6f7035e2ada7b412c9d1 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 4 Jul 2025 12:59:11 -0500 Subject: [PATCH 2/2] lol --- .../defer_stress_component/defer_stress_component.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration/fixtures/external_components/defer_stress_component/defer_stress_component.cpp b/tests/integration/fixtures/external_components/defer_stress_component/defer_stress_component.cpp index 3a97476067..21ca45947e 100644 --- a/tests/integration/fixtures/external_components/defer_stress_component/defer_stress_component.cpp +++ b/tests/integration/fixtures/external_components/defer_stress_component/defer_stress_component.cpp @@ -32,6 +32,7 @@ void DeferStressComponent::run_multi_thread_test() { ESP_LOGI(TAG, "Creating %d threads, each will defer %d callbacks", NUM_THREADS, DEFERS_PER_THREAD); + threads.reserve(NUM_THREADS); for (int i = 0; i < NUM_THREADS; i++) { threads.emplace_back([this, i]() { ESP_LOGV(TAG, "Thread %d starting", i);