-
8000
Notifications
You must be signed in to change notification settings - Fork 781
Add interop test spec and interop tests #772
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
Conversation
Some TODOs and TBDs:
|
02bc4c9
to
8d27522
Compare
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.
The initial version of interop-test-descriptions.md looks good, @JamesNK may have some questions about implementing this.
I haven't checked the .js code at all (not very familar with the language).
Besides that test definitions, we will also need some simple test harness for actually running the tests - that can come in a followup PR.
For grpc-dotnet:
Questions:
|
Yes that would be preferred. I am planning the same for the canonical implementation.
Yes. But that may come later. We have 3 sets of tests in the foreseeable future: this canonical JS+Envoy test, your dotnet client/server, the Java in-process proxy we are working on. We are certainly looking to automate this. We have an entry point |
8d27522
to
f1d3f57
Compare
I updated the PR to make it clearer that
Thanks for pointing that out. |
That's fine. I'd like to think about some technical aspects of it now. With the standard gRPC tests a client process is started for each test, and success or failure is reported by the exit code of the client process. At the moment this PR has the canonical gRPC-Web client tests are being run in a browser together. That makes figuring out programmatically what tests were successful and what failed difficult. Should a proper JS test framework be used? Related: There is a .NET gRPC-Web client, and I was concerned about how it could fit into a browser based test system. I think that can easily be solved by having the JS test framework call into a Blazor WebAssembly app, and have it execute the test logic there, and then return back to the JS test method with the result. |
Yes that's definitely my plan - see the first item in my TODO list earlier in this thread. I definitely want to somehow automate this using a framework so that we don't need to manually open up a browser. I don't think opening up a browser to run the test is necessary for this. As long as the testing framework is supposed to mimic running the test on a browser (I actually wasn't very familiar with this ecosystem so I need to do more research on it. If you find anything please let me know), I absolutely would like to be able to run it from the command line. |
Opps, I didn't read your todo list. Last time I asked about JavaScript testing (1.5 years ago) the most common suggestion was https://jestjs.io/ |
I looked at the grpc-node repository and it uses mocha which is another popular choice. |
| google_default_credentials | TBD | TBD | | ||
| compute_engine_channel_credentials | TBD | TBD | | ||
| custom_metadata | ✓ | ✓ | | ||
| status_code_and_message | ✓ | ✓ | |
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.
status_code_and_message has a full duplex call.
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.
Yea I probably should put an asterisk in those tests where we should only implement the UnaryCall
part.
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 think this is the only one like that with a tick.
gRPC-Web client and Docker containers: I've added a readme with instructions on how to run the gRPC-Web server and client containers. FYI, I have the |
f1d3f57
to
e3f0dc0
Compare
Some updates:
|
5fa0e0e
to
af27b15
Compare
This is great! We should port the implementations from https://github.com/johanbrandhorst/grpc-web-compatibility-test. |
This PR adds an interop test specifications to this repo, in the hopes that we have a uniform way to test different implementation and integration with different gRPC-Web components.
The idea is that we should be able to swap out any of these 3 components and the set of gRPC-Web interop tests should still pass.
The client can be any client that implements the grpc-web spec, including a curl client for example. In the middle we can swap out Envoy with the Java in-process proxy we are currently working on, for example. The gRPC Interop Service can be any server that implements the interop test suite in any supported gRPC languages.
The canonical set of tests are based on the specification found in the
grpc/grpc repo
. Here in gRPC-Web only a subset of the tests will be relevant to us (e.g. we won't be implementing any tests involving client-streaming and bidi-streaming). We will also try to add tests that's specific to gRPC-Web.This PR also starts to add the interop test implementations for this reference repo. It's not complete yet - there will be more work on this. In fact, we have identified some issues because of these tests so we need to fix some of those issues in the library first.