From c4ac548cba2c397774a5d2af3f09d1bf0a642dbc Mon Sep 17 00:00:00 2001 From: meejah Date: Sat, 29 Jul 2023 13:08:01 -0600 Subject: [PATCH] reactor from fixture --- integration/conftest.py | 2 +- integration/grid.py | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/integration/conftest.py b/integration/conftest.py index d2024ce98..04dc400a2 100644 --- a/integration/conftest.py +++ b/integration/conftest.py @@ -117,7 +117,7 @@ def reactor(): @pytest.fixture(scope='session') @log_call(action_type=u"integration:port_allocator", include_result=False) def port_allocator(reactor): - return create_port_allocator(start_port=45000) + return create_port_allocator(reactor, start_port=45000) @pytest.fixture(scope='session') diff --git a/integration/grid.py b/integration/grid.py index 064319f74..343bd779f 100644 --- a/integration/grid.py +++ b/integration/grid.py @@ -529,7 +529,7 @@ def create_grid(reactor, request, temp_dir, flog_gatherer, port_allocator): returnValue(grid) -def create_port_allocator(start_port): +def create_port_allocator(reactor, start_port): """ Returns a new port-allocator .. which is a zero-argument function that returns Deferreds that fire with new, sequential ports @@ -546,11 +546,6 @@ def create_port_allocator(start_port): """ port = [start_port - 1] - # import stays here to not interfere with reactor selection -- but - # maybe this function should be arranged to be called once from a - # fixture (with the reactor)? - from twisted.internet import reactor - class NothingProtocol(Protocol): """ I do nothing.