use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class CastTest method testImplicitCastInMathExpressionsRizesError.
@Issue("4020")
@Test
public void testImplicitCastInMathExpressionsRizesError() throws Exception {
Series series = Mocks.series();
SeriesMethod.insertSeriesCheck(series);
String sql = String.format("SELECT CONCAT(value, '')+10%n" + "FROM \"%s\"", series.getMetric());
assertBadRequest("Math expression with string variable applied", "Invalid expression: 'concat(value, '') + 10'", queryResponse(sql));
}
use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class IsNullTest method testIsNullInExpression.
@Issue("3844")
@Test
public void testIsNullInExpression() throws Exception {
String sqlQuery = String.format("SELECT ROUND(100 - ISNULL(value, 0)) FROM \"%s\"", TEST_METRIC);
StringTable resultTable = queryResponse(sqlQuery).readEntity(StringTable.class);
String[][] expectedRows = { { "-23.0" } };
assertTableRowsExist(expectedRows, resultTable);
}
use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class IsNullTest method testTypePreserved.
@Issue("3675")
@Test(dataProvider = "typeCheckTestProvider")
public void testTypePreserved(String from, String to, String type) throws Exception {
String sqlQuery = String.format("SELECT ISNULL(%s, %s) FROM \"m-test-type-preserve-1\"", from, to);
StringTable table = queryTable(sqlQuery, 1);
assertEquals("wrong ISNULL result data type", type, table.getColumnMetaData(0).getDataType());
}
use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class MetaDataTest method testMetaEmptyExistentTagsExpansion.
@Issue("4363")
@Issue("4374")
@Test
public void testMetaEmptyExistentTagsExpansion() throws Exception {
Metric existentMetric = new Metric(Mocks.metric());
MetricMethod.createOrReplaceMetricCheck(existentMetric);
String sqlQuery = String.format("SELECT tags.* FROM \"%s\"", NON_EXISTENT_METRIC_1);
String[] expectedNames = {};
String[] expectedTypes = {};
assertSqlMetaNamesAndTypes("Wrong /api/sql/meta tags expansion for existent metric", expectedNames, expectedTypes, sqlQuery);
}
use of io.qameta.allure.Issue in project atsd-api-test by axibase.
the class LikeOperatorTest method testMultipleLikeMetricOperatorsAnd.
@Issue("4083")
@Test
public void testMultipleLikeMetricOperatorsAnd() {
String sqlQuery = String.format("SELECT metric " + "FROM atsd_series " + "WHERE metric LIKE '%1$s-first-__' AND metric LIKE '%1$s-first-2%%'" + "ORDER BY metric ", TEST_METRIC_PREFIX);
StringTable table = SqlMethod.queryTable(sqlQuery);
assertTableContainsColumnValues(TEST_METRICS.subList(20, 30), table, "metric");
}
Aggregations