-
Notifications
You must be signed in to change notification settings - Fork 805
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->grpc-js #1778
grpc->grpc-js #1778
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1778 +/- ##
==========================================
+ Coverage 92.11% 92.52% +0.40%
==========================================
Files 166 69 -97
Lines 5571 1913 -3658
Branches 1197 409 -788
==========================================
- Hits 5132 1770 -3362
+ Misses 439 143 -296
|
Please also make sure you sign the CLA or we cannot accept your contribution. |
@dyladan as I say, I didn't particularly expect this version to be accepted since I didn't bother doing it right (i used |
I started looking into this error and it's a tricky one. The failure occurs somewhere deep in the internals of grpc-js and it's hard to see what's happening |
@dyladan assuming you're referring to
Is there reason to believe this is actually a problem with the grpc-js client & thus that it's actually not compatible? Or is it just a test problem? |
Yes that's my feeling. I considered that it might be a bug with the client, but in order to prove that i would want to create a much more minimal reproduction and I don't really have time for that at the moment. |
@dyladan fortunately, I have time. It's amazing how efficiently you can work when you remove the requirement of "not writing code that is absolute, utter shit." anyway, pulled what i think is the equivalent of what we do in the test out into just a normal script and it works fine. I even got into it with the debugger (which I had originally tried to set up to debug inside of mocha) and the That's the annoying part btw; I know how to set a breakpoint in grpc-js's client.ts and run a jest test with the debugger so i break in the test, but doing the same steps with mocha failed. And I definitely don't have time to learn how to do weird things with mocha. |
You can run tests with debugging enabled by doing You can also run only a single test file by running the test command manually |
So it turns out that the problem was that the
which was subsequently converted by In any case, my suspicion all along was that something in how the async code was done in this test is causing strange things to happen. |
Does that mean you discovered a solution? |
@dyladan I do not. I mean that I believe this is a bug in the test's async code & not a sign that In other words, I think that if you were to rewrite the test more carefully to set up in the proper order (probably with async/await), it would work fine. |
Closing since this has been done with #2092 |
NOTE: this is a draft just so it's easier to have a discussion about the issue. I know I'm not doing the commits properly.
Which problem is this PR solving?
Short description of the changes
As you can see, despite the claims, grpc-js is not really a drop-in replacement for grpc. I'm sure the client is a drop-in replacement, but the server isn't, and I don't know enough about this test framework & how the server is supposed to work normally to fix it.
For reference: https://www.npmjs.com/package/@grpc/grpc-js