This is an automated email from the ASF dual-hosted git repository.
bneradt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new e8a0dd868e pqsi-pqsp.test.py: address log order flakiness (#13321)
e8a0dd868e is described below
commit e8a0dd868edcb0185d38fc3570f8f0b0faf3a575
Author: Brian Neradt <[email protected]>
AuthorDate: Wed Jun 24 20:38:37 2026 -0500
pqsi-pqsp.test.py: address log order flakiness (#13321)
The miss and hit transactions can flush to the custom log in either
order. A valid cache-hit result can therefore fail when only the first
line is normalized before the full-file comparison.
This waits for both expected records, normalizes the variable client
endpoint wherever it appears, and sorts the two-record output before
comparing it with the sorted gold file.
Fixes: #13319
---
tests/gold_tests/logging/gold/pqsi-pqsp.gold | 2 +-
tests/gold_tests/logging/pqsi-pqsp.test.py | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/tests/gold_tests/logging/gold/pqsi-pqsp.gold
b/tests/gold_tests/logging/gold/pqsi-pqsp.gold
index 8238b1cbde..fa15ccf272 100644
--- a/tests/gold_tests/logging/gold/pqsi-pqsp.gold
+++ b/tests/gold_tests/logging/gold/pqsi-pqsp.gold
@@ -1,2 +1,2 @@
-abc
0 0
+abc
diff --git a/tests/gold_tests/logging/pqsi-pqsp.test.py
b/tests/gold_tests/logging/pqsi-pqsp.test.py
index 6dc33ea68e..9ad5785541 100644
--- a/tests/gold_tests/logging/pqsi-pqsp.test.py
+++ b/tests/gold_tests/logging/pqsi-pqsp.test.py
@@ -78,10 +78,12 @@ tr.Processes.Default.ReturnCode = 0
log_filespec = os.path.join(ts.Variables.LOGDIR, 'field-test.log')
-# Wait for the cache-hit line to be written.
+# Wait for both transaction log lines to be written. Their write order is not
+# deterministic.
+Test.AddAwaitFileContainsTestRun('Await pqsi/pqsp cache-miss line.',
log_filespec, r'^127\.0\.0\.1 [1-6][0-9]*$')
Test.AddAwaitFileContainsTestRun('Await pqsi/pqsp cache-hit line.',
log_filespec, r'^0 0$')
tr = Test.AddTestRun()
-tr.Processes.Default.Command = "sed '1s/^127.0.0.1 [1-6][0-9]*$$/abc/' < " +
log_filespec
+tr.Processes.Default.Command = "sed 's/^127\\.0\\.0\\.1 [1-6][0-9]*$$/abc/' <
" + log_filespec + " | LC_ALL=C sort"
tr.Processes.Default.Streams.stdout = "gold/pqsi-pqsp.gold"
tr.Processes.Default.ReturnCode = 0