diff options
author | Jacek Galowicz <jacek@galowicz.de> | 2022-09-03 14:55:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-03 14:55:21 +0200 |
commit | 9e00fd3047bace89d720dc98cf76af9427da6f4e (patch) | |
tree | 162ac042bc7b033ed485b98ba1cedfe5de753577 /nixos | |
parent | e77f54ea0b69c457f1ac4ca994db4bb4d9e0d9c1 (diff) | |
parent | 1e8f59b2ee457e0b4f2edf62cf89054f501a0706 (diff) | |
download | nixlib-9e00fd3047bace89d720dc98cf76af9427da6f4e.tar nixlib-9e00fd3047bace89d720dc98cf76af9427da6f4e.tar.gz nixlib-9e00fd3047bace89d720dc98cf76af9427da6f4e.tar.bz2 nixlib-9e00fd3047bace89d720dc98cf76af9427da6f4e.tar.lz nixlib-9e00fd3047bace89d720dc98cf76af9427da6f4e.tar.xz nixlib-9e00fd3047bace89d720dc98cf76af9427da6f4e.tar.zst nixlib-9e00fd3047bace89d720dc98cf76af9427da6f4e.zip |
Merge pull request #189493 from alyssais/moodle
nixosTests.moodle: increase timeout
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/lib/test-driver/test_driver/machine.py | 6 | ||||
-rw-r--r-- | nixos/tests/moodle.nix | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/nixos/lib/test-driver/test_driver/machine.py b/nixos/lib/test-driver/test_driver/machine.py index 3ff3cf5645f8..117d9d59e025 100644 --- a/nixos/lib/test-driver/test_driver/machine.py +++ b/nixos/lib/test-driver/test_driver/machine.py @@ -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) diff --git a/nixos/tests/moodle.nix b/nixos/tests/moodle.nix index 4570e8963882..8fd011e0cb21 100644 --- a/nixos/tests/moodle.nix +++ b/nixos/tests/moodle.nix @@ -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'") ''; }) |