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

Method channelDisconnected

test/TestRegionClient.java:203–220  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

201 }
202
203 @SuppressWarnings("rawtypes")
204 @Test
205 public void channelDisconnected() throws Exception {
206 RegionClient rclient = PowerMockito.spy(new RegionClient(hbase_client));
207 PowerMockito.field(RegionClient.class, "chan").set(rclient, chan);
208
209 when(cse.getChannel()).thenReturn(chan);
210 // Prevent/stub logic in super.method()
211 PowerMockito.doNothing().when((ReplayingDecoder)rclient)
212 .channelDisconnected(ctx, cse);
213 PowerMockito.doNothing().when(rclient, "cleanup", chan);
214 PowerMockito.when(rclient, "channelDisconnected", ctx, cse)
215 .thenCallRealMethod();
216
217 assertNotNull(Whitebox.getInternalState(rclient, "chan"));
218 rclient.channelDisconnected(ctx, cse);
219 assertNull(Whitebox.getInternalState(rclient, "chan"));
220 }
221
222 @Test
223 public void channelClosed() throws Exception {

Callers

nothing calls this directly

Calls 3

channelDisconnectedMethod · 0.95
getChannelMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected