Re: [JGIT PATCH v2 00/11] WindowCache rewrite... with tests
- From
Robin Rosenberg <robin.rosenberg.lists@dewire.com>
- Date
- Apr 29, 2009, 23:46 UTC
- Message-ID
- <200904300146.31062.robin.rosenberg.lists@dewire.com>
- In-Reply-To
- <1241031288-23437-1-git-send-email-spearce@spearce.org>
onsdag 29 april 2009 20:54:37 skrev "Shawn O. Pearce" <spearce@spearce.org>:
Show 7 quoted lines
> 9-11 is the rewrite of WindowCache, with new unit tests to get higher > levels of coverage in this section of the code. Actually doing > better is really hard, as we'd need to cause thread race conditions > deep within critical sections. The only way I can think to do that > is to add injection points where we can insert "evil other thread" > logic during the unit test, and rely on the JIT to compile them > out in normal application usage. Ick. Its also quite fragile.
Testing *is* hard. No news here. There are various techniques for injecting code using AOP (AspjectJ) that may be useful for testing, since we could inject failures that way without the overhead of injection points in normal execution.
-- robin