Skip to content

Commit a941fce

Browse files
committed
fix test.
1 parent e009802 commit a941fce

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

ext/pgsql/tests/pg_pipeline_sync.phpt

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ if (!($result = pg_get_result($db))) {
6262
die('pg_get_result()');
6363
}
6464

65+
if (pg_result_status($result) !== PGSQL_TUPLES_OK) {
66+
die('pg_result_status{}');
67+
}
68+
6569
if (pg_num_rows($result) == -1) {
6670
die('pg_num_rows()');
6771
}
@@ -71,9 +75,15 @@ if (!pg_fetch_row($result, null)) {
7175
}
7276

7377
pg_free_result($result);
74-
while (pg_connection_busy($db)) {
75-
nb_flush($db, $db_socket);
76-
nb_consume($db, $db_socket);
78+
79+
if (pg_get_result($db) !== false) {
80+
die('pg_get_result()');
81+
}
82+
83+
if (($result = pg_get_result($db)) !== false) {
84+
if (pg_result_status($result) !== PGSQL_PIPELINE_SYNC) {
85+
die('pg_result_status()');
86+
}
7787
}
7888

7989
if (!pg_exit_pipeline_mode($db)) {

0 commit comments

Comments
 (0)