use of com.axibase.tsd.api.model.alert.AlertHistoryQuery in project atsd-api-test by axibase.
the class AlertHistoryQueryTest method testUnknownEntityNotAffectProcessingOthers.
@Issue("2993")
@Test(enabled = false)
public void testUnknownEntityNotAffectProcessingOthers() throws Exception {
AlertHistoryQuery qExist = templateQuery().setEntity("alert-historyquery-entity-1");
AlertHistoryQuery qUnknown = templateQuery().setEntity("UNKNOWN");
List<Alert> resultList = AlertMethod.queryHistory(qExist, qUnknown);
assertEquals("Fail to get alert history by queries with unknown entity", 2, resultList.size());
assertEquals("Unexpected warning message", "ENTITY not found for name: 'unknown'", resultList.get(1).getWarning());
}
use of com.axibase.tsd.api.model.alert.AlertHistoryQuery in project atsd-api-test by axibase.
the class AlertHistoryQueryTest method generateAlertHistory.
@BeforeClass(enabled = false)
public void generateAlertHistory() throws Exception {
Registry.Entity.checkExists(ALERTHISTORY_ENTITY_NAME);
generateAlertForEntity(ALERTHISTORY_ENTITY_NAME);
AlertHistoryQuery query = templateQuery().setEntity(ALERTHISTORY_ENTITY_NAME).setLimit(1);
Checker.check(new AlertHistorySizeQueryCheck(query, 1));
}
use of com.axibase.tsd.api.model.alert.AlertHistoryQuery in project atsd-api-test by axibase.
the class AlertHistoryQueryTest method templateQuery.
private AlertHistoryQuery templateQuery() {
AlertHistoryQuery query = new AlertHistoryQuery();
query.setStartDate(MIN_QUERYABLE_DATE);
query.setEndDate(MAX_QUERYABLE_DATE);
query.setMetric(RULE_METRIC_NAME);
return query;
}
Aggregations