MCPcopy Create free account
hub / github.com/OpenTSDB/opentsdb / ctorDuplicate

Method ctorDuplicate

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

Source from the content-addressed store, hash-verified

105 }
106
107 @Test
108 public void ctorDuplicate() throws Exception {
109 QueryStats.setEnableDuplicates(false);
110 final TSQuery query = new TSQuery();
111 query.setStart("1h-ago");
112 final QueryStats stats = new QueryStats(remote, query, headers);
113 assertNotNull(stats);
114 final Map<String, Object> map = QueryStats.getRunningAndCompleteStats();
115 assertNotNull(map);
116 assertEquals(1, ((List<Object>)map.get("running")).size());
117 assertEquals(0, ((Collection<QueryStats>)map.get("completed")).size());
118 try {
119 new QueryStats(remote, query, headers);
120 fail("Expected a QueryException");
121 } catch (QueryException e) { }
122 QueryStats.setEnableDuplicates(true);
123 }
124
125 @Test (expected = IllegalArgumentException.class)
126 public void ctorNullRemote() throws Exception {

Callers

nothing calls this directly

Calls 5

setEnableDuplicatesMethod · 0.95
setStartMethod · 0.95
sizeMethod · 0.65
getMethod · 0.45

Tested by

no test coverage detected