add callback timeouts, secondary thread pools, and frame directives to Router
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import logging
|
||||
from pathlib import Path
|
||||
from functools import partial
|
||||
from concurrent.futures import wait
|
||||
|
||||
from execlog import util
|
||||
from execlog import ChainRouter, Event
|
||||
@@ -41,7 +42,7 @@ def test_single_router_submission():
|
||||
Event(endpoint='endpoint_proxy', name='file3'),
|
||||
]
|
||||
futures = router2.submit(events)
|
||||
router2.wait_on_futures(futures)
|
||||
wait(futures)
|
||||
|
||||
assert True
|
||||
|
||||
@@ -52,7 +53,7 @@ def test_chain_router_submission():
|
||||
Event(endpoint='endpoint_proxy', name='file3'),
|
||||
]
|
||||
futures = chain_router.submit(events)
|
||||
chain_router.wait_on_futures(futures)
|
||||
wait(futures)
|
||||
|
||||
assert True
|
||||
|
||||
|
||||
@@ -94,7 +94,8 @@ def test_server_with_listeners():
|
||||
server.shutdown()
|
||||
thread.join()
|
||||
|
||||
# finally check the router event logs
|
||||
assert router1.event_log[0][1] == ['router1 job success']
|
||||
assert router2.event_log[0][1] == ['router2 job success']
|
||||
# finally check the router event logs: holds tier-I futures, which hold lists of
|
||||
# tier-II futures
|
||||
assert [r.result() for r in router1.event_log[0][1].result()] == ['router1 job success']
|
||||
assert [r.result() for r in router2.event_log[0][1].result()] == ['router2 job success']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user