Skip to content

051_pg_store.t error with localized error message #10

@jmdh

Description

@jmdh

[from http://www.wiki-toolkit.org/ticket/36 by bob]

bobw@host34:~/svn/wikitoolkittrunk >prove -I lib -d t/051_pg_store.t 
# $Test::Harness::Switches: -Ilib
# 1 tests to run
t/051_pg_store....# Running: /usr/bin/perl -Ilib t/051_pg_store.t
# PERL5LIB=
t/051_pg_store....ok 1/9Called UNIVERSAL::can() as a function, not a method at /usr/share/perl/Text/WikiFormat/Blocks.pm line 16
DBD::Pg::db do failed: ERROR:  could not serialise access due to concurrent update at lib/Wiki/Toolkit.pm line 846
# Looks like you planned 9 tests but only ran 7.
# Looks like your test died just after 7.
t/051_pg_store....dubious                                                    
        Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 8-9
        Failed 2/9 tests, 77.78% okay
Failed Test      Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/051_pg_store.t  255 65280     9    4  44.44%  8-9
Failed 1/1 test scripts, 0.00% okay. 2/9 subtests failed, 77.78% okay.

Attachments (0)

Changed 8 years ago by kake

This is happening because W::T::Store::Pg checks the actual text of the database error message, and Bob's database is spelling it "serialise" whereas we're looking for "serialize". I guess it's some form of internationalisation...

We did it like this at the time because there was no other way to get the database to tell us what the actual error was. There might be now - not sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions