Search in sources :

Example 1 with Issue

use of io.qameta.allure.Issue in project atsd-api-test by axibase.

the class CSVUploadTest method testGzCsvBinaryUpload.

@Issue("2919")
@Test
public void testGzCsvBinaryUpload(Method method) throws Exception {
    String entityName = ENTITY_PREFIX + "-8";
    String metricName = METRIC_PREFIX + "-8";
    File csvPath = resolvePath(Paths.get(RESOURCE_DIR, "test-csv-binary.gz").toString());
    checkBinaryFileUpload(entityName, metricName, csvPath);
}
Also used : File(java.io.File) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 2 with Issue

use of io.qameta.allure.Issue in project atsd-api-test by axibase.

the class CSVUploadTest method testTimeRangeInMS.

@Issue("2957")
@Test
public void testTimeRangeInMS(Method method) throws Exception {
    Entity entity = new Entity("e-csv-simple-parser-ms-1");
    Metric metric = new Metric("m-csv-simple-parser-ms-1");
    File csvPath = resolvePath(Paths.get(RESOURCE_DIR, "test-time-range-ms.csv").toString());
    Response response = binaryCsvUpload(csvPath, SIMPLE_PARSER_MS);
    assertEquals("Failed to upload file", OK.getStatusCode(), response.getStatus());
    SeriesQuery seriesQuery = new SeriesQuery(entity.getName(), metric.getName(), MIN_QUERYABLE_DATE, MAX_QUERYABLE_DATE);
    assertSeriesQueryDataSize(seriesQuery, 2);
    List<Series> seriesList = SeriesMethod.querySeriesAsList(seriesQuery);
    Series series = seriesList.get(0);
    assertEquals("Managed to insert dataset with date out of range", 2, series.getData().size());
    assertEquals("Min storable date failed to save", MIN_STORABLE_DATE, series.getData().get(0).getRawDate());
    assertEquals("Incorrect stored value", "12.45", series.getData().get(0).getValue().toString());
    assertEquals("Max storable date failed to save", MAX_STORABLE_DATE, series.getData().get(1).getRawDate());
    assertEquals("Incorrect stored value", "10.8", series.getData().get(1).getValue().toString());
}
Also used : Response(javax.ws.rs.core.Response) Entity(com.axibase.tsd.api.model.entity.Entity) Series(com.axibase.tsd.api.model.series.Series) SeriesQuery(com.axibase.tsd.api.model.series.query.SeriesQuery) Metric(com.axibase.tsd.api.model.metric.Metric) File(java.io.File) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 3 with Issue

use of io.qameta.allure.Issue in project atsd-api-test by axibase.

the class CSVUploadTest method testPlainCsvMultipartUpload.

@Issue("2916")
@Test
public void testPlainCsvMultipartUpload(Method method) throws Exception {
    String entityName = ENTITY_PREFIX + "-1";
    String metricName = METRIC_PREFIX + "-1";
    File csvPath = resolvePath(Paths.get(RESOURCE_DIR, "test-csv-multipart.csv").toString());
    checkMultipartFileUpload(entityName, metricName, csvPath);
}
Also used : File(java.io.File) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 4 with Issue

use of io.qameta.allure.Issue in project atsd-api-test by axibase.

the class CSVUploadTest method testPlainCsvBinaryUpload.

@Issue("2916")
@Test
public void testPlainCsvBinaryUpload(Method method) throws Exception {
    String entityName = ENTITY_PREFIX + "-2";
    String metricName = METRIC_PREFIX + "-2";
    File csvPath = resolvePath(Paths.get(RESOURCE_DIR, "test-csv-binary.csv").toString());
    checkBinaryFileUpload(entityName, metricName, csvPath);
}
Also used : File(java.io.File) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 5 with Issue

use of io.qameta.allure.Issue in project atsd-api-test by axibase.

the class EntityCommandTest method testIncorrectEnabled.

@Issue("3550")
@Test(dataProvider = "incorrectEnabledProvider")
public void testIncorrectEnabled(String enabled) throws Exception {
    String entityName = entity();
    String command = String.format("entity  e:%s b:%s", entityName, enabled);
    CommandMethod.send(command);
    Response serverResponse = EntityMethod.getEntityResponse(entityName);
    assertEquals("Bad entity was accepted :: " + command, NOT_FOUND.getStatusCode(), serverResponse.getStatus());
}
Also used : Response(javax.ws.rs.core.Response) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Aggregations

Issue (io.qameta.allure.Issue)858 Test (org.testng.annotations.Test)857 SqlTest (com.axibase.tsd.api.method.sql.SqlTest)377 StringTable (com.axibase.tsd.api.model.sql.StringTable)270 Response (javax.ws.rs.core.Response)234 List (java.util.List)166 SeriesQuery (com.axibase.tsd.api.model.series.query.SeriesQuery)145 Series (com.axibase.tsd.api.model.series.Series)88 Property (com.axibase.tsd.api.model.property.Property)84 BigDecimal (java.math.BigDecimal)53 Metric (com.axibase.tsd.api.model.metric.Metric)50 Period (com.axibase.tsd.api.model.Period)47 PropertyQuery (com.axibase.tsd.api.model.property.PropertyQuery)44 Entity (com.axibase.tsd.api.model.entity.Entity)43 ArrayList (java.util.ArrayList)37 Message (com.axibase.tsd.api.model.message.Message)32 PlainCommand (com.axibase.tsd.api.model.command.PlainCommand)31 HashMap (java.util.HashMap)30 EntityGroup (com.axibase.tsd.api.model.entitygroup.EntityGroup)29 Aggregate (com.axibase.tsd.api.model.series.query.transformation.aggregate.Aggregate)29