MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / channelConnected96Secure

Method channelConnected96Secure

test/TestRegionClient.java:324–346  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 6

overrideConfigMethod · 0.95
channelConnectedMethod · 0.95
getConfigMethod · 0.80
getChannelMethod · 0.80
setMethod · 0.45
sendHelloMethod · 0.45

Tested by

no test coverage detected