TestingResourcePools design 12 August 2004 Reactions

I was digging through some old notes, and came across a simple but useful tip that Rich Garzaniti gave me.

Many applications use resource pools - a good example is connection pools for database connections. Teams often get into trouble because people forget to release the resource back to the pool when they are done with it. As a result you get resource leaks.

To help spot these in testing, make sure you set the resource pool size to 1 in your tests. That way if some code doesn't release its resource the next test that uses that resource will fail, and you don't have too far to look for the culprit.


Links
home
bliki
feed 
Translations
Japanese
Spanish
Korean
Chinese
Thai
Categories
agile
design
dsl
leisure
refactoring
ruby
thoughtWorks
tools
uml
writing
Blog Roll
ThoughtBlogs
TW Alumni
Nicholas Carr
Steve Cook
Brian Foote
Simon Harris
Gregor Hohpe
/\ndy Hunt
Ralph Johnson
Patrick Logan
David Ing
Brian Marick
Jeremy Miller
Jimmy Nilsson
Samuel Pepys
Keith Ray
Johanna Rothman
Kathy Sierra
Dave Thomas