Skip to content

Commit e9e83de

Browse files
committed
speed up entry in SYNCHRONIZATION state
1 parent c50bc74 commit e9e83de

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

supvisors/supervisordata.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ def http_server(self):
108108
for config, hs in self.supervisord.options.httpservers:
109109
if config['family'] == socket.AF_INET:
110110
return hs
111+
return None
111112

112113
@property
113114
def system_rpc_interface(self):

supvisors/tests/test_mapper.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,13 +551,14 @@ def test_add_instance(mapper):
551551
'10.0.0.2': '10.0.0.2:25000', 'dummy_1': '10.0.0.3:25000'}
552552

553553

554-
def test_mapper_configure_empty(mocker, mapper):
554+
def test_mapper_configure_empty(mocker, supvisors_instance, mapper):
555555
""" Test the storage of the expected Supvisors instances when no default list is provided. """
556556
mocked_find = mocker.patch.object(mapper, '_find_local_identifier')
557+
supvisors_instance.supervisor_data.supervisord.options.identifier = 'dummy'
557558
# configure mapper with no element
558559
mapper.configure([], set(), [])
559560
assert list(mapper.instances.keys()) == ['supv01.bzh:25000']
560-
assert mapper._nick_identifiers == {'supvisors01.cliche.bzh': 'supv01.bzh:25000'}
561+
assert mapper._nick_identifiers == {'dummy': 'supv01.bzh:25000'}
561562
assert mapper._core_identifiers == []
562563
assert mapper.core_identifiers == []
563564
assert mapper.initial_identifiers == ['supv01.bzh:25000']

0 commit comments

Comments
 (0)