use of net.opentsdb.uid.NoSuchUniqueId in project opentsdb by OpenTSDB.
the class TestHttpJsonSerializer method formatQueryAsyncV1NoSuchTagId.
@Test(expected = DeferredGroupException.class)
public void formatQueryAsyncV1NoSuchTagId() throws Exception {
setupFormatQuery();
HttpQuery query = NettyMocks.getQuery(tsdb, "");
HttpJsonSerializer serdes = new HttpJsonSerializer(query);
final TSQuery data_query = getTestQuery(false);
validateTestQuery(data_query);
final DataPoints dps = new MockDataPoints().getMock();
final List<DataPoints[]> results = new ArrayList<DataPoints[]>(1);
results.add(new DataPoints[] { dps });
when(dps.getTagsAsync()).thenReturn(Deferred.<Map<String, String>>fromError(new NoSuchUniqueId("No such tagv", new byte[] { 0, 0, 1 })));
serdes.formatQueryAsyncV1(data_query, results, Collections.<Annotation>emptyList()).joinUninterruptibly();
}
use of net.opentsdb.uid.NoSuchUniqueId in project opentsdb by OpenTSDB.
the class TestHttpJsonSerializer method formatQueryAsyncV1NoSuchAggTagId.
@Test(expected = DeferredGroupException.class)
public void formatQueryAsyncV1NoSuchAggTagId() throws Exception {
setupFormatQuery();
HttpQuery query = NettyMocks.getQuery(tsdb, "");
HttpJsonSerializer serdes = new HttpJsonSerializer(query);
final TSQuery data_query = getTestQuery(false);
validateTestQuery(data_query);
final DataPoints dps = new MockDataPoints().getMock();
final List<DataPoints[]> results = new ArrayList<DataPoints[]>(1);
results.add(new DataPoints[] { dps });
when(dps.getAggregatedTagsAsync()).thenReturn(Deferred.<List<String>>fromError(new NoSuchUniqueId("No such tagk", new byte[] { 0, 0, 1 })));
serdes.formatQueryAsyncV1(data_query, results, Collections.<Annotation>emptyList()).joinUninterruptibly();
}
Aggregations