diff --git a/compute_sdk/tests/unit/test_executor.py b/compute_sdk/tests/unit/test_executor.py index fad0ee94f..d231e8139 100644 --- a/compute_sdk/tests/unit/test_executor.py +++ b/compute_sdk/tests/unit/test_executor.py @@ -75,7 +75,11 @@ def __init__(self, *args, **kwargs): def start(self) -> None: super().start() + + # important for tests to ensure the `.run()` has had a chance to be invoked + # before the tests poke at the internals. try_assert(lambda: self._connection is not None) + try_assert(lambda: self._channel is not None) def run(self): self._connection = mock.MagicMock()