]> git.vpit.fr Git - perl/modules/autovivification.git/commit
Threads tests may not be able to spawn all the threads
authorVincent Pit <vince@profvince.com>
Fri, 11 Nov 2011 18:41:17 +0000 (19:41 +0100)
committerVincent Pit <vince@profvince.com>
Fri, 11 Nov 2011 18:41:17 +0000 (19:41 +0100)
commitbff16fe7ea455b013bb0e681f2852f6c11d72636
treee75368c511c5aa3afefe9cb9ec3e64638253c8ca
parente1d2632ef0b4e3ee3e418c12903f81b5d7b55b1a
Threads tests may not be able to spawn all the threads

To work around this :
- move all the threads boilerplate to a new helper test module ;
- capture the warnings/errors that threads->create may throw and reprint
them properly as diagnostics ;
- use Test::Leaner instead of Test::More, as older Test::More sometimes
cause out of sequence bugs ;
- last but not least, do not hardcode the plan and use done_testing with
the actual number of spawned threads instead.
MANIFEST
t/50-threads.t
t/51-threads-teardown.t
t/lib/autovivification/TestThreads.pm [new file with mode: 0644]