demianturner / sgl-docs-tickets-migration-test

0 stars 0 forks source link

UNIT: DB with tables and data Tests fails when runing cumulatively #1713

Closed demianturner closed 11 years ago

demianturner commented 11 years ago

I was getting some exceptions and failed assertions in lib/SGL/SessionTest when running it cumulatively with others WDD tests.

After some researching I found the problem in SGL_Task_SyncSequences.

According to this condition: [http://trac.seagullproject.org/browser/branches/0.6-bugfix/lib/SGL/Task/Install.php#L1628] the sequences will never be synced for the empty tables when using mysql or mysqli driver.

Here is what happen in my understanding: modules/user have few tests(LoginMgrTest and UserMgrTest) which performs database changes. After all, the UserMgrTest have tearDown method which cleanup(removes all users) those changes and running SGL_Task_SyncSequences::run() which should return usr table into initial state, but it's not :)

Thanks.

p.s.

Attached patch contain the fix based on the existent workaround for mysql_SGL and mysqli_SGL drivers: http://trac.seagullproject.org/browser/branches/0.6-bugfix/lib/SGL/Task/Install.php#L1679

demianturner commented 11 years ago

[demian](In [4316]) fixing SyncSequences task, fixes #1713