But in this case, you have to ensure that all the processes that a test created are cleaned up when the test exists, this could be a problem.
HDFS uses a test called TestDatanodeDeath where certain datanodes are killed. will a similar strategy work here? dhruba On Thu, Apr 22, 2010 at 8:09 AM, kann...@gmail.com (Kannan Muthukkaruppan) < kann...@gmail.com> wrote: > Has there been any discussion/thoughts/earlier work on doing a > process-based > (instead of thread-based) version of miniHBaseCluster? > > Currently, in the thread-based miniHBaseCluster unit tests, to simulate > various kill -9 scenarios of killing a specific region server or master is > trickier. There is a abortRegionServer()/expireRSSession etc. but those are > still somewhat of a controlled shutdown... and it is questionable if they > mimic the real scenarios accurately enough. Yesterday, Todd e.g. asked in > IRC if there was a simple way to kill/abort the master in this setup... and > I think the answer is there isn't currently a simple way to do that. > Karthik > & I were trying to write a test where we want to simulate kill of a RS, > and > then restart an RS on the same server/port before the ZK expiry. But using > abortRegionServer() causes the ZK lease to expire right away... as it seems > to be doing a more controlled shutdown of the various threads associated > with that RS. If we went to a process-based setup, where Master and each RS > were each there own separate processes, simulating a lot of these scenarios > in a single-box unit test run env might be much easier. > > Thoughts? > > regards, > Kannan > -- Connect to me at http://www.facebook.com/dhruba