Merge pull request #189493 from alyssais/moodle

nixosTests.moodle: increase timeout
This commit is contained in:
Jacek Galowicz
2022-09-03 14:55:21 +02:00
committed by GitHub
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -426,7 +426,9 @@ class Machine:
self.monitor.send(message)
return self.wait_for_monitor_prompt()
def wait_for_unit(self, unit: str, user: Optional[str] = None) -> None:
def wait_for_unit(
self, unit: str, user: Optional[str] = None, timeout: int = 900
) -> None:
"""Wait for a systemd unit to get into "active" state.
Throws exceptions on "failed" and "inactive" states as well as
after timing out.
@@ -456,7 +458,7 @@ class Machine:
unit, f" with user {user}" if user is not None else ""
)
):
retry(check_active)
retry(check_active, timeout)
def get_unit_info(self, unit: str, user: Optional[str] = None) -> Dict[str, str]:
status, lines = self.systemctl('--no-pager show "{}"'.format(unit), user)
+1 -1
View File
@@ -16,7 +16,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
testScript = ''
start_all()
machine.wait_for_unit("phpfpm-moodle.service")
machine.wait_for_unit("phpfpm-moodle.service", timeout=1800)
machine.wait_until_succeeds("curl http://localhost/ | grep 'You are not logged in'")
'';
})