From: <dun...@bt...> - 2009-04-08 15:10:16
|
The particular example is a program that buffers records in a queue on their way to a file. The queue is flushed for every 1000 records written and at the end of the program using a shutdown hook. The test run writes 23969 records and they are all in the file (actually spread across a few files) $ grep "<L:RECORD>" *.xml3 LFError.txt LFAudit.txt | wc -l 23969 $ But the coverage tool only shows 23000 reads from the queue. The statements at the top of the shutdown hook are shown as being executed once - those at the bottom zero times. Conclusion: Most activity in the shutdown hook is not being counted. Extract of teport is attached - shutdown hook is com.bt.util.logging.ShutdownThread, queue class is com.bt.components.doubleQueue.QueueManager. Duncan. -----Original Message----- From: John W. Lewis [mailto:Joh...@sa...] Sent: 08 April 2009 15:39 To: Loveday,DAH,Duncan,DKV R; cob...@li... Subject: RE: Cobertura and shutdown hooks I'm not sure. We haven't had that issue before. -----Original Message----- From: dun...@bt... [mailto:dun...@bt...] Sent: Wednesday, April 08, 2009 10:03 AM To: cob...@li... Subject: [Cobertura-devel] Cobertura and shutdown hooks 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 |