Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zmq: speed up tests #9875

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ class TestEnsemble(Ensemble):
__test__ = False

def __init__(self, iter_, reals, fm_steps, id_):
self.iter = iter_
self.test_reals = reals
self.fm_steps = fm_steps

the_reals = [
Realization(
real_no,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,9 @@ async def mock_receiver(self):

with patch.object(Monitor, "_receiver", mock_receiver):
async with Monitor(conn_info) as monitor:
await asyncio.sleep(1.0)
await asyncio.sleep(0.5)
await monitor.signal_done()
# in 1 second we should receive at least 2 heartbeats
# in 0.5 second we should receive at least 2 heartbeats
assert received_heartbeats > 1


Expand All @@ -393,7 +393,7 @@ async def test_dispatch_endpoint_clients_can_connect_and_monitor_can_shut_down_e
evaluator_to_use,
):
evaluator = evaluator_to_use
evaluator._batching_interval = 10
evaluator._batching_interval = 0.2

evaluator._max_batch_size = 4
conn_info = evaluator._config.get_connection_info()
Expand Down
2 changes: 1 addition & 1 deletion tests/ert/unit_tests/ensemble_evaluator/test_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ async def test_unexpected_close_after_connection_successful(
ee_con_info = EvaluatorConnectionInfo(f"tcp://127.0.0.1:{unused_tcp_port}")

monkeypatch.setattr(Monitor, "DEFAULT_MAX_RETRIES", 0)
monkeypatch.setattr(Monitor, "DEFAULT_ACK_TIMEOUT", 1)
monkeypatch.setattr(Monitor, "DEFAULT_ACK_TIMEOUT", 0.5)

async def mock_event_handler(router_socket):
dealer, _, frame = await router_socket.recv_multipart()
Expand Down
Loading