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

Method exceptionCaughtChNotOpen

test/TestRegionClient.java:131–144  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

129 }
130
131 @Test
132 public void exceptionCaughtChNotOpen() throws Exception {
133 PowerMockito.mockStatic(Channels.class);
134 final RegionClient rclient = PowerMockito.spy(new RegionClient(hbase_client));
135 PowerMockito.field(RegionClient.class, "chan").set(rclient, chan);
136 final ExceptionEvent event = new DefaultExceptionEvent(chan,
137 new RuntimeException("Boo!"));
138
139 rclient.exceptionCaught(null, event);
140
141 verifyPrivate(rclient, times(1)).invoke("cleanup", chan);
142 PowerMockito.verifyStatic(never());
143 Channels.close(chan);
144 }
145
146 @Test (expected = NullPointerException.class)
147 public void exceptionCaughtNullEvent() throws Exception {

Callers

nothing calls this directly

Calls 3

exceptionCaughtMethod · 0.95
closeMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected