MCPcopy Index your code
hub / github.com/OpenTSDB/asynchbase / exceptionCaught

Method exceptionCaught

test/TestRegionClient.java:115–129  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113 }
114
115 @Test
116 public void exceptionCaught() throws Exception {
117 PowerMockito.mockStatic(Channels.class);
118 when(chan.isOpen()).thenReturn(true);
119 final RegionClient rclient = PowerMockito.spy(new RegionClient(hbase_client));
120 PowerMockito.field(RegionClient.class, "chan").set(rclient, chan);
121 final ExceptionEvent event = new DefaultExceptionEvent(chan,
122 new RuntimeException("Boo!"));
123
124 rclient.exceptionCaught(null, event);
125
126 verifyPrivate(rclient, never()).invoke("cleanup", chan);
127 PowerMockito.verifyStatic();
128 Channels.close(chan);
129 }
130
131 @Test
132 public void exceptionCaughtChNotOpen() throws Exception {

Callers

nothing calls this directly

Calls 3

exceptionCaughtMethod · 0.95
closeMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected