use of com.axibase.tsd.api.model.property.PropertyQuery in project atsd-api-test by axibase.
the class PropertyQueryTimezoneTest method testXXTimezoneUnsupported.
@Issue("2850")
@Test
public void testXXTimezoneUnsupported() throws Exception {
PropertyQuery propertyQuery = buildPropertyQuery();
propertyQuery.setStartDate("2016-07-20T22:50:00-0110");
Response response = queryProperty(propertyQuery);
assertEquals("Incorrect response status code", BAD_REQUEST.getStatusCode(), response.getStatus());
assertEquals("Error message mismatch", String.format(DATE_FILTER_WRONG_SYNTAX_TPL, "startDate", "2016-07-20T22:50:00-0110"), extractErrorMessage(response));
}
use of com.axibase.tsd.api.model.property.PropertyQuery in project atsd-api-test by axibase.
the class PropertyInsertTest method testISOTimezoneMinusHourMinute.
@Issue("2850")
@Test
public void testISOTimezoneMinusHourMinute() throws Exception {
String entityName = "property-insert-test-iso-hm";
Property property = new Property("test3", entityName);
property.addTag("test", "test");
property.setDate("2016-07-20T22:37:00-01:23");
insertProperty(property);
PropertyQuery propertyQuery = new PropertyQuery();
propertyQuery.setType(property.getType());
propertyQuery.setEntity(entityName);
propertyQuery.setStartDate("2016-07-21T00:00:00.000Z");
propertyQuery.setInterval(new Period(1, TimeUnit.MILLISECOND));
List<Property> storedPropertyList = queryProperty(propertyQuery).readEntity(new GenericType<List<Property>>() {
});
Property storedProperty = storedPropertyList.get(0);
assertEquals("Incorrect property entity", property.getEntity(), storedProperty.getEntity());
assertEquals("Incorrect property tags", property.getTags(), storedProperty.getTags());
assertEquals("Incorrect property date", propertyQuery.getStartDate(), storedProperty.getDate());
}
use of com.axibase.tsd.api.model.property.PropertyQuery in project atsd-api-test by axibase.
the class PropertyInsertTest method testISOTimezonePlusHourMinute.
@Issue("2850")
@Test
public void testISOTimezonePlusHourMinute() throws Exception {
String entityName = "property-insert-test-iso+hm";
Property property = new Property("test2", entityName);
property.addTag("test", "test");
property.setDate("2016-07-21T01:23:00+01:23");
insertProperty(property);
PropertyQuery propertyQuery = new PropertyQuery();
propertyQuery.setType(property.getType());
propertyQuery.setEntity(entityName);
propertyQuery.setStartDate("2016-07-21T00:00:00.000Z");
propertyQuery.setInterval(new Period(1, TimeUnit.MILLISECOND));
List<Property> storedPropertyList = queryProperty(propertyQuery).readEntity(new GenericType<List<Property>>() {
});
Property storedProperty = storedPropertyList.get(0);
assertEquals("Incorrect property entity", property.getEntity(), storedProperty.getEntity());
assertEquals("Incorrect property tags", property.getTags(), storedProperty.getTags());
assertEquals("Incorrect property date", propertyQuery.getStartDate(), storedProperty.getDate());
}
use of com.axibase.tsd.api.model.property.PropertyQuery in project atsd-api-test by axibase.
the class PropertyQueryTest method testKeyTagExpressionUpperTag.
@Issue("2908")
@Test
public void testKeyTagExpressionUpperTag() throws Exception {
final Property property = new Property("query-type53", "query-entity53");
property.addTag("t1", "tv1");
insertPropertyCheck(property);
PropertyQuery query = prepareSimplePropertyQuery(property.getType(), property.getEntity());
query.setKeyTagExpression("upper(tags.t1) == 'TV1'");
assertInsertedPropertyReturned(property, query);
}
use of com.axibase.tsd.api.model.property.PropertyQuery in project atsd-api-test by axibase.
the class PropertyQueryTest method testKeyValueSpaces.
@Issue("2416")
@Test
public void testKeyValueSpaces() throws Exception {
final Property property = new Property("query-type-65", "query-entity65");
property.addTag("t1", "v1");
insertPropertyCheck(property);
PropertyQuery query = prepareSimplePropertyQuery(property.getType(), property.getEntity());
query.addKey("k1", " ");
assertStoredPropertyDoesNotMatchToInserted(property, query);
}
Aggregations