Skip to content

Commit

Permalink
HBASE-27278 Improve TestTlsIPC to reuse existing IPC test code (#4682)
Browse files Browse the repository at this point in the history
Signed-off-by: Bryan Beaudreault <[email protected]>
(cherry picked from commit 3309108)
  • Loading branch information
Apache9 committed Aug 12, 2022
1 parent 3f5076d commit b820188
Show file tree
Hide file tree
Showing 17 changed files with 692 additions and 508 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public static String getDefaultCodec(final Configuration c) {
* Encapsulate the ugly casting and RuntimeException conversion in private method.
* @return Codec to use on this client.
*/
Codec getCodec() {
protected Codec getCodec() {
// For NO CODEC, "hbase.client.rpc.codec" must be configured with empty string AND
// "hbase.client.default.rpc.codec" also -- because default is to do cell block encoding.
String className = conf.get(HConstants.RPC_CODEC_CONF_KEY, getDefaultCodec(this.conf));
Expand All @@ -251,7 +251,7 @@ public boolean hasCellBlockSupport() {
}

// for writing tests that want to throw exception when connecting.
boolean isTcpNoDelay() {
protected boolean isTcpNoDelay() {
return tcpNoDelay;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public NettyRpcClient(Configuration configuration, String clusterId, SocketAddre
}

/** Used in test only. */
NettyRpcClient(Configuration configuration) {
public NettyRpcClient(Configuration configuration) {
this(configuration, HConstants.CLUSTER_ID_DEFAULT, null, null);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ private void connect() throws UnknownHostException {
.option(ChannelOption.TCP_NODELAY, rpcClient.isTcpNoDelay())
.option(ChannelOption.SO_KEEPALIVE, rpcClient.tcpKeepAlive)
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, rpcClient.connectTO)
.handler(new ChannelInitializer() {
.handler(new ChannelInitializer<Channel>() {
@Override
protected void initChannel(Channel ch) throws Exception {
if (conf.getBoolean(X509Util.HBASE_CLIENT_NETTY_TLS_ENABLED, false)) {
Expand Down

This file was deleted.

Loading

0 comments on commit b820188

Please sign in to comment.