Skip to content
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

startSubscription seems not to return the promise #163

Open
alonisser opened this issue Jun 1, 2018 · 0 comments
Open

startSubscription seems not to return the promise #163

alonisser opened this issue Jun 1, 2018 · 0 comments

Comments

@alonisser
Copy link
Contributor

While the subscription does start, awaiting for the subscription never resolves.. (I managed to get it resolved once, while running in debug mode in the ide and stopping in some checkpoints, but cannot recreate this.
Even in the tests:
https://github.com/arobson/rabbot/blob/master/spec/integration/subscription.spec.js (line 40)

rabbit.startSubscription('rabbot-q.subscription');
rabbit.publish('rabbot-ex.subscription', { type: 'topic', routingKey: 'this.is.a.test', body: 'broadcast' });

You handle it as synchronous . if this is a resolved promise I would expect in the tests

rabbit.startSubscription('rabbot-q.subscription')
.then(()=>{
rabbit.publish('rabbot-ex.subscription', { type: 'topic', routingKey: 'this.is.a.test', body: 'broadcast' });
})

Or else you cannot guarantee the test to pass , Should I handle it as sync?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant