Skip to content

Commit

Permalink
test: Wait for systemd service memory to appear
Browse files Browse the repository at this point in the history
Memory usage is polled, it does not appear immediately after starting
the unit. This caused TestServices.testBasicSession to flake.
  • Loading branch information
martinpitt authored and mvollmer committed Mar 9, 2023
1 parent e224573 commit 942fc28
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/verify/check-system-services
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ ExecStart=/bin/awk -f /tmp/mem-hog{params}.awk
self.run_systemctl(user, "start mem-hog.service")
# If the test fails before we stop the mem-hog the next test run will not get the correct memory usage here
self.addCleanup(self.run_systemctl, user, "stop mem-hog.service || true")
b.wait_visible("#memory .pf-c-description-list__text")
initial_memory = float(b.text("#memory .pf-c-description-list__text").split(" ")[0])
self.assertGreater(initial_memory, 0.5)
m.execute(f"touch /tmp/continue{params}")
Expand Down

0 comments on commit 942fc28

Please sign in to comment.