use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class SeriesInsertTest method testTimeRangeMaxInISOSaved.
@Issue("2957")
@Test
public void testTimeRangeMaxInISOSaved() throws Exception {
final BigDecimal v = new BigDecimal("" + getUnixTime(MAX_STORABLE_DATE));
Series series = new Series("e-time-range-6", "m-time-range-6");
series.addSamples(Sample.ofDateDecimal(MAX_STORABLE_DATE, v));
insertSeriesCheck(Collections.singletonList(series));
SeriesQuery seriesQuery = new SeriesQuery(series.getEntity(), series.getMetric(), MAX_STORABLE_DATE, NEXT_AFTER_MAX_STORABLE_DATE);
List<Sample> data = querySeriesAsList(seriesQuery).get(0).getData();
assertNotSame("Empty data in response", 0, data.size());
assertEquals(v, data.get(0).getValue());
}
use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class SeriesInsertTest method testUrlNotFoundOptionsRequest3.
@Issue("2927")
@Test
public void testUrlNotFoundOptionsRequest3() throws Exception {
Response response = executeApiRequest(webTarget -> webTarget.path("404").queryParam("not", "exist").request().options());
response.bufferEntity();
assertEquals("Nonexistent url with /api/v1 options doesn't return 200", OK.getStatusCode(), response.getStatus());
}
use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class SeriesInsertTest method testUrlNotFoundOptionsRequest0.
@Issue("2927")
@Test
public void testUrlNotFoundOptionsRequest0() throws Exception {
Response response = executeApiRequest(webTarget -> webTarget.path("*").request().options());
response.bufferEntity();
assertEquals("Nonexistent url with /api/v1 options doesn't return 200", OK.getStatusCode(), response.getStatus());
}
use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class SeriesInsertTest method testXTextFieldVersioned.
@Issue("3740")
@Test
public void testXTextFieldVersioned() throws Exception {
String entityName = "e-text-versioning-2";
String metricName = "m-text-versioning-2";
Series series = new Series(entityName, metricName);
Metric metric = new Metric(metricName);
metric.setVersioned(true);
MetricMethod.createOrReplaceMetricCheck(metric);
String[] data = new String[] { "1", "2", "3", "4" };
for (String x : data) {
Sample sample = Sample.ofDateIntegerText("2016-10-11T13:00:00.000Z", 1, x);
series.setSamples(Collections.singleton(sample));
insertSeriesCheck(Collections.singletonList(series));
}
SeriesQuery seriesQueryVersioned = new SeriesQuery(series);
seriesQueryVersioned.setVersioned(true);
seriesQueryVersioned.setExactMatch(false);
List<Series> seriesListVersioned = querySeriesAsList(seriesQueryVersioned);
List<String> textValuesVersioned = new ArrayList<>();
for (Sample s : seriesListVersioned.get(0).getData()) {
textValuesVersioned.add(s.getText());
}
assertEquals("Text field versioning is corrupted", Arrays.asList(data), textValuesVersioned);
}
use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class SeriesInsertTest method testXTextField.
@Issue("3480")
@Test(dataProvider = "dataTextProvider")
public void testXTextField(String text) throws Exception {
String entityName = entity();
String metricName = metric();
Series series = new Series(entityName, metricName);
Sample sample = Sample.ofDateIntegerText("2016-10-11T13:00:00.000Z", 1, text);
series.addSamples(sample);
insertSeriesCheck(Collections.singletonList(series));
SeriesQuery seriesQuery = new SeriesQuery(series);
List<Series> seriesList = querySeriesAsList(seriesQuery);
assertEquals("Stored series are incorrect", Collections.singletonList(series), seriesList);
}
Aggregations