# HG changeset patch # User Sergey Kandaurov # Date 1558357240 -10800 # Node ID 8b122b35703b6d7676fe706b986b9da1cc48deb4 # Parent e8ba4ae5e3aca42423da32f49de6a5d18e057189 Tests: fixed session reuse tests in ssl_certificate.t with TLSv1.3. Previously, session data was retrieved too early, before server passed application data, which usually means NewSessionTicket is not yet sent. The fix is to ask server for application data, then retrieve a session. diff --git a/ssl_certificate.t b/ssl_certificate.t --- a/ssl_certificate.t +++ b/ssl_certificate.t @@ -180,7 +180,7 @@ like(get('password', 8083), qr/password/ # session reuse -my ($s, $ssl) = get_ssl_socket('default', 8080); +my ($s, $ssl) = get('default', 8080); my $ses = Net::SSLeay::get_session($ssl); like(get('default', 8080, $ses), qr/default:r/, 'session reused'); @@ -201,7 +201,8 @@ sub get { Net::SSLeay::write($ssl, 'GET / HTTP/1.0' . CRLF . CRLF); my $r = Net::SSLeay::read($ssl); $s->close(); - return $r; + return $r unless wantarray(); + return ($s, $ssl); } sub cert {