mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-15 03:18:07 +00:00
Working in retry to test endpoint during integration test. (#1565)
This commit is contained in:
committed by
GitHub
parent
af684f1335
commit
d358938895
@ -223,6 +223,7 @@ TARGETS: Dict[str, Integration] = {
|
||||
|
||||
OperationResult = TypeVar("OperationResult")
|
||||
|
||||
|
||||
def retry(
|
||||
operation: Callable[[Any], OperationResult],
|
||||
description: str,
|
||||
@ -251,6 +252,7 @@ def retry(
|
||||
)
|
||||
time.sleep(wait_duration)
|
||||
|
||||
|
||||
class TestOnefuzz:
|
||||
def __init__(self, onefuzz: Onefuzz, logger: logging.Logger, test_id: UUID) -> None:
|
||||
self.of = onefuzz
|
||||
@ -268,6 +270,11 @@ class TestOnefuzz:
|
||||
pool_size: int,
|
||||
os_list: List[OS],
|
||||
) -> None:
|
||||
def try_info_get(data: Any) -> None:
|
||||
self.of.info.get()
|
||||
|
||||
retry(try_info_get, "testing endpoint")
|
||||
|
||||
self.inject_log(self.start_log_marker)
|
||||
for entry in os_list:
|
||||
name = PoolName(f"testpool-{entry.name}-{self.test_id}")
|
||||
|
Reference in New Issue
Block a user