diff debug_connection_syslog.t @ 952:e9064d691790

Tests: converted tests to run in parallel.
author Andrey Zelenkov <zelenkov@nginx.com>
date Tue, 21 Jun 2016 16:39:13 +0300
parents 907e89fba9c3
children 882267679006
line wrap: on
line diff
--- a/debug_connection_syslog.t
+++ b/debug_connection_syslog.t
@@ -36,16 +36,16 @@ events {
 http {
     %%TEST_GLOBALS_HTTP%%
 
-    error_log syslog:server=127.0.0.1:8080 alert;
-    error_log syslog:server=127.0.0.1:8081 alert;
+    error_log syslog:server=127.0.0.1:%%PORT_1_UDP%% alert;
+    error_log syslog:server=127.0.0.1:%%PORT_2_UDP%% alert;
 
     server {
-        listen       127.0.0.1:8080;
-        listen       [::1]:8080;
+        listen       127.0.0.1:%%PORT_0%%;
+        listen       [::1]:%%PORT_0%%;
         server_name  localhost;
 
         location /debug {
-            proxy_pass http://[::1]:8080/;
+            proxy_pass http://[::1]:%%PORT_0%%/;
         }
     }
 }
@@ -63,10 +63,10 @@ plan(skip_all => 'no inet6 support') if 
 
 ###############################################################################
 
-is(get_syslog('/', 8080), '', 'no debug_connection syslog 1');
-is(get_syslog('/', 8081), '', 'no debug_connection syslog 2');
+is(get_syslog('/', port(1)), '', 'no debug_connection syslog 1');
+is(get_syslog('/', port(2)), '', 'no debug_connection syslog 2');
 
-my @msgs = get_syslog('/debug', 8080, 8081);
+my @msgs = get_syslog('/debug', port(1), port(2));
 like($msgs[0], qr/\[debug\]/, 'debug_connection syslog 1');
 like($msgs[1], qr/\[debug\]/, 'debug_connection syslog 2');
 is($msgs[0], $msgs[1], 'debug_connection syslog1 syslog2 match');