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

interop-testing: add alpnagent to support okhttp in test client #3037

Merged

Conversation

ericgribkoff
Copy link
Contributor

In response to grpc/grpc#11258 / #3032, we should run our full suite of interop tests using OkHttp. As best I can tell, OkHttp cannot use ALPN unless it has the ALPN agent, which was removed a while ago from the build rule, back when we were still using the boot classpath. This adds it back in, so that the --use_okhttp=true option in the test client is able to use TLS.

@ejona86
Copy link
Member

ejona86 commented May 26, 2017

This does not work if you move the install files to a different machine or clear the gradle cache. It has a hard-coded path:

$ grep javaagent interop-testing/build/install/grpc-interop-testing/bin/test-client
DEFAULT_JVM_OPTS='"-javaagent:/usr/local/google/home/ejona/.gradle/caches/modules-2/files-2.1/org.mortbay.jetty.alpn/jetty-alpn-agent/2.0.6/ecca008cfd140e088590c0f2e0f223523cdb18d2/jetty-alpn-agent-2.0.6.jar"'

@ericgribkoff
Copy link
Contributor Author

AFAIK, the only alternative to using Gradle's defaultJvmOpts with the hard-coded path in the generated shell script is to require the user to specify the path to Jetty ALPN on the command-line, e.g., env JAVA_OPTS=-javaagent:pathTo/jetty-alpn-agent-2.0.6.jar build/install/grpc-interop-testing/bin/test-client --server_host_override=foo.test.google.fr --use_test_ca=true --use_okhttp=true. Is this alternative the preferred approach? If so, I should at least add some message to the test client output explaining that this is required. Right now the combination of tls and okhttp never works.

@ericgribkoff
Copy link
Contributor Author

@ejona86 I updated build.gradle to avoid having hard-coded paths in the startup scripts. This requires a little bit of hackery to get the $APP_PATH and %APP_PATH% variables working correctly on *nix and Windows startup scripts.

@ericgribkoff ericgribkoff merged commit a2a42e3 into grpc:master Jun 5, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants