changeset 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 36c75df75ca4
children 6cbcfb4ef7ee
files proxy_upgrade.t proxy_websocket.t
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/proxy_upgrade.t
+++ b/proxy_upgrade.t
@@ -61,6 +61,9 @@ EOF
 $t->run_daemon(\&upgrade_fake_daemon);
 $t->run();
 
+$t->waitforsocket('127.0.0.1:8081')
+	or die "Can't start test backend";
+
 ###############################################################################
 
 TODO: {
@@ -121,7 +124,7 @@ undef $s;
 ok($s, "handshake noupgrade");
 
 SKIP: {
-	skip "handshake failed", 2 unless $s;
+	skip "handshake failed", 1 unless $s;
 
 	upgrade_write($s, "foo");
 	isnt(upgrade_read($s), "bar", "after handshake noupgrade");
--- a/proxy_websocket.t
+++ b/proxy_websocket.t
@@ -67,6 +67,9 @@ EOF
 $t->run_daemon(\&websocket_fake_daemon);
 $t->run();
 
+$t->waitforsocket('127.0.0.1:8081')
+	or die "Can't start test backend";
+
 ###############################################################################
 
 TODO: {