Revert "fix(runtime): make plugin and box connectors resilient"

This reverts commit 0b461e5830.
This commit is contained in:
Junyan Qin
2026-07-21 18:43:01 +08:00
parent 0b461e5830
commit 1765c43262
15 changed files with 236 additions and 699 deletions
+1 -19
View File
@@ -325,28 +325,10 @@ async def test_box_service_dispose_schedules_shutdown_on_event_loop(monkeypatch:
service.dispose()
await asyncio.sleep(0)
connector.dispose.assert_not_called()
connector.dispose.assert_called_once()
service.shutdown.assert_awaited_once()
@pytest.mark.asyncio
async def test_box_service_shutdown_reaps_connector_when_runtime_rpc_is_offline(
monkeypatch: pytest.MonkeyPatch,
):
connector = Mock()
connector.client = Mock()
connector.client.shutdown = AsyncMock(side_effect=RuntimeError('offline'))
connector.aclose = AsyncMock()
monkeypatch.setattr('langbot.pkg.box.service.BoxRuntimeConnector', Mock(return_value=connector))
service = BoxService(make_app(Mock()))
await service.shutdown()
connector.client.shutdown.assert_awaited_once()
connector.aclose.assert_awaited_once()
@pytest.mark.asyncio
async def test_box_runtime_reuses_request_session():
logger = Mock()