wait for open port in all tests to reduce flakiness
This commit is contained in:
parent
66398fe159
commit
5f4ea7acfb
3 changed files with 6 additions and 0 deletions
|
@ -34,6 +34,7 @@
|
||||||
|
|
||||||
start_all()
|
start_all()
|
||||||
server.wait_for_unit("lldap.service")
|
server.wait_for_unit("lldap.service")
|
||||||
|
server.wait_for_open_port(${toString nodes.server.services.lldap.settings.http_port})
|
||||||
|
|
||||||
with subtest("fail without authenticating"):
|
with subtest("fail without authenticating"):
|
||||||
client.fail(
|
client.fail(
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
testScript = { nodes, ... }: ''
|
testScript = { nodes, ... }: ''
|
||||||
start_all()
|
start_all()
|
||||||
machine.wait_for_unit("grafana.service")
|
machine.wait_for_unit("grafana.service")
|
||||||
|
machine.wait_for_open_port(${toString nodes.machine.services.grafana.settings.server.http_port})
|
||||||
|
|
||||||
def curl_req(password, wantStatus, endpoint):
|
def curl_req(password, wantStatus, endpoint):
|
||||||
response = machine.wait_until_succeeds("curl -i http://admin:{password}@localhost:3000{endpoint}".format(password=password, endpoint=endpoint), timeout=10)
|
response = machine.wait_until_succeeds("curl -i http://admin:{password}@localhost:3000{endpoint}".format(password=password, endpoint=endpoint), timeout=10)
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
testScript = { nodes, ... }: ''
|
testScript = { nodes, ... }: ''
|
||||||
start_all()
|
start_all()
|
||||||
machine.wait_for_unit("postgresql.service")
|
machine.wait_for_unit("postgresql.service")
|
||||||
|
machine.wait_for_open_port(5432)
|
||||||
|
|
||||||
def peer_cmd(user, database):
|
def peer_cmd(user, database):
|
||||||
return "sudo -u me psql -U {user} {db} --command \"\"".format(user=user, db=database)
|
return "sudo -u me psql -U {user} {db} --command \"\"".format(user=user, db=database)
|
||||||
|
@ -60,6 +61,7 @@
|
||||||
testScript = { nodes, ... }: ''
|
testScript = { nodes, ... }: ''
|
||||||
start_all()
|
start_all()
|
||||||
machine.wait_for_unit("postgresql.service")
|
machine.wait_for_unit("postgresql.service")
|
||||||
|
machine.wait_for_open_port(5432)
|
||||||
|
|
||||||
def peer_cmd(user, database):
|
def peer_cmd(user, database):
|
||||||
return "sudo -u me psql -U {user} {db} --command \"\"".format(user=user, db=database)
|
return "sudo -u me psql -U {user} {db} --command \"\"".format(user=user, db=database)
|
||||||
|
@ -101,6 +103,7 @@
|
||||||
testScript = { nodes, ... }: ''
|
testScript = { nodes, ... }: ''
|
||||||
start_all()
|
start_all()
|
||||||
machine.wait_for_unit("postgresql.service")
|
machine.wait_for_unit("postgresql.service")
|
||||||
|
machine.wait_for_open_port(5432)
|
||||||
|
|
||||||
def peer_cmd(user, database):
|
def peer_cmd(user, database):
|
||||||
return "sudo -u me psql -U {user} {db} --command \"\"".format(user=user, db=database)
|
return "sudo -u me psql -U {user} {db} --command \"\"".format(user=user, db=database)
|
||||||
|
@ -147,6 +150,7 @@
|
||||||
testScript = { nodes, ... }: ''
|
testScript = { nodes, ... }: ''
|
||||||
start_all()
|
start_all()
|
||||||
machine.wait_for_unit("postgresql.service")
|
machine.wait_for_unit("postgresql.service")
|
||||||
|
machine.wait_for_open_port(5432)
|
||||||
|
|
||||||
def peer_cmd(user, database):
|
def peer_cmd(user, database):
|
||||||
return "sudo -u me psql -U {user} {db} --command \"\"".format(user=user, db=database)
|
return "sudo -u me psql -U {user} {db} --command \"\"".format(user=user, db=database)
|
||||||
|
|
Loading…
Reference in a new issue