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

Method markComplete

test/stats/TestQueryStats.java:212–225  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

210 }
211
212 @Test
213 public void markComplete() throws Exception {
214 final TSQuery query = new TSQuery();
215 query.setStart("1h-ago");
216 final QueryStats stats = new QueryStats(remote, query, headers);
217 stats.markSerializationSuccessful();
218 final Map<String, Object> map = QueryStats.getRunningAndCompleteStats();
219 assertNotNull(map);
220 assertEquals(0, ((List<Object>)map.get("running")).size());
221 assertEquals(1, ((Collection<QueryStats>)map.get("completed")).size());
222 final QueryStats completed = ((Collection<QueryStats>)map.get("completed"))
223 .iterator().next();
224 assertEquals(200, completed.getHttpResponse().getCode());
225 }
226
227 @Test
228 public void markCompleteTimeout() throws Exception {

Callers

nothing calls this directly

Calls 8

setStartMethod · 0.95
getHttpResponseMethod · 0.95
sizeMethod · 0.65
nextMethod · 0.65
iteratorMethod · 0.65
getMethod · 0.45

Tested by

no test coverage detected