Test Catch-up Moose

It test post-ette day here in the Moose-Pen

Why stop a habit and as usual ona Saturday I am goting to to a quick post on the current state of the test suite for Database::Accessor and Briver::DBI.

Not a lot of changes in Accessor today


3 files changed, 151 insertions(+), 48 deletions(-)

So I am not expecting many new fails it any.

t/11_link.t (Wstat: 65280 Tests: 11 Failed: 3)
Failed tests: 9-11
Non-zero exit status: 255
Parse errors: Bad plan. You planned 8 tests but ran 11.
t/57_dad_elements.t (Wstat: 3072 Tests: 58 Failed: 12)
Failed tests: 20-22, 24, 26-30, 32, 34-35
Non-zero exit status: 12

ok a few things to look at first is this that showed up while 11_link.t was running;

this=$VAR1 = bless( {
'conditions' => [


So got some debug info that got checked in by accident. Better remove that first and update the count on it as well.

The next test case 57_dad_elements.t is a little more problematic as the fails are like this one;


t/57_dad_elements.t ......... 1/58
# Failed test 'Link index 0 condition left inherit view'
# at t/57_dad_elements.t line 396.

These are of course related back to that change in the 'Link' API I made where I use to try and use both the DA's 'view' and the Link's 'view' to fill in any missing views on elements on the Link. I think only changes to the tests are needed.

Well I changed the test;


conditions => [
{
left => { name => 'country_id',
++ view => 'People' },
right => {
name => 'id',
},

and in a number of other places which I will not bore you with here I got that test to pass-fully and for the whole suite I get

All tests successful.
Files=29, Tests=534

Now onto Driver::DBI where I have

8 files changed, 201 insertions(+), 34 deletions(-)

so some real changes in there. Lets see what we get;

t/40_joins.t (Wstat: 1280 Tests: 40 Failed: 5)
Failed tests: 3, 11, 19, 27, 35
Non-zero exit status: 5

this time it is Joins/Links again but this should not take long to fix. After abut 10 adds of

left => { name => 'id',
++ view =>'people' },

I got the test to pass and then on the full suite I ge;

All tests successful.
Files=11, Tests=462,

For the final run I will have a quick look at my XT test for Driver::DBI and all was fine until 10_crud_basic.t where I got;

not ok 8 - All Persons result correct
# Failed test 'All Persons result correct'
# at 10_crud_basic.t line 86.
# Compared array length of $data
# got : array with 5 element(s)
# expect : array with 9 element(s)

the fix was simple;

$test_data = $user_db->people_data;
++splice($test_data,5,8);

I just had to take into account the fact I added a few extra lines of data on the array. After that all four of the extended test cases work so I am back 100% pas

Time for other things.

2mheN2c.jpg

Leave a comment

About byterock

user-pic Long time Perl guy, a few CPAN mods allot of work on DBD::Oracle and a few YAPC presentations