Mercurial > hg > nginx-tests
comparison proxy_upgrade.t @ 274:ccebd3168b5b
Tests: fix startup race in proxy_websocket.t, proxy_upgrade.t.
Additionally, incorrect skip count fixed in proxy_upgrade.t.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 21 Mar 2013 21:23:53 +0400 |
parents | 71bb2a896c7a |
children | 8a41f7d38cc3 |
comparison
equal
deleted
inserted
replaced
273:36c75df75ca4 | 274:ccebd3168b5b |
---|---|
59 EOF | 59 EOF |
60 | 60 |
61 $t->run_daemon(\&upgrade_fake_daemon); | 61 $t->run_daemon(\&upgrade_fake_daemon); |
62 $t->run(); | 62 $t->run(); |
63 | 63 |
64 $t->waitforsocket('127.0.0.1:8081') | |
65 or die "Can't start test backend"; | |
66 | |
64 ############################################################################### | 67 ############################################################################### |
65 | 68 |
66 TODO: { | 69 TODO: { |
67 local $TODO = 'not yet' unless $t->has_version('1.3.13'); | 70 local $TODO = 'not yet' unless $t->has_version('1.3.13'); |
68 | 71 |
119 undef $s; | 122 undef $s; |
120 $s = upgrade_connect(noheader => 1); | 123 $s = upgrade_connect(noheader => 1); |
121 ok($s, "handshake noupgrade"); | 124 ok($s, "handshake noupgrade"); |
122 | 125 |
123 SKIP: { | 126 SKIP: { |
124 skip "handshake failed", 2 unless $s; | 127 skip "handshake failed", 1 unless $s; |
125 | 128 |
126 upgrade_write($s, "foo"); | 129 upgrade_write($s, "foo"); |
127 isnt(upgrade_read($s), "bar", "after handshake noupgrade"); | 130 isnt(upgrade_read($s), "bar", "after handshake noupgrade"); |
128 } | 131 } |
129 | 132 |