tolitius / cbass

adding "simple" to HBase
Eclipse Public License 1.0
24 stars 11 forks source link

refactor test to mock connection #14

Closed rmangi closed 4 years ago

rmangi commented 4 years ago

Refactored so as not to try to connect to zookeeper whenever test were run.

So this was actually very interesting. I was trying to run cloverage across our repo (about 20 clojure projects) and a bunch were failing with a strange exception. I tracked it down to all of the projects that imported cbass. Turns out the core test, which is really in integration test, connection to zookeeper was being executed when cloverage scanned the imported code. The weird thing was that it was complaining about nippy, perhaps it was just the import order.

This just mocks out the connection and the other methods being called by the test to avoid the problem.

I also bumped the version of nippy and clojure while I was in there.

Thanks!

rmangi commented 4 years ago

Sorry, meant to merge this onto my master first.

tolitius commented 4 years ago

great, thanks. did you test it with the new Clojure and nippy versions? (I mean cbass core functionality, not just the mocks)

rmangi commented 4 years ago

yep, i deployed it locally and it seems to work fine.

tolitius commented 4 years ago

great. thanks for the changes and for confirming.