Skip to content

Commit

Permalink
Revert "interop-testing: overrideAuthority breaks JWT"
Browse files Browse the repository at this point in the history
This reverts commit 57b9105.

Issue #2682 is fixed, so we can revert the commit as planned. This
re-applies a previously-reverted modernization.
  • Loading branch information
ejona86 committed Jul 19, 2017
1 parent 946c29a commit 924b0b2
Showing 1 changed file with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
import io.netty.handler.ssl.SslContext;
import java.io.File;
import java.io.FileInputStream;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.UnknownHostException;
import java.nio.charset.Charset;
import javax.net.ssl.SSLSocketFactory;

Expand Down Expand Up @@ -296,16 +293,6 @@ private class Tester extends AbstractInteropTest {
@Override
protected ManagedChannel createChannel() {
if (!useOkHttp) {
InetAddress address;
try {
address = InetAddress.getByName(serverHost);
if (serverHostOverride != null) {
// Force the hostname to match the cert the server uses.
address = InetAddress.getByAddress(serverHostOverride, address.getAddress());
}
} catch (UnknownHostException ex) {
throw new RuntimeException(ex);
}
SslContext sslContext = null;
if (useTestCa) {
try {
Expand All @@ -315,7 +302,8 @@ protected ManagedChannel createChannel() {
throw new RuntimeException(ex);
}
}
return NettyChannelBuilder.forAddress(new InetSocketAddress(address, serverPort))
return NettyChannelBuilder.forAddress(serverHost, serverPort)
.overrideAuthority(serverHostOverride)
.flowControlWindow(65 * 1024)
.negotiationType(useTls ? NegotiationType.TLS : NegotiationType.PLAINTEXT)
.sslContext(sslContext)
Expand Down

0 comments on commit 924b0b2

Please sign in to comment.