oortcloud / node-ddp-client

A callback style DDP (Meteor's Distributed Data Protocol) node client.
Other
263 stars 80 forks source link

Add some test and fix a rare network condition that caused a crash #19

Closed sarfata closed 11 years ago

sarfata commented 11 years ago

I am opening this branch to fix #18. In the process, I have added some test to reproduce my bug and added some very simple tests on basic features.

This will need to be expanded but it sets the base for a test infrastructure.

This is not quite ready to be merged yet, I need to double-check that my fix works and does not have any side-effect but I am opening this pull-request to discuss it with you guys ( ping @tmeasday / @emgee3).

FYI - I am using rewire and sinon (new dependencies) to mock WebSocket.

emgee3 commented 11 years ago

@sarfata this looks good to me.

You have a commented-out test that I also couldn't get to work with the fake timer, but worked fine with a setTimeout.

sarfata commented 11 years ago

Thanks @emgee3 for the feedback!

@tmeasday I would like to publish this as 0.3.3 - is this ok with you? Can you give me npm publish-right (sarfata/thomas@sarlandie.net)? Or do you want to do it?

tmeasday commented 11 years ago

Done! Sorry about the silence at my end.

@emgee3 - would you like to be added as an npm package owner too?

PS if either of you are feeling adventurous, I'm fairly sure that https://github.com/joyent/node/issues/5557#issuecomment-18477294 is affecting the library via a problem with ws. I know it's affecting Meteorite.

emgee3 commented 11 years ago

@tmeasday I guess that would be a good idea. emgee@gravitronic.com on npm

tmeasday commented 11 years ago

@emgee3 -- it can't find you. Do you have a username?

On Tuesday, 28 May 2013 at 1:30 PM, emgee3 wrote:

@tmeasday (https://github.com/tmeasday) I guess that would be a good idea. emgee@gravitronic.com (mailto:emgee@gravitronic.com) on npm

— Reply to this email directly or view it on GitHub (https://github.com/oortcloud/node-ddp-client/pull/19#issuecomment-18523477).

emgee3 commented 11 years ago

On NPM it's just emgee

tmeasday commented 11 years ago

Cool, sorted