()
| 322 | } |
| 323 | |
| 324 | @Test |
| 325 | public void channelConnected96Secure() throws Exception { |
| 326 | RegionClient rclient = mock(RegionClient.class, Mockito.RETURNS_DEEP_STUBS); |
| 327 | Config config = new Config(); |
| 328 | config.overrideConfig("hbase.security.auth.enable", "true"); |
| 329 | when(hbase_client.getConfig()).thenReturn(config); |
| 330 | SecureRpcHelper96 helper = mock(SecureRpcHelper96.class); |
| 331 | PowerMockito.whenNew(SecureRpcHelper96.class).withAnyArguments() |
| 332 | .thenReturn(helper); |
| 333 | |
| 334 | hbase_client.has_root = false; |
| 335 | when(cse.getChannel()).thenReturn(chan); |
| 336 | PowerMockito.field(RegionClient.class, "hbase_client") |
| 337 | .set(rclient, hbase_client); |
| 338 | PowerMockito.when(rclient, "channelConnected", ctx, cse).thenCallRealMethod(); |
| 339 | |
| 340 | rclient.channelConnected(ctx, cse); |
| 341 | |
| 342 | verify(helper, times(1)).sendHello(chan); |
| 343 | verifyPrivate(rclient, never()).invoke("helloRpc", eq(chan), any(byte[].class)); |
| 344 | verifyPrivate(rclient, never()).invoke("becomeReady", chan, |
| 345 | RegionClient.SERVER_VERSION_095_OR_ABOVE); |
| 346 | } |
| 347 | |
| 348 | @Test |
| 349 | public void channelConnected96SplitMetaSecure() throws Exception { |
nothing calls this directly
no test coverage detected