]> git.koha-community.org Git - koha.git/commit
Bug 9486: t/Letters.t loads modules in wrong order
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Thu, 24 Jan 2013 18:58:07 +0000 (13:58 -0500)
committerChris Cormack <chris@bigballofwax.co.nz>
Fri, 1 Feb 2013 08:46:48 +0000 (21:46 +1300)
commitfa106c3eb12566528657438f271e160995387d1b
tree053c31cb377ef2e6efda0a5a7ed1b237185376b5
parent847df9ab3fca2ef30cf2069a82e719b889e84332
Bug 9486: t/Letters.t loads modules in wrong order

Because the unit test t/Letters.t loads C4::Letters before C4::Context,
and C4::Letters is not even vaguely thread-safe, the test tends to fail.
Usually. Moving the dbh mocking to before the use_ok('C4::Letters') test
fixes the problem.

To test:
1) Before applying patch, run `prove t/Letters.t` a few times. Note that
   it fails most of the time, if not all the time.
2) Apply patch.
3) Repeat step (1), noting that now it passes every time.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as advertised.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
t/Letters.t