segmentio / nsq.js

NSQ client for nodejs
203 stars 34 forks source link

connect after event handlers are added, fix tests #70

Closed calvinfo closed 8 years ago

calvinfo commented 8 years ago

This commit introduces several changes

This last bullet allows the reader to add event handlers before the connection is made.

calvinfo commented 8 years ago

The reason the tests are flakey with a single topic name is that I'm pretty sure the nsqlookups don't atomically delete the topic over the course of the request. It's quick enough on the local machine, but on circle it makes for a much flakier set of tests.

juliangruber commented 8 years ago

maybe i missed it in the diff, but can you add a test for "adds reader connection post after construction"?

calvinfo commented 8 years ago

@juliangruber, good call–done!

gjohnson commented 8 years ago

LGTM!

calvinfo commented 8 years ago

thanks guys!