[nginx-tests] Tests: adjusted delays in ssl_session_ticket_key.t.
Maxim Dounin
mdounin at mdounin.ru
Fri Sep 5 21:13:19 UTC 2025
details: http://freenginx.org/hg/nginx-tests/rev/468102e2a704
branches:
changeset: 2024:468102e2a704
user: Maxim Dounin <mdounin at mdounin.ru>
date: Mon Sep 01 11:26:35 2025 +0300
description:
Tests: adjusted delays in ssl_session_ticket_key.t.
If session ticket keys are not shared among worker processes, waiting
for 0.5 seconds before trying to establish another session won't change
anything (if the connection will end up in the different worker process,
there will be an error).
At the same time, the test was seen unexpectedly failing with Valgrind,
due to slow connection handling. Since session ticket key rotation uses
time in seconds, slightly more than 1 second between requests is enough
for the test to fail if the first request happens at the end of a second.
Removing the unneeded sleep improves things, but not enough to fully
resolve the issue. As such, session timeout was set to 3 seconds.
Wait time between tests adjusted accordingly, to slightly more than 4
seconds, to ensure that the key will be changed even if the first request
happens at the start of a second.
diffstat:
ssl_session_ticket_key.t | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diffs (24 lines):
diff --git a/ssl_session_ticket_key.t b/ssl_session_ticket_key.t
--- a/ssl_session_ticket_key.t
+++ b/ssl_session_ticket_key.t
@@ -52,7 +52,7 @@ http {
server_name localhost;
ssl_session_cache shared:SSL:1m;
- ssl_session_timeout 2;
+ ssl_session_timeout 3;
}
}
@@ -92,10 +92,9 @@ foreach my $name ('localhost') {
my $key = get_ticket_key_name();
-select undef, undef, undef, 0.5;
is(get_ticket_key_name(), $key, 'ticket key match');
-select undef, undef, undef, 2.5;
+select undef, undef, undef, 4.1;
local $TODO = 'no ticket key callback'
if $t->has_module('OpenSSL') and not $t->has_feature('openssl:0.9.8h');
More information about the nginx-devel
mailing list