[ 
https://issues.apache.org/jira/browse/HBASE-18338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16093873#comment-16093873
 ] 

Enis Soztutar commented on HBASE-18338:
---------------------------------------

bq. introduces Configuration::HBASE_CLIENT_RPC_TEST_MODE to bypass some code 
for RPC test only, otherwise tests will fail given RpcTestServer implementation.
SaslHandler should behave as a transparent proxy for the unit tests, but it is 
also doing the connection preamble. Maybe that is why it was failing with the 
unit test.
Can you please move the constants HBASE_CLIENT_RPC_TEST_MODE from Configuration 
to be somewhere else in the rpc-related classes. Maybe in RpcSerde or 
something. 
Instead of this: 
{code}
+  if (!conf_->GetBool(
+      Configuration::HBASE_CLIENT_RPC_TEST_MODE,
+      Configuration::DEFAULT_HBASE_CLIENT_RPC_TEST_MODE)) {
+    secure = security::User::IsSecurityEnabled(*conf_);
+    pipeline->addBack(SaslHandler{user_util_.user_name(secure), conf_});
+  }
{code}
we should add the handler, but inside the handler, not write the preamble 
similar to how you have done it in the ClientHandler. 
Can you please run bin/format-code.sh inside the docker container, as well as 
make lint for the lint errors. 
Otherwise looks good. 

> [C++] Implement RpcTestServer
> -----------------------------
>
>                 Key: HBASE-18338
>                 URL: https://issues.apache.org/jira/browse/HBASE-18338
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Xiaobing Zhou
>            Assignee: Xiaobing Zhou
>         Attachments: HBASE-18338.000.patch, HBASE-18338.001.patch, 
> HBASE-18338.002.patch, HBASE-18338.003.patch, HBASE-18338.004.patch, 
> HBASE-18338.005.patch
>
>
> This is a spin-off from HBASE-18078. We need RpcTestServer to simulate 
> various communication scenarios, e.g. timeout, connection aborted, long 
> running services and so on.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to