MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / _wait_for_values

Function _wait_for_values

tests/integration/test_source_configure.py:98–106  ·  view source on GitHub ↗

Poll until dashboard shows the expected values.

(api_client, expected: list, timeout: float = 3.0)

Source from the content-addressed store, hash-verified

96
97
98def _wait_for_values(api_client, expected: list, timeout: float = 3.0) -> list:
99 """Poll until dashboard shows the expected values."""
100 end = time.time() + timeout
101 while time.time() < end:
102 values = _get_dataset_values(api_client)
103 if values == expected:
104 return values
105 time.sleep(0.05)
106 return _get_dataset_values(api_client)
107
108
109# ---------------------------------------------------------------------------

Calls 1

_get_dataset_valuesFunction · 0.70

Tested by

no test coverage detected