Skip to content

Commit 5fe0f97

Browse files
committed
test: run discovery tests in thread
1 parent 2ba0edd commit 5fe0f97

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Diff for: robotcode/language_server/robotframework/parts/discovering.py

+2
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ async def generate(suite: TestSuite) -> TestItem:
238238
else None,
239239
)
240240

241+
self._logger.info("Wait for workspace documents loaded...")
242+
241243
await self.parent.robot_workspace.documents_loaded.wait()
242244

243245
start = time.monotonic()

Diff for: tests/robotcode/language_server/robotframework/parts/test_discovering.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from robotcode.language_server.robotframework.protocol import (
99
RobotLanguageServerProtocol,
1010
)
11+
from robotcode.utils.async_tools import run_coroutine_in_thread
1112

1213

1314
@pytest.mark.usefixtures("protocol")
@@ -35,7 +36,9 @@ def split(item: TestItem) -> TestItem:
3536
else item.children,
3637
)
3738

38-
result = await protocol.robot_discovering.get_tests_from_workspace(Path(Path(__file__).parent, "data").as_uri())
39+
result = await run_coroutine_in_thread(
40+
protocol.robot_discovering.get_tests_from_workspace, Path(Path(__file__).parent, "data").as_uri()
41+
)
3942
regtest.write(
4043
yaml.dump(
4144
{

0 commit comments

Comments
 (0)