accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Slacum <wilhelm.von.cl...@accumulo.net>
Subject Re: Using ZooCache in unit tests
Date Thu, 12 Jun 2014 00:16:12 GMT
What about mocking that call?


On Wed, Jun 11, 2014 at 8:09 PM, Mike Drob <madrob@cloudera.com> wrote:

> When writing unit tests, I indirectly call code that invokes
> {{Tables.getZooCache(Instance)}} which sets up a connection to a zookeeper.
> However, there is not a server running, so this end up looping forever
> until my test times out.
>
> It looks like my options are...
> 1) Make it an IT that uses MAC, so that there is a ZK to connect to
> (probably overkill)
> 2) Stand up my own ZK (error prone? duplicative?)
> 3) Stand up a Curator Testing Server (introduces new dependencies).
> 4) Not write tests.
>
> I'm leaning toward number 3, but was wondering if anybody had thoughts on
> this, since I feel like that will have a lasting impact on the code.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message