GRPC tests fail and hang with JDK 1.8.0_73
Making the following change in build.gradle gets everything working again:
- def alpnboot_version = '8.1.2.v20141202'
+ def alpnboot_version = '8.1.7.v20160121'
However, doing so would probably break the build for developers using an old JDK and for Travis.
Should the current logic for choosing the ALPN version accommodate more than one version of Java 8, or is the current approach intentional?
It should accommodate more than one version of Java 8.
This only affects building gRPC from source. Does not affect people using gRPC packages.
May be of use https://github.com/jetty-project/jetty-alpn-agent
Some more info: https://www.eclipse.org/jetty/documentation/current/alpn-chapter.html#alpn-versions
http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.mortbay.jetty.alpn%22%20a%3Ajetty-alpn-agent
A quick attempt looks like it may work.
diff --git a/build.gradle b/build.gradle
index 2f7b20f..cc0ec46 100644
--- a/build.gradle
+++ b/build.gradle
@@ -164,6 +164,7 @@ subprojects {
// Define a separate configuration for managing the dependency on Jetty alpnboot jar.
configurations {
alpnboot
+ alpnagent
tcnative
}
@@ -172,7 +173,8 @@ subprojects {
libraries.mockito
// Configuration for modules that use Jetty ALPN
alpnboot alpnboot_package_name
+ alpnagent 'org.mortbay.jetty.alpn:jetty-alpn-agent:2.0.2'
// Configuration for modules that use Netty tcnative (for OpenSSL).
tcnative libraries.netty_tcnative
diff --git a/netty/build.gradle b/netty/build.gradle
index 7f76b0c..4677048 100644
--- a/netty/build.gradle
+++ b/netty/build.gradle
@@ -9,7 +9,7 @@ dependencies {
}
test {
- jvmArgs "-Xbootclasspath/p:" + configurations.alpnboot.asPath
+ jvmArgs "-javaagent:" + configurations.alpnagent.asPath
}
javadoc.options.links 'http://netty.io/4.1/api/'
resolve by the commit: use Jetty ALPN agent instead of Jetty ALPN #1760