# HG changeset patch # User Sergey Kandaurov # Date 1513072433 -10800 # Node ID eadd24ccfda1aee031adddf3256b9941ff412590 # Parent caf59f42a3e13d1d7ea77040cd0b9d5720dc5ffe Tests: postponed startup in certain ssl certificate tests on win32. At least, some win32 hosts exhibit a round-off error or some such in the notBefore field of the certificate generated before starting nginx, such that it can be set to the value one second ahead of the current time. This manifests in spurious test failures due to certificate verify error with a failure reason "certificate is not yet valid". diff --git a/proxy_ssl_certificate.t b/proxy_ssl_certificate.t --- a/proxy_ssl_certificate.t +++ b/proxy_ssl_certificate.t @@ -128,6 +128,8 @@ foreach my $name ('3.example.com') { or die "Can't create certificate for $name: $!\n"; } +sleep 1 if $^O eq 'MSWin32'; + $t->write_file('password', '3.example.com'); $t->write_file('index.html', ''); diff --git a/proxy_ssl_verify.t b/proxy_ssl_verify.t --- a/proxy_ssl_verify.t +++ b/proxy_ssl_verify.t @@ -142,6 +142,8 @@ foreach my $name ('1.example.com', '2.ex or die "Can't create certificate for $name: $!\n"; } +sleep 1 if $^O eq 'MSWin32'; + $t->write_file('index.html', ''); $t->run(); diff --git a/ssl_verify_client.t b/ssl_verify_client.t --- a/ssl_verify_client.t +++ b/ssl_verify_client.t @@ -113,6 +113,8 @@ foreach my $name ('1.example.com', '2.ex or die "Can't create certificate for $name: $!\n"; } +sleep 1 if $^O eq 'MSWin32'; + $t->write_file('t', 'SEE-THIS'); $t->run(); diff --git a/stream_proxy_ssl_certificate.t b/stream_proxy_ssl_certificate.t --- a/stream_proxy_ssl_certificate.t +++ b/stream_proxy_ssl_certificate.t @@ -132,6 +132,8 @@ foreach my $name ('3.example.com') { or die "Can't create certificate for $name: $!\n"; } +sleep 1 if $^O eq 'MSWin32'; + $t->write_file('password', '3.example.com'); $t->write_file('index.html', ''); diff --git a/stream_proxy_ssl_verify.t b/stream_proxy_ssl_verify.t --- a/stream_proxy_ssl_verify.t +++ b/stream_proxy_ssl_verify.t @@ -142,6 +142,8 @@ foreach my $name ('1.example.com', '2.ex or die "Can't create certificate for $name: $!\n"; } +sleep 1 if $^O eq 'MSWin32'; + $t->write_file('index.html', ''); $t->run_daemon(\&http_daemon);