test: isolate Star invitation state and stabilize late-result waits (#6076)
* test: isolate Star invitation state and relax late-result deadline * test: keep invitation fixtures outside test workspaces
This commit is contained in:
1 parent
07c4e3f0d1
commit
42f06ab1dc
4 files changed
+20
-10
No files matched your search
@@ -882,7 +882,7 @@ class TestToolEventProgress:
|
||||
},
|
||||
)))
|
||||
|
||||
await asyncio.wait_for(first_request_started.wait(), timeout=1)
|
||||
await asyncio.wait_for(first_request_started.wait(), timeout=5)
|
||||
await loop._pending_queues[session_key].put(InboundMessage(
|
||||
channel="websocket",
|
||||
sender_id="user",
|
||||
@@ -891,7 +891,8 @@ class TestToolEventProgress:
|
||||
session_key_override=session_key,
|
||||
))
|
||||
release_first_request.set()
|
||||
await asyncio.wait_for(dispatch, timeout=2)
|
||||
# Events synchronize injection; the deadline only guards against a stuck worker.
|
||||
await asyncio.wait_for(dispatch, timeout=5)
|
||||
|
||||
outbound = []
|
||||
while bus.outbound_size > 0:
|
||||
|
||||
@@ -8,9 +8,11 @@ from nanobot.webui import star_prompt
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def state_path(tmp_path, monkeypatch):
|
||||
monkeypatch.setattr(star_prompt, "get_webui_dir", lambda: tmp_path)
|
||||
return tmp_path / "star-prompt.json"
|
||||
def state_path(tmp_path, tmp_path_factory):
|
||||
webui_dir = star_prompt.get_webui_dir()
|
||||
assert webui_dir.is_relative_to(tmp_path_factory.getbasetemp())
|
||||
assert not webui_dir.is_relative_to(tmp_path)
|
||||
return webui_dir / "star-prompt.json"
|
||||
|
||||
|
||||
def seed_eligible(path: Path):
|
||||
|
||||
Reference in new issue
Block a user