()
| 203 | } |
| 204 | |
| 205 | @Test |
| 206 | public void executePleaseThrottleNotWriteable() throws Exception { |
| 207 | when(client.put(any(PutRequest.class))) |
| 208 | .thenReturn(Deferred.fromError(mock(PleaseThrottleException.class))); |
| 209 | final PutDataPointRpc put = new PutDataPointRpc(tsdb.getConfig()); |
| 210 | final Channel chan = NettyMocks.fakeChannel(); |
| 211 | when(chan.isWritable()).thenReturn(false); |
| 212 | put.execute(tsdb, chan, new String[] { "put", METRIC_STRING, |
| 213 | "1365465600", "42", TAGK_STRING + "=" + TAGV_STRING }) |
| 214 | .joinUninterruptibly(); |
| 215 | validateCounters(1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0); |
| 216 | verify(chan, never()).write(any()); |
| 217 | verify(chan, times(1)).isConnected(); |
| 218 | validateSEH(true); |
| 219 | } |
| 220 | |
| 221 | @Test |
| 222 | public void executePleaseThrottleHandler() throws Exception { |
nothing calls this directly
no test coverage detected