From 3451fc4888769c105b54ca2426ede1bca64f6dce Mon Sep 17 00:00:00 2001
From: Dmitry Ivanov <ivadmi5@gmail.com>
Date: Tue, 12 Sep 2023 02:07:12 +0300
Subject: [PATCH] fix(tests): Fix gh_7860_syslog_json_test broken due to
 memtx_sort_threads

test-run.py sets OMP_NUM_THREADS which causes this test to misbehave:
it doesn't expect to see a warning regarding the use of this env var
as the first log line.

Alternatively, we could update test-run's submodule, but in practice
this breaks other tests e.g. replication-luatest/linearizable_test.lua.

NO_DOC=internal
NO_TEST=internal
NO_CHANGELOG=internal
---
 test/box-luatest/gh_7860_syslog_json_test.lua | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/box-luatest/gh_7860_syslog_json_test.lua b/test/box-luatest/gh_7860_syslog_json_test.lua
index bc665e2bce..bd450f49a4 100644
--- a/test/box-luatest/gh_7860_syslog_json_test.lua
+++ b/test/box-luatest/gh_7860_syslog_json_test.lua
@@ -32,6 +32,11 @@ g.before_all(function(cg)
     cg.check_json = function(expected_msg)
         local s = cg.sock:recv(1024)
         t.assert(s)
+        -- HACK: test-run.py sets OMP_NUM_THREADS which changes the 1st msg.
+        if s:find("Use cfg option 'memtx_sort_threads' instead.") then
+            s = cg.sock:recv(1024)
+            t.assert(s)
+        end
         local hdr, body = unpack(s:split(': ', 1))
         t.assert_str_matches(
             hdr, '<%d+>%a+%s+%d%d?%s+%d%d:%d%d:%d%d%s+tt%[' .. cg.pid .. '%]')
-- 
GitLab