use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class SeriesInsertTest method testTimeRangeMaxInISOOverflow.
@Issue("2957")
@Test
public void testTimeRangeMaxInISOOverflow() throws Exception {
final BigDecimal v = new BigDecimal("" + getUnixTime(NEXT_AFTER_MAX_STORABLE_DATE));
Series series = new Series("e-time-range-8", "m-time-range-8");
series.addSamples(Sample.ofDateDecimal(NEXT_AFTER_MAX_STORABLE_DATE, v));
assertEquals("Managed to insert series with d out of range", BAD_REQUEST.getStatusCode(), insertSeries(Collections.singletonList(series)).getStatus());
SeriesQuery seriesQuery = new SeriesQuery(series.getEntity(), series.getMetric(), NEXT_AFTER_MAX_STORABLE_DATE, addOneMS(NEXT_AFTER_MAX_STORABLE_DATE));
List<Series> seriesList = querySeriesAsList(seriesQuery);
assertEquals("Managed to insert series with d out of range", 0, seriesList.get(0).getData().size());
}
use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class SeriesInsertTest method testMillisecondsUnsupported.
@Issue("2850")
@Test
public void testMillisecondsUnsupported() throws Exception {
String entityName = "e-iso-13";
String metricName = "m-iso-13";
Series series = new Series(entityName, metricName);
series.addSamples(Sample.ofRawDateInteger(Mocks.MILLS_TIME.toString(), 0));
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, "-", "5"));
}
use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class SeriesInsertTest method testEmptyTagValueRaisesError.
@Issue("3164")
@Test
public void testEmptyTagValueRaisesError() throws Exception {
Series series = new Series("e-empty-tag-1", "m-empty-tag-1");
series.addSamples(Sample.ofDateInteger(ISO_TIME, 1));
String emptyTagName = "empty-tag";
series.addTag(emptyTagName, "");
Response response = insertSeries(Collections.singletonList(series));
String errorMessage = extractErrorMessage(response);
assertEquals("Incorrect response status code", BAD_REQUEST.getStatusCode(), response.getStatus());
assertEquals("Incorrect error message", String.format(EMPTY_TAG, emptyTagName), errorMessage);
}
use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class SeriesInsertTest method testXTextFieldPreservedFromTagsModifications.
@Issue("3480")
@Test
public void testXTextFieldPreservedFromTagsModifications() throws Exception {
String entityName = "e-text-modify-tags-1";
String metricName = "m-text-modify-tags-1";
Series series = new Series(entityName, metricName);
String xText = "text";
Sample sample = Sample.ofDateIntegerText("2016-10-11T13:00:00.000Z", 1, xText);
series.addSamples(sample);
insertSeriesCheck(Collections.singletonList(series));
series.addTag("foo", "foo");
SeriesQuery seriesQuery = new SeriesQuery(series);
insertSeriesCheck(Collections.singletonList(series));
List<Series> seriesList = querySeriesAsList(seriesQuery);
assertEquals("Stored series are incorrect", Collections.singletonList(series), seriesList);
assertEquals("Tag was not modified", "foo", seriesList.get(0).getTags().get("foo"));
}
use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class SeriesInsertTest method testTimeRangeMinInMSSaved.
@Issue("2957")
@Test
public void testTimeRangeMinInMSSaved() throws Exception {
Long time = 0L;
Long endTime = 1L;
Series series = new Series("e-time-range-1", "m-time-range-1");
series.addSamples(Sample.ofDateInteger(Util.ISOFormat(time), 0));
insertSeriesCheck(Collections.singletonList(series));
SeriesQuery seriesQuery = new SeriesQuery(series.getEntity(), series.getMetric(), time, endTime);
List<Series> seriesList = querySeriesAsList(seriesQuery);
assertEquals(new BigDecimal("0"), seriesList.get(0).getData().get(0).getValue());
}
Aggregations