mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-01 21:45:10 +00:00
fix(remote): end a remote session from before its create to after its DELETE
This commit is contained in:
@@ -4,6 +4,7 @@ import logging
|
||||
|
||||
import pytest
|
||||
|
||||
from tests.remote.sessions import hold_session
|
||||
from unshackle.core.api.handlers import session_logs_handler
|
||||
from unshackle.core.api.session_log import SessionLogBuffer, SessionLogMirror, capture_service_logs
|
||||
from unshackle.core.api.session_store import get_session_store
|
||||
@@ -169,8 +170,8 @@ def test_drain_server_logs_survives_client_systemexit() -> None:
|
||||
from unshackle.core.remote_service import RemoteService
|
||||
|
||||
svc = RemoteService.__new__(RemoteService)
|
||||
svc._session_id = "abc"
|
||||
svc.channel = PollingChannel(ServerMessages(svc))
|
||||
hold_session(svc)
|
||||
svc.lifetime.channel = PollingChannel(ServerMessages(svc))
|
||||
|
||||
class ExitingClient:
|
||||
def get_optional(self, endpoint: str) -> dict:
|
||||
@@ -186,8 +187,8 @@ def test_drain_server_logs_reemits_and_advances_seq() -> None:
|
||||
from unshackle.core.remote_service import RemoteService
|
||||
|
||||
svc = RemoteService.__new__(RemoteService)
|
||||
svc._session_id = "abc"
|
||||
svc.channel = PollingChannel(ServerMessages(svc))
|
||||
hold_session(svc)
|
||||
svc.lifetime.channel = PollingChannel(ServerMessages(svc))
|
||||
svc.log = logging.getLogger("test-drain-reemit")
|
||||
|
||||
class StubClient:
|
||||
|
||||
Reference in New Issue
Block a user