mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 02:01:31 +00:00
reactor from fixture
This commit is contained in:
parent
a9128d89c3
commit
c4ac548cba
@ -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')
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user