Search in sources :

Example 16 with Issue

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

the class EntityGroupUpdateTest method testNameContainsSlash.

@Issue("1278")
@Test
public void testNameContainsSlash() throws Exception {
    EntityGroup entityGroup = new EntityGroup("urlencodeupdate/entitygroup2");
    assertUrlEncodePathHandledCorrectly(entityGroup);
}
Also used : EntityGroup(com.axibase.tsd.api.model.entitygroup.EntityGroup) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 17 with Issue

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

the class EntityGroupUpdateTest method testNameContainsCyrillic.

@Issue("1278")
@Test
public void testNameContainsCyrillic() throws Exception {
    EntityGroup entityGroup = new EntityGroup("urlencodeupdateйёentitygroup3");
    assertUrlEncodePathHandledCorrectly(entityGroup);
}
Also used : EntityGroup(com.axibase.tsd.api.model.entitygroup.EntityGroup) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 18 with Issue

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

the class MessageQueryStatsTest method testAggregateUnknownRaiseError.

@Issue("2945")
@Test
public void testAggregateUnknownRaiseError() throws Exception {
    MessageStatsQuery statsQuery = prepareSimpleMessageStatsQuery(MESSAGE_STATS_ENTITY);
    statsQuery.setAggregate(new Aggregate(AggregationType.SUM));
    Response response = queryMessageStats(statsQuery);
    assertEquals("Query with unknown aggregate type should fail", BAD_REQUEST.getStatusCode(), response.getStatus());
}
Also used : MessageStatsQuery(com.axibase.tsd.api.model.message.MessageStatsQuery) Response(javax.ws.rs.core.Response) Aggregate(com.axibase.tsd.api.model.series.query.transformation.aggregate.Aggregate) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 19 with Issue

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

the class MessageQueryStatsTest method testAggregateDetail.

@Issue("2945")
@Test(enabled = false)
public void testAggregateDetail() throws Exception {
    MessageStatsQuery statsQuery = prepareSimpleMessageStatsQuery(MESSAGE_STATS_ENTITY);
    statsQuery.setAggregate(new Aggregate(AggregationType.DETAIL));
    List<Series> messageStatsList = queryMessageStatsReturnSeries(statsQuery);
    assertEquals("Response should contain only 1 series", 1, messageStatsList.size());
    List<Sample> samples = messageStatsList.get(0).getData();
    assertEquals("Response should contain only 1 sample", 1, samples.size());
    assertEquals("Message count mismatch", new BigDecimal(DATES.size()), samples.get(0).getValue());
}
Also used : MessageStatsQuery(com.axibase.tsd.api.model.message.MessageStatsQuery) Series(com.axibase.tsd.api.model.series.Series) Sample(com.axibase.tsd.api.model.series.Sample) Aggregate(com.axibase.tsd.api.model.series.query.transformation.aggregate.Aggregate) BigDecimal(java.math.BigDecimal) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 20 with Issue

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

the class MessageSeverityQueryTest method testMinSeverityCaseInsensitive.

@Issue("2917")
@Test(dataProvider = "severities", description = "minSeverity is case insensitive")
public void testMinSeverityCaseInsensitive(Severity severity) throws Exception {
    messageQuery.setMinSeverity(properCase(severity.name()));
    List<Message> messages = queryMessageResponse(messageQuery).readEntity(new GenericType<List<Message>>() {
    });
    Integer minimumSeverity = severity.getNumVal();
    for (Message m : messages) {
        int actualSeverity = valueOf(m.getSeverity()).getNumVal();
        String errMessage = String.format("Received severity (%d) should be greater than minSeverity (%d)", actualSeverity, minimumSeverity);
        assertTrue(errMessage, actualSeverity >= minimumSeverity);
    }
}
Also used : Message(com.axibase.tsd.api.model.message.Message) List(java.util.List) 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