comparison stream_proxy.t @ 974:882267679006

Tests: simplified parallel modifications in tests. Mail tests were simplified in c227348453db.
author Andrey Zelenkov <zelenkov@nginx.com>
date Tue, 12 Jul 2016 17:39:03 +0300
parents e9064d691790
children 3fc6817cd84a
comparison
equal deleted inserted replaced
973:7d7aef8b9f3a 974:882267679006
35 events { 35 events {
36 } 36 }
37 37
38 stream { 38 stream {
39 server { 39 server {
40 listen 127.0.0.1:%%PORT_0%%; 40 listen 127.0.0.1:8080;
41 proxy_pass 127.0.0.1:%%PORT_1%%; 41 proxy_pass 127.0.0.1:8081;
42 proxy_connect_timeout 2s; 42 proxy_connect_timeout 2s;
43 } 43 }
44 } 44 }
45 45
46 EOF 46 EOF
47 47
48 $t->run_daemon(\&stream_daemon); 48 $t->run_daemon(\&stream_daemon);
49 $t->run()->waitforsocket('127.0.0.1:' . port(1)); 49 $t->run()->waitforsocket('127.0.0.1:' . port(8081));
50 50
51 ############################################################################### 51 ###############################################################################
52 52
53 my $s = stream(); 53 my $s = stream();
54 54
66 ############################################################################### 66 ###############################################################################
67 67
68 sub stream_daemon { 68 sub stream_daemon {
69 my $server = IO::Socket::INET->new( 69 my $server = IO::Socket::INET->new(
70 Proto => 'tcp', 70 Proto => 'tcp',
71 LocalAddr => '127.0.0.1:' . port(1), 71 LocalAddr => '127.0.0.1:' . port(8081),
72 Listen => 5, 72 Listen => 5,
73 Reuse => 1 73 Reuse => 1
74 ) 74 )
75 or die "Can't create listening socket: $!\n"; 75 or die "Can't create listening socket: $!\n";
76 76