|
Hi,
When playing around with eunit's surefire XML reports I noticed that the files are sometimes not generated and I decided to have a look: Wait until all eunit listeners terminate Ensure that all eunit listeners (like eunit_surefire) get the chance to finish their work before terminating. Prior to this fix, the eunit_surefire XML was sometimes not generated. While addressing that problem I also noticed the following: Don't let eunit_surefire report back to eunit when stopping When eunit is terminating, a stop message is sent to all listeners and eunit then waits for *one* result message but previously both eunit_tty and eunit_surefire sent a response on error. Don't send a result message from eunit_surefire; let eunit_tty take care of all result reporting, both positive and negative to avoid race conditions and inconsistencies. Tested manually by running eunit with surefire report generation over and over again (with a timer:sleep/1 inserted to make sure that XML file generation takes time to complete). Code here: git fetch git://github.com/klajo/otp.git eunit-race-cond Cheers, Klas _______________________________________________ erlang-patches mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-patches |
|
On 04/18/2011 11:06 AM, Klas Johansson wrote:
> Hi, > > When playing around with eunit's surefire XML reports I > noticed that the files are sometimes not generated and > I decided to have a look: > > Wait until all eunit listeners terminate > > Ensure that all eunit listeners (like > eunit_surefire) get the chance to finish their work > before terminating. Prior to this fix, the > eunit_surefire XML was sometimes not generated. > > While addressing that problem I also noticed the > following: > > Don't let eunit_surefire report back to eunit when stopping > > When eunit is terminating, a stop message is sent > to all listeners and eunit then waits for *one* > result message but previously both eunit_tty and > eunit_surefire sent a response on error. Don't > send a result message from eunit_surefire; let > eunit_tty take care of all result reporting, both > positive and negative to avoid race conditions and > inconsistencies. > > Tested manually by running eunit with surefire report > generation over and over again (with a timer:sleep/1 > inserted to make sure that XML file generation takes > time to complete). > > > Code here: > > git fetch git://github.com/klajo/otp.git eunit-race-cond > > > > Cheers, > Klas > _______________________________________________ > erlang-patches mailing list > [hidden email] > http://erlang.org/mailman/listinfo/erlang-patches Thank you for the contribution! you branch is now cooking in 'pu' -- /Henrik Nord Erlang/OTP _______________________________________________ erlang-patches mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-patches |
| Powered by Nabble | Edit this page |
