1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
Description: Fix $conn->endcopy test
PQendcopy() fails with "no COPY in progress" after copying is done. Adjust
test case to ensure that, instead of expecting it to succeed.
Author: Martin Pitt <mpitt@debian.org>
Last-Update: 2014-07-29
--- libpg-perl-2.1.1.orig/test.pl
+++ libpg-perl-2.1.1/test.pl
@@ -183,10 +183,11 @@ while (-1 != $ret) {
and print "\$conn->getline .......... ok\n"
or print "\$conn->getline .......... not ok: $string\n";
+# should be "no COPY in progress" now
$ret = $conn->endcopy;
-( 0 == $ret )
+( 1 == $ret )
and print "\$conn->endcopy .......... ok\n"
- or print "\$conn->endcopy .......... not ok: $ret\n";
+ or print "\$conn->endcopy .......... not ok: $ret ", $conn->errorMessage, "\n";
######################### delete and copy from stdin, PQputline
|