-
Notifications
You must be signed in to change notification settings - Fork 655
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
grpc-js: Client waitForReady callback fix. Fixes #1352 #1368
Conversation
Change the commit messages to follow convention of |
packages/grpc-js/test/test-client.ts
Outdated
.EchoService as ServiceClientConstructor; | ||
|
||
server = new Server(); | ||
server.addService(echoService.service, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this test rely on a service being added to the server? I don't think client.waitForReady
depends on this, see:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, waitForReady
should not depend on the server having any services. In fact, the whole test file can be simplified significantly by omitting all of the protobuf stuff and directly using grpc.Client
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll simplify the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made that change.
…ixes grpc#1352 In the case where a new watcher is synchronously added to the watcher queue via the watcher callback, this can result in the callback being called multiple times. To support this case, the watcher needs to be move removed from the queue before calling the watcher callback.
642a520
to
8b96e36
Compare
8b96e36
to
615a3c6
Compare
No need to add a service to the server to test the client.
9d1e8be
to
7e381f7
Compare
Thank you for your contribution. |
Fixes #1352