vortexpy 6.1.0__tar.gz → 6.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {vortexpy-6.1.0 → vortexpy-6.1.1}/PKG-INFO +1 -1
- {vortexpy-6.1.0 → vortexpy-6.1.1}/pyproject.toml +1 -1
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexServer.py +13 -2
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexServer_test.py +91 -1
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/__init__.py +1 -1
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortexpy.egg-info/PKG-INFO +1 -1
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortexpy.egg-info/SOURCES.txt +0 -1
- vortexpy-6.1.0/LICENSE +0 -22
- {vortexpy-6.1.0 → vortexpy-6.1.1}/README.md +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/example/TwistedDeferredTimeout.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/example/__init__.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/example/run_http_upgraded_websocket_ping_client.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/example/run_http_upgraded_websocket_ping_server.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/example/run_http_upgraded_websocket_rpc_test_client.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/example/run_http_upgraded_websocket_rpc_test_server.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/example/run_websocket_rpc_test_client.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/example/run_websocket_rpc_test_server.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/example/setup_example_logging.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/example/store_and_load_json.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/setup.cfg +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/DataWrapTuple.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/DeferUtil.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/DeferUtil_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/Jsonable.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/MtlsAuthorizedClientRegistry.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/MtlsAuthorizedClientRegistry_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/MtlsServerSslOptions.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/Payload.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/PayloadEndpoint.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/PayloadEndpointTest.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/PayloadEnvelope.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/PayloadFilterKeys.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/PayloadIO.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/PayloadPriority.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/PayloadResponse.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/PayloadResponseTest.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/PayloadResponse_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/PayloadTest.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/PerformTestActionTuple.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/SerialiseUtil.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/SerialiseUtil_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/TestTuple.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/Tuple.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/TupleAction.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/TupleBson.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/TupleBson_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/TupleDataForTest.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/TupleDocumentConverter.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/TuplePerfTest.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/TuplePolymorphicTupleTypeFieldArgTest.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/TupleRestful.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/TupleRestful_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/TupleSelector.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/TupleTest.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexABC.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexAccessControlContextABC.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexAuthenticatorABC.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexClientHttp.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexClientHttpTest.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexClientTcp.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexClientWebsocketFactory.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexConnectionABC.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexEndpointPermission.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexFactory.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexFactory_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexPayloadProtocol.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexPermission.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexPermissionError.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexServerConnection.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexServerConnection_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexServerHttpResource.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexServerTcp.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexServerTcp_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexServerWebsocket.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexServerWebsocket_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexSession.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexSession_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexTcpMemoryLeakPayloadTest.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexTcpMemoryLeakRawTest.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexTest.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexUserDetailsABC.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexUtil.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexWritePushProducer.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/VortexWritePushProducer_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/data_loader/TupleDataLiveLockManager.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/data_loader/TupleDataLiveLockManager_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/data_loader/TupleDataLoader.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/data_loader/TupleDataLoaderDelegate.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/data_loader/TupleDataLoaderTupleABC.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/data_loader/TupleDataLoaderTuples.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/data_loader/__init__.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/event_bus/TupleChangeEventABC.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/event_bus/TupleChangeEventBus.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/event_bus/TupleChangeEventBusObserverABC.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/event_bus/__init__.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/handler/TupleActionProcessor.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/handler/TupleActionProcessorProxy.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/handler/TupleActionProcessorTestHandler.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/handler/TupleActionProcessor_shutdown_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/handler/TupleActionProcessor_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/handler/TupleActionPushOffline.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/handler/TupleActionPushOffline_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/handler/TupleDataAccessGranterABC.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/handler/TupleDataActionClient.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/handler/TupleDataActionClient_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/handler/TupleDataObservableCache.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/handler/TupleDataObservableCache_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/handler/TupleDataObservableHandler.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/handler/TupleDataObservableHandler_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/handler/TupleDataObservableProxyHandler.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/handler/TupleDataObservableProxyHandler_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/handler/TupleDataObservableTestHandler.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/handler/TupleDataObserverClient.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/handler/TupleDataProviderABC.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/handler/VortexJSTupleLoaderTestHandler.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/handler/__init__.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/mypy_plugin.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/payload_many_tuples_benchmark_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/py.typed +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/restful/GzippedDataHttpClient.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/restful/GzippedDataHttpClientTest.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/restful/GzippedPayloadHttpClient.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/restful/RestfulHttpClient.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/restful/RestfulResource.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/restful/__init__.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/restful/restful_http_client_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/restful/restful_resource_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/rpc/RPC.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/rpc/RPCTest.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/rpc/RPC_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/rpc/__init__.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/sqla_orm/OrmCrudHandler.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/sqla_orm/TupleProviderForDb.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/sqla_orm/VortexTupleJson.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/sqla_orm/__init__.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/storage/TupleActionStorageSqlite.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/storage/TupleStorageSqlite.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/storage/__init__.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/tuple_json_schema/__init__.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/tuple_json_schema/constants.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/tuple_json_schema/json_schema_node_tuple.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/tuple_json_schema/tuple_json_schema_builder.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/tuple_json_schema/tuple_json_schema_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/tuple_json_schema/tuple_json_schema_test_tuples.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/tuple_test_fixtures.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/twisted_runtime_metrics.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortex/twisted_runtime_metrics_test.py +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortexpy.egg-info/dependency_links.txt +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortexpy.egg-info/entry_points.txt +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortexpy.egg-info/requires.txt +0 -0
- {vortexpy-6.1.0 → vortexpy-6.1.1}/vortexpy.egg-info/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "vortexpy"
|
|
7
|
-
version = "6.1.
|
|
7
|
+
version = "6.1.1"
|
|
8
8
|
license = {text = "MIT"}
|
|
9
9
|
authors = [{name = "Flying Ion Pty Ltd", email = "contact@flyingion.com"}]
|
|
10
10
|
description = "Flying Ion's observable, routable, data serialisation and transport code."
|
|
@@ -43,7 +43,10 @@ VortexServer
|
|
|
43
43
|
"""
|
|
44
44
|
|
|
45
45
|
HEART_BEAT_PERIOD = 10.0
|
|
46
|
-
|
|
46
|
+
# Browser background-tab timer throttling (Chrome intensive wake-up throttling)
|
|
47
|
+
# can reduce a hidden tab's client heartbeats to one per minute; 75s gives one
|
|
48
|
+
# full missed-beat margin over that 60s cadence before the connection is closed.
|
|
49
|
+
HEART_BEAT_TIMEOUT = 75.0
|
|
47
50
|
|
|
48
51
|
|
|
49
52
|
class VortexServer(VortexABC):
|
|
@@ -225,6 +228,10 @@ class VortexServer(VortexABC):
|
|
|
225
228
|
if conn.httpSessionUuid == httpSessionUuid:
|
|
226
229
|
del self._connectionByVortexUuid[vortexUuid]
|
|
227
230
|
vortexClosedNames.append(conn.remoteVortexName)
|
|
231
|
+
# Close the connection: without this the client keeps a
|
|
232
|
+
# "live" vortex against the expired session and reconnects
|
|
233
|
+
# unauthenticated instead of returning to login.
|
|
234
|
+
conn.close()
|
|
228
235
|
|
|
229
236
|
self._connectionsChanged(vortexClosedNames, nowOnline=False)
|
|
230
237
|
|
|
@@ -378,7 +385,11 @@ class VortexSessionI(Interface):
|
|
|
378
385
|
@implementer(VortexSessionI)
|
|
379
386
|
class VortexSession(object):
|
|
380
387
|
def __init__(self, session):
|
|
381
|
-
session
|
|
388
|
+
# Never shorten a configured session timeout: the heartbeat floor
|
|
389
|
+
# applies only when the app (or Twisted default) allows less.
|
|
390
|
+
# Shortening here expires active operator sessions when browser
|
|
391
|
+
# background-tab timer throttling delays heartbeats past 60s.
|
|
392
|
+
session.sessionTimeout = max(session.sessionTimeout, HEART_BEAT_TIMEOUT)
|
|
382
393
|
self.connections = {}
|
|
383
394
|
|
|
384
395
|
|
|
@@ -8,7 +8,11 @@ from twisted.trial.unittest import SynchronousTestCase
|
|
|
8
8
|
from twisted.web.server import Site
|
|
9
9
|
from twisted.web.test.requesthelper import DummyRequest
|
|
10
10
|
|
|
11
|
-
from vortex.VortexServer import
|
|
11
|
+
from vortex.VortexServer import (
|
|
12
|
+
HEART_BEAT_TIMEOUT,
|
|
13
|
+
VortexServer,
|
|
14
|
+
VortexSessionI,
|
|
15
|
+
)
|
|
12
16
|
from vortex.VortexServerWebsocket import VortexWebsocketServerProtocol
|
|
13
17
|
|
|
14
18
|
|
|
@@ -127,6 +131,92 @@ class VortexServerConnectionClosedTest(SynchronousTestCase):
|
|
|
127
131
|
self.assertIs(conns.get("uuid-a"), conn_b)
|
|
128
132
|
|
|
129
133
|
|
|
134
|
+
class _RecordingCloseConnection(_MockServerConnection):
|
|
135
|
+
"""Mock connection that records close() without re-entering the server."""
|
|
136
|
+
|
|
137
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
138
|
+
super().__init__(*args, **kwargs)
|
|
139
|
+
self.closeCalls = 0
|
|
140
|
+
|
|
141
|
+
def close(self) -> None:
|
|
142
|
+
self.closeCalls += 1
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
class VortexServerSessionExpiredTest(SynchronousTestCase):
|
|
146
|
+
_nextSessionUid = 0
|
|
147
|
+
|
|
148
|
+
def _httpSession(self):
|
|
149
|
+
request = DummyRequest(b"/vortexws")
|
|
150
|
+
request.site = Site(None)
|
|
151
|
+
session = request.getSession()
|
|
152
|
+
# DummyRequest always assigns uid b"0"; give each session a
|
|
153
|
+
# distinct uid so per-session bookkeeping can be told apart.
|
|
154
|
+
type(self)._nextSessionUid += 1
|
|
155
|
+
session.uid = str(type(self)._nextSessionUid).encode()
|
|
156
|
+
return session
|
|
157
|
+
|
|
158
|
+
def testSessionExpiredClosesMatchingConnections(self) -> None:
|
|
159
|
+
server = VortexServer("test-server")
|
|
160
|
+
session = self._httpSession()
|
|
161
|
+
conn_a = _RecordingCloseConnection(
|
|
162
|
+
server, "uuid-a", "peek-office-app", session
|
|
163
|
+
)
|
|
164
|
+
conn_b = _RecordingCloseConnection(
|
|
165
|
+
server, "uuid-b", "peek-field-app", session
|
|
166
|
+
)
|
|
167
|
+
server.connectionOpened(session, conn_a)
|
|
168
|
+
server.connectionOpened(session, conn_b)
|
|
169
|
+
|
|
170
|
+
server._sessionExpired(session.uid)
|
|
171
|
+
|
|
172
|
+
self.assertEqual(conn_a.closeCalls, 1)
|
|
173
|
+
self.assertEqual(conn_b.closeCalls, 1)
|
|
174
|
+
self.assertNotIn("uuid-a", server._connectionByVortexUuid)
|
|
175
|
+
self.assertNotIn("uuid-b", server._connectionByVortexUuid)
|
|
176
|
+
|
|
177
|
+
def testSessionExpiredLeavesOtherSessionsConnectionsOpen(self) -> None:
|
|
178
|
+
server = VortexServer("test-server")
|
|
179
|
+
session_one = self._httpSession()
|
|
180
|
+
session_two = self._httpSession()
|
|
181
|
+
conn_one = _RecordingCloseConnection(
|
|
182
|
+
server, "uuid-a", "peek-office-app", session_one
|
|
183
|
+
)
|
|
184
|
+
conn_two = _RecordingCloseConnection(
|
|
185
|
+
server, "uuid-b", "peek-office-app", session_two
|
|
186
|
+
)
|
|
187
|
+
server.connectionOpened(session_one, conn_one)
|
|
188
|
+
server.connectionOpened(session_two, conn_two)
|
|
189
|
+
|
|
190
|
+
server._sessionExpired(session_one.uid)
|
|
191
|
+
|
|
192
|
+
self.assertEqual(conn_one.closeCalls, 1)
|
|
193
|
+
self.assertEqual(conn_two.closeCalls, 0)
|
|
194
|
+
self.assertIn("uuid-b", server._connectionByVortexUuid)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
class VortexSessionAdapterTimeoutTest(SynchronousTestCase):
|
|
198
|
+
def _httpSession(self):
|
|
199
|
+
request = DummyRequest(b"/vortexws")
|
|
200
|
+
request.site = Site(None)
|
|
201
|
+
return request.getSession()
|
|
202
|
+
|
|
203
|
+
def testAdapterKeepsLongerConfiguredTimeout(self) -> None:
|
|
204
|
+
session = self._httpSession()
|
|
205
|
+
session.sessionTimeout = 86400
|
|
206
|
+
|
|
207
|
+
VortexSessionI(session)
|
|
208
|
+
|
|
209
|
+
self.assertEqual(session.sessionTimeout, 86400)
|
|
210
|
+
|
|
211
|
+
def testAdapterRaisesShorterTimeoutToHeartbeatFloor(self) -> None:
|
|
212
|
+
session = self._httpSession()
|
|
213
|
+
session.sessionTimeout = 5
|
|
214
|
+
|
|
215
|
+
VortexSessionI(session)
|
|
216
|
+
|
|
217
|
+
self.assertEqual(session.sessionTimeout, HEART_BEAT_TIMEOUT)
|
|
218
|
+
|
|
219
|
+
|
|
130
220
|
class VortexWebsocketServerProtocolConnectionLostTest(SynchronousTestCase):
|
|
131
221
|
def testConnectionLostTwiceDoesNotRaise(self) -> None:
|
|
132
222
|
vortex_server = VortexServer("test-server")
|
vortexpy-6.1.0/LICENSE
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2016-2026 Flying Ion Pty Ltd
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
22
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|