Tests: ssl_session_timeout fixes. The directive is moved to a distinct server block to avoid unexpected expirations. Actually provide SSL session (broken in c6f27bcdd9d9).
diff --git a/ssl.t b/ssl.t index 7cf1518..9fdb0ae 100644 --- a/ssl.t +++ b/ssl.t
@@ -103,7 +103,6 @@ ssl on; ssl_session_cache builtin; - ssl_session_timeout 1; location / { return 200 "body $ssl_session_reused"; @@ -142,6 +141,18 @@ return 200 "body $ssl_session_reused"; } } + + server { + listen 127.0.0.1:8086 ssl; + server_name localhost; + + ssl_session_cache shared:SSL:1m; + ssl_session_timeout 1; + + location / { + return 200 "body $ssl_session_reused"; + } + } } EOF @@ -256,9 +267,12 @@ # session timeout +$ctx = get_ssl_context(); + +get('/', 8086, $ctx); select undef, undef, undef, 2.1; -like(get('/', 8081), qr/^body \.$/m, 'session timeout'); +like(get('/', 8086, $ctx), qr/^body \.$/m, 'session timeout'); # embedded variables