[tests] Fix flaky scheduler retry test timing (#9760)

This commit is contained in:
J. Nick Koston 2025-07-20 19:21:51 -10:00 committed by GitHub
parent 305667b06d
commit fe1050a583
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -130,15 +130,15 @@ script:
- logger.log: "=== Test 5: Empty name retry ==="
- lambda: |-
auto *component = id(test_sensor);
App.scheduler.set_retry(component, "", 50, 5,
App.scheduler.set_retry(component, "", 100, 5,
[](uint8_t retry_countdown) {
id(empty_name_retry_counter)++;
ESP_LOGI("test", "Empty name retry attempt %d", id(empty_name_retry_counter));
return RetryResult::RETRY;
});
// Try to cancel after 75ms
App.scheduler.set_timeout(component, "empty_cancel_timer", 75, []() {
// Try to cancel after 150ms
App.scheduler.set_timeout(component, "empty_cancel_timer", 150, []() {
bool cancelled = App.scheduler.cancel_retry(id(test_sensor), "");
ESP_LOGI("test", "Empty name retry cancel result: %s",
cancelled ? "true" : "false");