From: <dun...@bt...> - 2009-04-08 15:38:38
|
It did make a difference but the numbers still don't match completely - 23,967 vs 23,969. It seems clear there is a race condition here, not sure if there's any way to fix it. Password "bug" for zip. Duncan. -----Original Message----- From: Loveday,DAH,Duncan,DKV R Sent: 08 April 2009 16:29 To: Jake Cobb Cc: cob...@li... Subject: RE: [Cobertura-devel] Cobertura and shutdown hooks Thanks, I'll give that a go. One thought though - if the two are racing then that could result in two calls to saveGlobalProjectData() running concurrently unless the method is synchronized...is it ? -----Original Message----- From: jak...@gm... [mailto:jak...@gm...] On Behalf Of Jake Cobb Sent: 08 April 2009 16:18 To: Loveday,DAH,Duncan,DKV R Cc: cob...@li... Subject: Re: [Cobertura-devel] Cobertura and shutdown hooks The order that shutdown hooks are run is not specified by the API and is therefor effectively non-deterministic. Try calling net.sourceforge.cobertura.coveragedata.ProjectData.saveGlobalProjectData () explicitly at the end of your hook. If Cobertura's hook has already run, this should merge new counts that occurred in the interim into the coverage it would have just saved. -Jake Cobb On Wed, Apr 8, 2009 at 10:02 AM, <dun...@bt...> wrote: > My code coverage reports look great but seem not to include activity > called from a shutdown hook even though I know that activity has taken > place. > > Is that because Cobertura uses a shutdown hook to do its reporting and > the two are racing ? How can I make sure my shutdown hook fully > completes before Cobertura starts producing its report ? > > ------------------------------------------------------------------------ ------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > |