CC: | toby.corkindale [...] strategicdata.com.au |
Subject: | t/book.t or t/process.t fails unit tests due to "Duplicate ISBN" |
I'm getting failures on the HFH-Model-DBIC unit test suite.
Depending on the number of times I've run the tests, either book.t or
process.t fails on the "Good data" test.
Digging deeper, the error is due to a duplicate ISBN value.
Reported as:
<div class="error"><label class="label" for="isbn">ISBN: </label><input
type="text" name="isbn" id="isbn" value="123-02345-0502-2" />
<span class="error_message">Duplicate value for ISBN</span></div>
If I re-create the database, or re-extract it, then things pass; however
it seems poor form for the test to be so delicate as to be one-time-
only.
Maybe I suggest that the test suite automatically (re)create the
database every time from the bookdb.sql file?
I see there is an END block which is meant to delete the inserted book
at the end of each test, but it appears this mechanism is failing.
I'm testing on Perl 5.12.2 (threaded) with current-as-of-today CPAN
modules, ie.
DBI=1.615
DBD::SQLite=1.31
Test::More=0.96
DBIx::Class=0.08124