atom feed6 messages in org.apache.hadoop.zookeeper-devBetter testing for client code...
FromSent OnAttachments
Patrick HuntOct 31, 2011 1:19 pm 
Mahadev KonarOct 31, 2011 9:51 pm 
Fournier, Camille F.Nov 1, 2011 9:00 am 
Patrick HuntNov 1, 2011 9:10 am 
Ted DunningNov 1, 2011 11:09 am 
Benjamin ReedNov 1, 2011 11:57 am 
Subject:Better testing for client code...
From:Patrick Hunt (phu@apache.org)
Date:Oct 31, 2011 1:19:55 pm
List:org.apache.hadoop.zookeeper-dev

I've been thinking that we need better testing for the client code. In particular it's currently difficult to simulate all the different types of failures a client might see. I'm wondering how we might do this - two ideas come to mind; 1) aspectj and 2) mocks (mockito). Anyone have other suggestions?

I've used 1 before on an ad-hoc basis to find issues in the server quorum code (aspects which would randomly cause a connect, bind, write, read, etc.... to fail). 2 seems better from a deterministic basis (ie repeatable tests that are easier to verify pass/fail). The only issue I see with 2 (other than refactoring some of the client code) is the need to mock networking level code. Perhaps both approaches could be applied together or separately.

Thoughts?

Patrick