Skip Menu |
 

This queue is for tickets about the DBD-Pg CPAN distribution.

Report information
The Basics
Id: 130834
Status: resolved
Priority: 0/
Queue: DBD-Pg

People
Owner: greg [...] turnstep.com
Requestors: ether [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 3.10.0
Fixed in: 3.10.4



Subject: tests fail (3.10.0)
A cpantesters report is on its way to you. summary: t/00_signature.t ....... skipped: Set the environment variable TEST_SIGNATURE to enable this test t/00basic.t ............ ok t/01constants.t ........ ok t/03smethod.t .......... skipped: Connection to database failed, cannot continue testing NOTICE: drop cascades to sequence dbd_pg_testschema.dbd_pg_testsequence DBD::Pg::db do failed: ERROR: no schema has been selected to create in LINE 2: CREATE TABLE dbd_pg_test ( ^ at t/dbdpg_test_setup.pl line 734. # # DBI Version 1.642 # DBD::Pg Version 3.10.0 # Perl Version 5.26.3 # OS darwin # PostgreSQL (compiled) ? # PostgreSQL (target) ? # PostgreSQL (reported) ? # Default port ? # DBI_DSN dbi:Pg: # DBI_USER postgres # Test schema dbd_pg_testschema # LANG en_CA.UTF-8 t/01connect.t .......... Dubious, test returned 255 (wstat 65280, 0xff00) No subtests run DBD::Pg::db do failed: ERROR: schema "dbd_pg_testschema" does not exist at t/dbdpg_test_setup.pl line 916. t/02attribs.t .......... Dubious, test returned 255 (wstat 65280, 0xff00) No subtests run DBD::Pg::db do failed: ERROR: cannot drop sequence dbd_pg_testschema2.dbd_pg_testsequence2 because other objects depend on it DETAIL: default for table dbd_pg_testschema2.dbd_pg_test2 column a depends on sequence dbd_pg_testschema2.dbd_pg_testsequence2 HINT: Use DROP ... CASCADE to drop the dependent objects too. at t/dbdpg_test_setup.pl line 911. t/06bytea.t ............ Dubious, test returned 255 (wstat 65280, 0xff00) No subtests run DBD::Pg::db selectrow_array failed: ERROR: relation "dbd_pg_test" does not exist LINE 1: SELECT id FROM dbd_pg_test ORDER BY id ^ at t/03dbmethod.t line 328. Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Pg::db handle . # Looks like your test exited with 255 just after 39. t/03dbmethod.t ......... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 541/580 subtests NOTICE: drop cascades to sequence dbd_pg_testschema.dbd_pg_testsequence4 DBD::Pg::db selectall_arrayref failed: ERROR: relation "dbd_pg_test4" does not exist LINE 1: SELECT id2,val2 FROM dbd_pg_test4 ORDER BY id2 ^ at t/07copy.t line 278. Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Pg::db handle . # Looks like your test exited with 255 just after 38. t/07copy.t ............. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 24/62 subtests # Failed test '[quote] Array insert success : Simple single quote : [q{O'RLY?}]' # at t/09arrays.t line 262. # got: 'DBD::Pg::db do failed: ERROR: relation "dbd_pg_test" does not exist # LINE 1: INSERT INTO dbd_pg_test(id,pname,testarray) VALUES (99,'Arra... # ^ at t/09arrays.t line 254. # ' # expected: '' # Failed test '[quote][expand] Correct array inserted: Simple single quote : [q{O'RLY?}]' # at t/09arrays.t line 267. # Structures begin differing at: # $got = 'DBD::Pg::st execute failed: ERROR: current transaction is aborted, commands ignored until end of transaction block at t/09arrays.t line 204. # ' # $expected = ARRAY(0x7fe1b1ab7648) # Failed test '[bind] Array insert success : Simple double quote : [q{O"RLY?}]' # at t/09arrays.t line 238. # got: 'DBD::Pg::st execute failed: ERROR: relation "dbd_pg_test" does not exist at character 13 at t/09arrays.t line 232. # ' # expected: '' # Failed test '[bind][!expand] Correct array inserted: Simple double quote : [q{O"RLY?}]' # at t/09arrays.t line 242. # got: 'DBD::Pg::st execute failed: ERROR: current transaction is aborted, commands ignored until end of transaction block at t/09arrays.t line 204. # ' # expected: '{"O\"RLY?"}' # Failed test '[bind][expand] Correct array inserted: Simple double quote : [q{O"RLY?}]' # at t/09arrays.t line 246. # Structures begin differing at: # $got = 'DBD::Pg::st execute failed: ERROR: current transaction is aborted, commands ignored until end of transaction block at t/09arrays.t line 204. # ' # $expected = ARRAY(0x7fe1b1ab7d38) # Failed test '[quote] Array insert success : Simple double quote : [q{O"RLY?}]' # at t/09arrays.t line 262. # got: 'DBD::Pg::db do failed: ERROR: relation "dbd_pg_test" does not exist # LINE 1: INSERT INTO dbd_pg_test(id,pname,testarray) VALUES (99,'Arra... # ^ at t/09arrays.t line 254. # ' # expected: '' # Failed test '[quote][expand] Correct array inserted: Simple double quote : [q{O"RLY?}]' # at t/09arrays.t line 267. # Structures begin differing at: # $got = 'DBD::Pg::st execute failed: ERROR: current transaction is aborted, commands ignored until end of transaction block at t/09arrays.t line 204. # ' # $expected = ARRAY(0x7fe1b1ab7d38) # Failed test '[bind] Array insert success : Many quotes : [[q{O"RLY?}],[q|'Ya' - "really"|],[123]]' # at t/09arrays.t line 238. # got: 'DBD::Pg::st execute failed: ERROR: relation "dbd_pg_test" does not exist at character 13 at t/09arrays.t line 232. # ' # expected: '' # Failed test '[bind][!expand] Correct array inserted: Many quotes : [[q{O"RLY?}],[q|'Ya' - "really"|],[123]]' # at t/09arrays.t line 242. # got: 'DBD::Pg::st execute failed: ERROR: current transaction is aborted, commands ignored until end of transaction block at t/09arrays.t line 204. # ' # expected: '{{"O\"RLY?"},{"'Ya' - \"really\""},{123}}' # Failed test '[bind][expand] Correct array inserted: Many quotes : [[q{O"RLY?}],[q|'Ya' - "really"|],[123]]' # at t/09arrays.t line 246. # Structures begin differing at: # $got = 'DBD::Pg::st execute failed: ERROR: current transaction is aborted, commands ignored until end of transaction block at t/09arrays.t line 204. # ' # $expected = ARRAY(0x7fe1b1ab78a0) # Failed test '[quote] Array insert success : Many quotes : [[q{O"RLY?}],[q|'Ya' - "really"|],[123]]' # at t/09arrays.t line 262. # got: 'DBD::Pg::db do failed: ERROR: relation "dbd_pg_test" does not exist # LINE 1: INSERT INTO dbd_pg_test(id,pname,testarray) VALUES (99,'Arra... # ^ at t/09arrays.t line 254. # ' # expected: '' # Failed test '[quote][expand] Correct array inserted: Many quotes : [[q{O"RLY?}],[q|'Ya' - "really"|],[123]]' # at t/09arrays.t line 267. # Structures begin differing at: # $got = 'DBD::Pg::st execute failed: ERROR: current transaction is aborted, commands ignored until end of transaction block at t/09arrays.t line 204. # ' # $expected = ARRAY(0x7fe1b1ab78a0) # Failed test '[bind] Array insert success : Single backslash testing : ["Single\\Backslash"]' # at t/09arrays.t line 238. # got: 'DBD::Pg::st execute failed: ERROR: relation "dbd_pg_test" does not exist at character 13 at t/09arrays.t line 232. # ' # expected: '' # Failed test '[bind][!expand] Correct array inserted: Single backslash testing : ["Single\\Backslash"]' # at t/09arrays.t line 242. # got: 'DBD::Pg::st execute failed: ERROR: current transaction is aborted, commands ignored until end of transaction block at t/09arrays.t line 204. # ' # expected: '{"Single\\Backslash"}' # Failed test '[bind][expand] Correct array inserted: Single backslash testing : ["Single\\Backslash"]' # at t/09arrays.t line 246. # Structures begin differing at: # $got = 'DBD::Pg::st execute failed: ERROR: current transaction is aborted, commands ignored until end of transaction block at t/09arrays.t line 204. # ' # $expected = ARRAY(0x7fe1b1ab8518) NOTICE: drop cascades to table dbdpg_error_field_test # Looks like you failed 15 tests of 201. t/09arrays.t ........... Dubious, test returned 15 (wstat 3840, 0xf00) Failed 15/201 subtests # Failed test '(query 5) Calling pg_error_field returns expected value for field pg_diag_sqlstate' # at t/10_pg_error_field.t line 92. # '42P01' # doesn't match '(?^:23514)' ... etc...
Thanks for the report; will try to duplicate the issue.
Download (untitled) / with headers
text/plain 385b
Unable to duplicate, except that it appears the SET SCHEMA in dbdpg_test_setup.pl is set to a schema that did not get created cleanly. I adjusted the tests so that will die earlier if this happens again, but still am not sure why it happened. If you can, please run the tests in debug mode: DBDPG_DEBUG=1 make test See if that flushes out an error around the CREATE SCHEMA section.
Download (untitled) / with headers
text/plain 605b
I did some more digging (against the latest release, 3.10.3) -- it turns out that the test failures I was experiencing is because the tests were being run in parallel (e.g. HARNESS_OPTIONS=j6). It looks like all the tests are using the same database, so when the tests are run at once, naturally they stomp all over each other and create "interesting" failures. I would suggest changing t/dbdpg_test_setup.pl to use a random string (or perhaps better, a name with "_$$" appended to it?) to avoid this. It also has the advantage of avoiding stomping on data that is already being stored in the local db.
Download (untitled) / with headers
text/plain 142b
Thanks for the update. Due to the heavy setup cost, these tests are not really designed to be run in parallel. Will look into some solutions.
Download (untitled) / with headers
text/plain 446b
On 2020-01-31 16:07:51, TURNSTEP wrote: Show quoted text
> Thanks for the update. Due to the heavy setup cost, these tests are > not really designed to be run in parallel. Will look into some > solutions.
Ah, that makes sense. There is a facility in TAP::Harness (which 'make test', 'prove' etc invokes) to specify that tests should be run serially, but I haven't used it myself -- it's the "rules" option, which can also be driven by a file in the repository.
For now, going to disallow parallel so tests work again: e84d41fc7a61d999430af9e13ff50b66c68a3982


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.