()
| 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 { |
nothing calls this directly
no test coverage detected