File 0520-logger-Adjust-sync-testcase-timeout.patch of Package erlang
From b0999701cdd801e020aa789e51818217923ccfa5 Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Wed, 19 Oct 2022 10:56:01 +0200
Subject: [PATCH 4/9] logger: Adjust sync testcase timeout
---
lib/kernel/test/logger_disk_log_h_SUITE.erl | 11 ++++++-----
lib/kernel/test/logger_std_h_SUITE.erl | 4 +++-
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/lib/kernel/test/logger_disk_log_h_SUITE.erl b/lib/kernel/test/logger_disk_log_h_SUITE.erl
index 64b0009915..08908b8b7a 100644
--- a/lib/kernel/test/logger_disk_log_h_SUITE.erl
+++ b/lib/kernel/test/logger_disk_log_h_SUITE.erl
@@ -646,13 +646,14 @@ sync(Config) ->
{disk_log,sync}]),
logger:notice("second", ?domain),
- timer:sleep(?IDLE_DETECT_TIME*2),
+ timer:sleep(?IDLE_DETECT_TIME*2), %% wait for automatic disk_log_sync
logger:notice("third", ?domain),
- %% wait for automatic disk_log_sync
- check_tracer(?IDLE_DETECT_TIME*2),
+ timer:sleep(?IDLE_DETECT_TIME*2), %% wait for automatic disk_log_sync
+
+ check_tracer(1000),
try_read_file(Log, {ok,<<"first\nsecond\nthird\n">>}, 1000),
-
+
%% switch repeated filesync on and verify that the looping works
SyncInt = 1000,
WaitT = 4500,
@@ -664,7 +665,7 @@ sync(Config) ->
HConfig2 = HConfig#{filesync_repeat_interval => SyncInt},
ok = logger:update_handler_config(?MODULE, config, HConfig2),
-
+
SyncInt = maps:get(filesync_repeat_interval,
maps:get(cb_state,logger_olp:info(h_proc_name()))),
timer:sleep(WaitT),
diff --git a/lib/kernel/test/logger_std_h_SUITE.erl b/lib/kernel/test/logger_std_h_SUITE.erl
index ba59278ef6..ead4418d0d 100644
--- a/lib/kernel/test/logger_std_h_SUITE.erl
+++ b/lib/kernel/test/logger_std_h_SUITE.erl
@@ -812,7 +812,9 @@ sync(Config) ->
timer:sleep(?IDLE_DETECT_TIME*2),
logger:notice("fourth", ?domain),
%% wait for automatic filesync
- check_tracer(?IDLE_DETECT_TIME*2),
+ timer:sleep(?IDLE_DETECT_TIME*2),
+
+ check_tracer(1000),
%% switch repeated filesync on and verify that the looping works
SyncInt = 1000,
--
2.35.3