From: Michael Wallner Date: Fri, 22 Feb 2013 11:14:00 +0000 (+0100) Subject: fix test X-Git-Tag: v0.1.0~7 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-pq;a=commitdiff_plain;h=f00254ec8665b045eb8782b85f17842fca61c378 fix test --- diff --git a/tests/unbuffered001.phpt b/tests/unbuffered001.phpt index 0754d8a..a009b63 100644 --- a/tests/unbuffered001.phpt +++ b/tests/unbuffered001.phpt @@ -26,22 +26,17 @@ $c->execAsync("SELECT a from generate_series(1,10) a", function($res) { break; } }); + do { while ($c->busy) { - switch ($c->poll()) { - case pq\Connection::POLLING_READING: - $w=$e=array(); - $r=array($c->socket); - stream:select($r,$w,$e,1); - break; - case pq\Connection::POLLING_WRITING: - $r=$e=array(); - $w=array($c->socket); - stream_select($r,$w,$e,1); - break; + $r = array($c->socket); + $w = $e = null; + if (stream_select($r, $w, $e, null)) { + $c->poll(); } } } while ($c->getResult()); + ?> DONE --EXPECTF--