use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class DoubleBackslashCharEscapeTest method testType.
@Issue("2854")
@Test
public void testType() throws Exception {
Property property = new Property("property-command-test\\\\-t7", "property-command-test-e7");
property.setTags(DEFAULT_PROPERTY_TAGS);
property.setDate(getCurrentDate());
PlainCommand command = new PropertyCommand(property);
CommandMethod.send(command);
assertPropertyExisting("Inserted property can not be received", property);
}
use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class LengthTest method testMaxLength.
@Issue("2412")
@Test
public void testMaxLength() throws Exception {
final Property property = new Property(propertyType(), entity());
property.setDate(Mocks.ISO_TIME);
property.setKey(Collections.EMPTY_MAP);
property.addTag("type", property.getType());
PlainCommand command = new PropertyCommand(property);
Integer currentLength = command.compose().length();
for (int i = 0; currentLength < MAX_LENGTH; i++) {
String tagName = "name" + property.getEntity() + i;
String textValue = "sda" + property.getEntity() + i;
String addedTag = String.format(" v:%s=%s", tagName, textValue);
currentLength += addedTag.length();
if (currentLength <= MAX_LENGTH) {
property.addTag(tagName, textValue);
} else {
currentLength -= addedTag.length();
break;
}
}
while (currentLength != MAX_LENGTH) {
property.setType(property.getType().concat("+"));
currentLength++;
}
command = new PropertyCommand(property);
assertEquals("Command length is not maximal", MAX_LENGTH, command.compose().length());
CommandMethod.send(command);
assertPropertyExisting("Inserted property can not be received", property);
}
use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class SeriesInsertTest method testISOFormatsZms.
@Issue("2009")
@Test
public void testISOFormatsZms() throws Exception {
String entityName = "e-iso-2";
String metricName = "m-iso-2";
BigDecimal value = new BigDecimal(0);
String storedDate = "2016-06-09T17:08:09.100Z";
Series series = new Series(entityName, metricName);
String d = "2016-06-09T17:08:09.100Z";
series.addSamples(Sample.ofDateDecimal(d, value));
assertEquals("Failed to insert series", OK.getStatusCode(), insertSeries(Collections.singletonList(series)).getStatus());
assertSeriesExisting(series);
SeriesQuery seriesQuery = new SeriesQuery(series.getEntity(), series.getMetric(), d, "2016-06-09T17:08:09.101Z");
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());
}
use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class SeriesInsertTest method testXXTimezoneUnsupported.
@Issue("2850")
@Test
public void testXXTimezoneUnsupported() throws Exception {
String entityName = "e-iso-12";
String metricName = "m-iso-12";
Series series = new Series(entityName, metricName);
series.addSamples(Sample.ofRawDateInteger("2016-06-09T09:50:00-1010", 0));
Response response = insertSeries(Collections.singletonList(series));
assertEquals("Incorrect response status code", BAD_REQUEST.getStatusCode(), response.getStatus());
assertErrorMessageStart(extractErrorMessage(response), JSON_MAPPING_EXCEPTION_NA);
}
use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class SeriesInsertTest method testUrlNotFoundGetRequest2.
@Issue("2927")
@Test
public void testUrlNotFoundGetRequest2() throws Exception {
Response response = executeApiRequest(webTarget -> webTarget.path("404").request().get());
response.bufferEntity();
assertEquals("Nonexistent url with /api/v1 get doesn't return 404", NOT_FOUND.getStatusCode(), response.getStatus());
}
Aggregations