[Melbourne-pm] transactions in Catalyst / Class::DBI

Ben Hare benhare at gmail.com
Thu Sep 3 01:44:27 PDT 2015

Hi all,

I must be missing something really obvious here, possibly due to my
vicious head cold and medicated state, I'm not sure.

I have a Catalyst application using Class::DBI running under fast cgi.
After coming back to work on this application after a period of
absence, all the selenium based tests are failing. Even if I had left
the app in this state and just forgotten, I have gone back to a
previous version that is in production and would not have been
released without all tests passing and the same issue is occurring.

An example of what's happening is:

* a 'user' is created via a web based form via a selenium test
* a look up via Catalyst search ie; $c->model( 'CDBI::ClassName'
)->search() is then done to retrieve the auto-inc id of this newly
created entry in the db. This look up returns no results ( having used
to return the newly created entry )

If I pause the selenium test after the user has been created and
manually check the db the entry is present in db and the same search
as above works when done manually.

AutoCommit is ON by default for this application however in places,
including in the module that creates this user, transactions are used
for some operations using the local transaction hack.

However as I said, this worked before.

Does anyone have any ideas as to what I am forgetting here? Any
suggestions would be greatly appreciated.

Best Regards,


More information about the Melbourne-pm mailing list