MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / executeHBaseErrorNotWriteable

Method executeHBaseErrorNotWriteable

test/tsd/TestPutRpc.java:156–171  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 7

fakeChannelMethod · 0.95
executeMethod · 0.95
putMethod · 0.80
getConfigMethod · 0.45
validateCountersMethod · 0.45
writeMethod · 0.45
validateSEHMethod · 0.45

Tested by

no test coverage detected