Re: [Perlunit-devel] Suggestions for a PerlUnit conundrum?
Status: Beta
Brought to you by:
mca1001
From: Adam S. <ad...@sp...> - 2002-06-20 15:19:10
|
Matthias Ferber (mf...@hi...) wrote: > I've written a TestDecorator for PerlUnit that runs the tests in a suite > in parallel -- a very useful feature when testing the results of a series > of web queries, since they're time consuming. (I did this a while ago in > JUnit, but it was rather easier there thanks to threading.) > > The problem I've hit has to do with the interprocess communication. I > used the Perl built-in interface to SysV message queues -- msgsnd, msgrcv, > etc., or rather the SysV::* wrapper classes -- to let the parallel test > results be combined into one result set. The problem is that the message > queue or queues created will never get cleaned up if the test is cancelled > by the user or crashes; they'll just clutter up the OS. And trying to > trap signals to clean up the mess on exit is, by all accounts, impossible > to do reliably and safely. > > Any suggestions from PerlUnitLand? I'd welcome either practical solutions > to this problem, or even suggestions for another approach entirely. My > ulterior motive is that I think this decorator is useful enough to be made > public, possibly even bundled with PerlUnit, but I don't want to do that > unless it's more robust than this. This sounds like very interesting work which it would be great to integrate into the main tree. Unfortunately my knowledge of IPC is very limited so I'm afraid I can't really be of much help. I don't suppose named pipes could be of any use? |