changeset 51499:8b77ad54d67a stable

test-chg: stabilize the log checking The "worker process exited" line have been making the CI flaky for a long time. Lets sort this out.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 11 Mar 2024 13:09:01 +0100
parents 25055932042a
children f3e9d1df879b
files tests/test-chg.t
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-chg.t	Mon Mar 11 12:03:40 2024 +0100
+++ b/tests/test-chg.t	Mon Mar 11 13:09:01 2024 +0100
@@ -288,7 +288,9 @@
 preserved (since setprocname isn't available on py3 and pure version,
 the 10th-most-recent line is different when using py3):
 
-  $ cat log/server.log.1 log/server.log | tail -10 | filterlog
+(the "worker process exited" line is matched independently as it order is unstable with the "exiting" line, the worker might exit before the server decide to exit).
+
+  $ cat log/server.log.1 log/server.log | tail -10 | grep -v "worker process exited" | filterlog
   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ... (no-setprocname !)
   YYYY/MM/DD HH:MM:SS (PID)> forked worker process (pid=...)
   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ... (setprocname !)
@@ -298,8 +300,9 @@
   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
   YYYY/MM/DD HH:MM:SS (PID)> validate: []
+  YYYY/MM/DD HH:MM:SS (PID)> $TESTTMP/extreload/chgsock/server-... is not owned, exiting.
+  $ cat log/server.log.1 log/server.log | tail -10 | grep "worker process exited" | filterlog
   YYYY/MM/DD HH:MM:SS (PID)> worker process exited (pid=...)
-  YYYY/MM/DD HH:MM:SS (PID)> $TESTTMP/extreload/chgsock/server-... is not owned, exiting.
 
 global data mutated by schems
 -----------------------------