Skip to content

Commit 007a75f

Browse files
jshacpu
authored andcommitted
Remove multi-va errors in integration tests. (letsencrypt#3448)
We recently reordered the programs in startservers.py to reflect dependencies, so we wouldn't generate gRPC errors when a process comes up before its backend. However, we missed the remote VAs. This change moves them to the beginning. Also, don't print "all processes started" after each process starts.
1 parent f730abd commit 007a75f

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

test/startservers.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def waitport(port, prog):
5555
print "Waiting for debug port %d (%s)" % (port, prog)
5656
else:
5757
raise
58-
print "All servers running. Hit ^C to kill."
5958
return True
6059

6160
def start(race_detection, fakeclock=None):
@@ -67,11 +66,19 @@ def start(race_detection, fakeclock=None):
6766
"""
6867
signal.signal(signal.SIGTERM, lambda _, __: stop())
6968
signal.signal(signal.SIGINT, lambda _, __: stop())
70-
global processes
69+
if not install(race_detection):
70+
return False
7171
# Processes are in order of dependency: Each process should be started
7272
# before any services that intend to send it RPCs. On shutdown they will be
7373
# killed in reverse order.
74-
progs = [
74+
progs = []
75+
if default_config_dir.startswith("test/config-next"):
76+
# Run the two 'remote' VAs
77+
progs.extend([
78+
[8011, 'boulder-va --config %s' % os.path.join(default_config_dir, "va-remote-a.json")],
79+
[8012, 'boulder-va --config %s' % os.path.join(default_config_dir, "va-remote-b.json")],
80+
])
81+
progs.extend([
7582
[8003, 'boulder-sa --config %s' % os.path.join(default_config_dir, "sa.json")],
7683
[4500, 'ct-test-srv --config test/ct-test-srv/ct-test-srv.json'],
7784
[8009, 'boulder-publisher --config %s' % os.path.join(default_config_dir, "publisher.json")],
@@ -87,23 +94,17 @@ def start(race_detection, fakeclock=None):
8794
[8002, 'boulder-ra --config %s' % os.path.join(default_config_dir, "ra.json")],
8895
[4431, 'boulder-wfe2 --config %s' % os.path.join(default_config_dir, "wfe2.json")],
8996
[4000, 'boulder-wfe --config %s' % os.path.join(default_config_dir, "wfe.json")],
90-
]
91-
if default_config_dir.startswith("test/config-next"):
92-
# Run the two 'remote' VAs
93-
progs.extend([
94-
[8011, 'boulder-va --config %s' % os.path.join(default_config_dir, "va-remote-a.json")],
95-
[8012, 'boulder-va --config %s' % os.path.join(default_config_dir, "va-remote-b.json")],
96-
])
97-
if not install(race_detection):
98-
return False
97+
])
9998
for (port, prog) in progs:
10099
try:
100+
global processes
101101
processes.append(run(prog, race_detection, fakeclock))
102102
if not waitport(port, prog):
103103
return False
104104
except Exception as e:
105105
print(e)
106106
return False
107+
print "All servers running. Hit ^C to kill."
107108
return True
108109

109110
def check():

0 commit comments

Comments
 (0)