Skip to content

Commit

Permalink
[modules] fix bipbip_commander and modules' tests
Browse files Browse the repository at this point in the history
  • Loading branch information
augu5te committed Aug 26, 2016
1 parent 98ff363 commit 0235020
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
1 change: 0 additions & 1 deletion oar/kao/kao.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

def main():
logger.info("Starting Kao Meta Scheduler")
import pdb; pdb.set_trace()
meta_schedule()

if __name__ == '__main__': # pragma: no cover
Expand Down
4 changes: 2 additions & 2 deletions oar/modules/bipbip_commander.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# Set undefined config value to default one
DEFAULT_CONFIG = {
'SERVER_HOSTNAME': 'localhost',
'ZMQ_SERVER_PORT': '6667',
'APPENDICE_SERVER_PORT': '6668',
'BIPBIP_COMMANDER_SERVER': 'localhost',
'BIPBIP_COMMANDER_PORT': '6669',
'MAX_CONCURRENT_JOBS_STARTING_OR_TERMINATING': '25',
Expand Down Expand Up @@ -68,7 +68,7 @@ def __init__(self):
# Initialize a zeromq context
self.context = zmq.Context()
self.appendice = self.context.socket(zmq.PUSH) # to signal Almighty
self.appendice.connect('tcp://' + config['SERVER_HOSTNAME'] + ':' + config['ZMQ_SERVER_PORT'])
self.appendice.connect('tcp://' + config['SERVER_HOSTNAME'] + ':' + config['APPENDICE_SERVER_PORT'])


# IP addr is required when bind function is used on zmq socket
Expand Down
8 changes: 4 additions & 4 deletions tests/modules/test_almighty.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ def monkeypatch_tools(request, monkeypatch):

@pytest.fixture(scope="function", autouse=True)
def setup(request):
config['ZMQ_SERVER_PORT'] = '6667'
config['APPENDICE_PROXY_SERVER_PORT'] = '6668'

config['SERVER_HOSTNAME'] = 'localhost'
config['APPENDICE_SERVER_PORT'] = '6668'
config['BIPBIP_COMMANDER_SERVER'] = 'localhost'
config['BIPBIP_COMMANDER_PORT'] = '6669'

@request.addfinalizer
def teardown():
del config['ZMQ_SERVER_PORT']
del config['SERVER_HOSTNAME']
del config['APPENDICE_SERVER_PORT']
del config['BIPBIP_COMMANDER_SERVER']
del config['BIPBIP_COMMANDER_PORT']
FakeZmq.i = 0
Expand Down
6 changes: 4 additions & 2 deletions tests/modules/test_appendice_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ def monkeypatch_tools(request, monkeypatch):

@pytest.fixture(scope="function", autouse=True)
def setup(request):
config['APPENDICE_PROXY_SERVER_PORT'] = '6668'
config['SERVER_HOSTNAME'] = 'localhost'
config['APPENDICE_SERVER_PORT'] = '6668'
config['BIPBIP_COMMANDER_SERVER'] = 'localhost'
config['BIPBIP_COMMANDER_PORT'] = '6669'

@request.addfinalizer
def teardown():
del config['APPENDICE_PROXY_SERVER_PORT']
del config['SERVER_HOSTNAME']
del config['APPENDICE_SERVER_PORT']
del config['BIPBIP_COMMANDER_SERVER']
del config['BIPBIP_COMMANDER_PORT']
FakeZmq.i = 0
Expand Down
6 changes: 4 additions & 2 deletions tests/modules/test_bipbip_commander.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ def monkeypatch_tools(request, monkeypatch):

@pytest.fixture(scope="function", autouse=True)
def setup(request):
config['ZMQ_SERVER_PORT'] = '6667'
config['SERVER_HOSTNAME'] = 'localhost'
config['APPENDICE_SERVER_PORT'] = '6668'
config['BIPBIP_COMMANDER_SERVER'] = 'localhost'
config['BIPBIP_COMMANDER_PORT'] = '6669'

@request.addfinalizer
def teardown():
del config['ZMQ_SERVER_PORT']
del config['SERVER_HOSTNAME']
del config['APPENDICE_SERVER_PORT']
del config['BIPBIP_COMMANDER_SERVER']
del config['BIPBIP_COMMANDER_PORT']
FakeZmq.i = 0
Expand Down

0 comments on commit 0235020

Please sign in to comment.