reactor from fixture

This commit is contained in:
meejah 2023-07-29 13:08:01 -06:00
parent a9128d89c3
commit c4ac548cba
2 changed files with 2 additions and 7 deletions

View File

@ -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')

View File

@ -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.