[Koha-bugs] [Bug 9486] t/Letters.t loads modules in wrong order

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jan 24 20:39:09 CET 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9486

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #14835|0                           |1
        is obsolete|                            |

--- Comment #4 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Created attachment 14839
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14839&action=edit
[SIGNED-OFF] 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 at catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
Works as advertised.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list