use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class SeriesInsertTest method testUrlNotFoundGetRequest1.
@Issue("2927")
@Test
public void testUrlNotFoundGetRequest1() throws Exception {
Response response = executeApiRequest(webTarget -> webTarget.path("query").request().get());
response.bufferEntity();
assertEquals("Nonexistent url with /api/v1 get doesn't return 404", NOT_FOUND.getStatusCode(), response.getStatus());
}
use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class SeriesInsertTest method testLocalTimeUnsupported.
@Issue("2850")
@Test
public void testLocalTimeUnsupported() throws Exception {
String entityName = "e-iso-11";
String metricName = "m-iso-11";
String value = "0";
Series series = new Series(entityName, metricName);
Sample sample = Sample.ofRawDateInteger("2016-06-09 20:00:00", 0);
series.addSamples(sample);
Response response = insertSeries(Collections.singletonList(series));
assertEquals("Incorrect response status code", BAD_REQUEST.getStatusCode(), response.getStatus());
assertErrorMessageStart(extractErrorMessage(response), String.format(JSON_MAPPING_EXCEPTION_UNEXPECTED_CHARACTER, "T", " "));
}
use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class SeriesInsertTest method testPrecisionAfterCompaction.
@Issue("2871")
@Test(dataProvider = "afterCompactionDataProvider")
public void testPrecisionAfterCompaction(DataType type, BigDecimal valueBefore) throws Exception {
Metric metric = new Metric(metric());
metric.setDataType(type);
Long time = MILLS_TIME;
Series series = new Series(entity(), metric.getName());
series.addSamples(Sample.ofDateDecimal(Util.ISOFormat(time), valueBefore));
MetricMethod.createOrReplaceMetricCheck(metric);
SeriesMethod.insertSeriesCheck(series);
CompactionMethod.performCompaction();
SeriesQuery seriesQuery = new SeriesQuery(series.getEntity(), series.getMetric(), time, time + 1);
List<Series> seriesList = querySeriesAsList(seriesQuery);
BigDecimal actualValue = seriesList.get(0).getData().get(0).getValue();
String assertMessage = String.format("Stored value precision incorrect.%n Expected: %s%nActual: %s%n", valueBefore, actualValue);
assertTrue(assertMessage, valueBefore.compareTo(actualValue) == 0);
}
use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class SeriesInsertTest method testUrlNotFoundGetRequest3.
@Issue("2927")
@Test
public void testUrlNotFoundGetRequest3() throws Exception {
Response response = executeApiRequest(webTarget -> webTarget.path("404").queryParam("not", "exist").request().get());
response.bufferEntity();
assertEquals("Nonexistent url with /api/v1 get doesn't return 404", NOT_FOUND.getStatusCode(), response.getStatus());
}
use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class SeriesInsertTest method testISOFormatsZmsAbsent.
@Issue("2009")
@Test
public void testISOFormatsZmsAbsent() throws Exception {
String entityName = "e-iso-1";
String metricName = "m-iso-1";
BigDecimal value = new BigDecimal(0);
String storedDate = "2016-06-09T17:08:09.000Z";
Series series = new Series(entityName, metricName);
String d = "2016-06-09T17:08:09Z";
series.addSamples(Sample.ofDateDecimal(d, value));
assertEquals("Failed to insert series", OK.getStatusCode(), insertSeries(Collections.singletonList(series)).getStatus());
SeriesQuery seriesQuery = new SeriesQuery(series.getEntity(), series.getMetric(), d, "2016-06-09T17:08:09.001Z");
assertSeriesQueryDataSize(seriesQuery, 1);
List<Series> seriesList = querySeriesAsList(seriesQuery);
assertEquals("Stored date incorrect", storedDate, seriesList.get(0).getData().get(0).getRawDate());
assertEquals("Stored value incorrect", value, seriesList.get(0).getData().get(0).getValue());
}
Aggregations