-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am getting COMMAND_INVALID - second 'channel.open' seen errors #44
Comments
You are right, that sounds very like the breakage due to me not using util#inherits (or the like), as reported in #35, #37 and #38, and supposedly fixed in 8b431bf and released in v0.2.1. I'll have a closer look at your code and try it out. Just to check:
|
I'm surprised that runs as-is, since it doesn't synchronise on the context being open (emitting 'ready'). it('should open a publish stream', function(done){
log('open')
bus.rabbitContext.on('ready', function() {
bus.publish('sometestpub', function(err, stream){
log('stream', 'publish');
stream.should.exist;
stream.write("TEST TEST", 'utf8');
done()
})
})
}) |
This did indeed resolve my issue, that said I think the challenge here is that, and correct me if i am wrong this "ready" event is only emitted once, so I pretty much have it around the first test and then assume in the next one that the context is in a ready state. I am not entirely keen on this, but having had a look at what you have to work with I understand with this limitations. Originally I was trying to use the connect callback, but again this only fired on the first test, so the second would time out. Cheers for taking the time to check it over for me, your guidance is much appreciated. |
Events and callbacks are almost no use for synchronisation, it is true. My adjustment was pretty crude -- just enough to delay the test run, given some assumptions (specifically that the test harness serialises tests). I am now seeing some "send 'channel.open' seen" errors, in a different scenario. So I'm not sure it's entirely down to the problems fixed already. Stay tuned ... |
Gday
Been working with rabbit.js quite a bit and started getting these errors on 0.10.12.
I saw there were some issues a ways back and wonder if you had any ideas.
I have this thing i call a bus, just hides all the messaging stuff behind a couple of simple functions.
And a test using mocha.
This works fine on 0.8.22 and fails on 0.10.12.
The text was updated successfully, but these errors were encountered: