()
| 154 | } |
| 155 | |
| 156 | @Test |
| 157 | public void executeHBaseErrorNotWriteable() throws Exception { |
| 158 | when(client.put(any(PutRequest.class))) |
| 159 | .thenReturn(Deferred.fromError(mock(HBaseException.class))); |
| 160 | |
| 161 | final PutDataPointRpc put = new PutDataPointRpc(tsdb.getConfig()); |
| 162 | final Channel chan = NettyMocks.fakeChannel(); |
| 163 | when(chan.isWritable()).thenReturn(false); |
| 164 | put.execute(tsdb, chan, new String[] { "put", METRIC_STRING, |
| 165 | "1365465600", "42", TAGK_STRING + "=" + TAGV_STRING }) |
| 166 | .joinUninterruptibly(); |
| 167 | validateCounters(1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0); |
| 168 | verify(chan, never()).write(any()); |
| 169 | verify(chan, times(1)).isConnected(); |
| 170 | validateSEH(true); |
| 171 | } |
| 172 | |
| 173 | @Test |
| 174 | public void executeHBaseErrorHandler() throws Exception { |
nothing calls this directly
no test coverage detected