Add constant for PlatformNotReady wait time to use in tests (#37266)

This commit is contained in:
mdegat01 authored and GitHub committed 2020-07-01 08:42:57 -07:00
1 parent 0a0b60566d
commit 52f3238e17
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -25,6 +25,7 @@ SLOW_SETUP_WARNING = 10
SLOW_SETUP_MAX_WAIT = 60
PLATFORM_NOT_READY_RETRIES = 10
DATA_ENTITY_PLATFORM = "entity_platform"
PLATFORM_NOT_READY_BASE_WAIT_TIME = 30 # seconds
class EntityPlatform:
@@ -189,7 +190,7 @@ class EntityPlatform:
return True
except PlatformNotReady:
tries += 1
wait_time = min(tries, 6) * 30
wait_time = min(tries, 6) * PLATFORM_NOT_READY_BASE_WAIT_TIME
logger.warning(
"Platform %s not ready yet. Retrying in %d seconds.",
self.platform_name,