Search in sources :

Example 76 with Issue

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

the class CSVUploadTest method testMetaFileInTarGz.

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

Example 77 with Issue

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

the class CSVUploadTest method testFileWithLineBreak.

@Issue("3011")
@Test(dataProvider = "parserProvider")
public void testFileWithLineBreak(Method method, int numTest, String lineBreakType, String parser, Integer dataSize) throws Exception {
    String nameSuffix = String.format("-%s-parser-ms-%d", lineBreakType, numTest);
    Entity entity = new Entity("e" + nameSuffix);
    Metric metric = new Metric("m" + nameSuffix);
    String confFileName = String.format("test-%s-parser.csv", lineBreakType);
    File csvPath = resolvePath(Paths.get(RESOURCE_DIR, confFileName).toString());
    Response response = binaryCsvUpload(csvPath, parser, entity.getName());
    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, dataSize);
    Sample sample = SeriesMethod.querySeriesAsList(seriesQuery).get(0).getData().get(0);
    Calendar serverCalendar = new GregorianCalendar(TimeZone.getTimeZone(timezone));
    serverCalendar.clear();
    serverCalendar.set(2015, Calendar.MARCH, 24, 6, 17);
    assertEquals("Incorrect stored value", LINE_BREAKS_TEST_VALUE, sample.getValue().toString());
    assertEquals("Date failed to save", serverCalendar.getTime(), parseDate(sample.getRawDate()));
}
Also used : Response(javax.ws.rs.core.Response) Entity(com.axibase.tsd.api.model.entity.Entity) SeriesQuery(com.axibase.tsd.api.model.series.query.SeriesQuery) Sample(com.axibase.tsd.api.model.series.Sample) Metric(com.axibase.tsd.api.model.metric.Metric) File(java.io.File) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 78 with Issue

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

the class CSVUploadTest method testGzCsvMultipartUpload.

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

Example 79 with Issue

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

the class CSVUploadTest method testTarGzCsvMultipartUpload.

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

Example 80 with Issue

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

the class CSVUploadTest method testTarGzCsvBinaryUpload.

@Issue("2919")
@Test
public void testTarGzCsvBinaryUpload(Method method) throws Exception {
    String entityName = ENTITY_PREFIX + "-4";
    String metricName = METRIC_PREFIX + "-4";
    File csvPath = resolvePath(Paths.get(RESOURCE_DIR, "test-csv-binary.tar.gz").toString());
    checkBinaryFileUpload(entityName, metricName, csvPath);
}
Also used : File(java.io.File) 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