portal 3.7.0__tar.gz → 3.7.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.
- {portal-3.7.0/portal.egg-info → portal-3.7.1}/PKG-INFO +1 -1
- {portal-3.7.0 → portal-3.7.1}/portal/__init__.py +1 -1
- {portal-3.7.0 → portal-3.7.1}/portal/batching.py +2 -1
- {portal-3.7.0 → portal-3.7.1/portal.egg-info}/PKG-INFO +1 -1
- {portal-3.7.0 → portal-3.7.1}/tests/test_client.py +5 -2
- {portal-3.7.0 → portal-3.7.1}/LICENSE +0 -0
- {portal-3.7.0 → portal-3.7.1}/MANIFEST.in +0 -0
- {portal-3.7.0 → portal-3.7.1}/README.md +0 -0
- {portal-3.7.0 → portal-3.7.1}/portal/buffers.py +0 -0
- {portal-3.7.0 → portal-3.7.1}/portal/client.py +0 -0
- {portal-3.7.0 → portal-3.7.1}/portal/client_socket.py +0 -0
- {portal-3.7.0 → portal-3.7.1}/portal/contextlib.py +0 -0
- {portal-3.7.0 → portal-3.7.1}/portal/packlib.py +0 -0
- {portal-3.7.0 → portal-3.7.1}/portal/poollib.py +0 -0
- {portal-3.7.0 → portal-3.7.1}/portal/process.py +0 -0
- {portal-3.7.0 → portal-3.7.1}/portal/server.py +0 -0
- {portal-3.7.0 → portal-3.7.1}/portal/server_socket.py +0 -0
- {portal-3.7.0 → portal-3.7.1}/portal/sharray.py +0 -0
- {portal-3.7.0 → portal-3.7.1}/portal/thread.py +0 -0
- {portal-3.7.0 → portal-3.7.1}/portal/utils.py +0 -0
- {portal-3.7.0 → portal-3.7.1}/portal.egg-info/SOURCES.txt +0 -0
- {portal-3.7.0 → portal-3.7.1}/portal.egg-info/dependency_links.txt +0 -0
- {portal-3.7.0 → portal-3.7.1}/portal.egg-info/requires.txt +0 -0
- {portal-3.7.0 → portal-3.7.1}/portal.egg-info/top_level.txt +0 -0
- {portal-3.7.0 → portal-3.7.1}/pyproject.toml +0 -0
- {portal-3.7.0 → portal-3.7.1}/requirements.txt +0 -0
- {portal-3.7.0 → portal-3.7.1}/setup.cfg +0 -0
- {portal-3.7.0 → portal-3.7.1}/setup.py +0 -0
- {portal-3.7.0 → portal-3.7.1}/tests/test_batching.py +0 -0
- {portal-3.7.0 → portal-3.7.1}/tests/test_errfile.py +0 -0
- {portal-3.7.0 → portal-3.7.1}/tests/test_pack.py +0 -0
- {portal-3.7.0 → portal-3.7.1}/tests/test_process.py +0 -0
- {portal-3.7.0 → portal-3.7.1}/tests/test_server.py +0 -0
- {portal-3.7.0 → portal-3.7.1}/tests/test_socket.py +0 -0
- {portal-3.7.0 → portal-3.7.1}/tests/test_thread.py +0 -0
@@ -19,7 +19,8 @@ class BatchServer:
|
|
19
19
|
self, port, name='Server', workers=1, errors=True,
|
20
20
|
process=True, shmem=False, **kwargs):
|
21
21
|
inner_port = utils.free_port()
|
22
|
-
|
22
|
+
while inner_port == port:
|
23
|
+
inner_port = utils.free_port()
|
23
24
|
self.name = name
|
24
25
|
self.server = server.Server(inner_port, name, workers, errors, **kwargs)
|
25
26
|
if process:
|
@@ -286,6 +286,7 @@ class TestClient:
|
|
286
286
|
port = portal.free_port()
|
287
287
|
a = threading.Barrier(2)
|
288
288
|
b = threading.Barrier(2)
|
289
|
+
c = threading.Barrier(2)
|
289
290
|
|
290
291
|
def server():
|
291
292
|
server = Server(port)
|
@@ -296,10 +297,11 @@ class TestClient:
|
|
296
297
|
stats = server.stats()
|
297
298
|
assert stats['numrecv'] == 1
|
298
299
|
assert stats['numsend'] == stats['numrecv']
|
300
|
+
b.wait()
|
299
301
|
server = Server(port)
|
300
302
|
server.bind('fn', lambda x: x)
|
301
303
|
server.start(block=False)
|
302
|
-
|
304
|
+
c.wait()
|
303
305
|
server.close()
|
304
306
|
|
305
307
|
def client():
|
@@ -310,9 +312,10 @@ class TestClient:
|
|
310
312
|
time.sleep(0.1)
|
311
313
|
with pytest.raises(portal.Disconnected):
|
312
314
|
client.fn(3).result()
|
315
|
+
b.wait()
|
313
316
|
client.connect()
|
314
317
|
assert client.fn(3).result() == 3
|
315
|
-
|
318
|
+
c.wait()
|
316
319
|
client.close()
|
317
320
|
|
318
321
|
portal.run([
|
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
|