Search in sources :

Example 16 with Type

use of io.confluent.ksql.query.QueryError.Type in project ksql by confluentinc.

the class MissingTopicClassifierTest method shouldClassifyNoMissingTopicAsUnknownError.

@Test
public void shouldClassifyNoMissingTopicAsUnknownError() {
    // Given:
    final Exception e = new Exception("foo");
    // When:
    final Type type = new MissingTopicClassifier("").classify(e);
    // Then:
    assertThat(type, is(Type.UNKNOWN));
}
Also used : Type(io.confluent.ksql.query.QueryError.Type) MissingSourceTopicException(org.apache.kafka.streams.errors.MissingSourceTopicException) Test(org.junit.Test)

Example 17 with Type

use of io.confluent.ksql.query.QueryError.Type in project ksql by confluentinc.

the class MissingTopicClassifierTest method shouldClassifyMissingTopicAsUserError.

@Test
public void shouldClassifyMissingTopicAsUserError() {
    // Given:
    final Exception e = new MissingSourceTopicException("foo");
    // When:
    final Type type = new MissingTopicClassifier("").classify(e);
    // Then:
    assertThat(type, is(Type.USER));
}
Also used : Type(io.confluent.ksql.query.QueryError.Type) MissingSourceTopicException(org.apache.kafka.streams.errors.MissingSourceTopicException) MissingSourceTopicException(org.apache.kafka.streams.errors.MissingSourceTopicException) Test(org.junit.Test)

Aggregations

Type (io.confluent.ksql.query.QueryError.Type)17 Test (org.junit.Test)17 AuthorizationException (org.apache.kafka.common.errors.AuthorizationException)4 TopicAuthorizationException (org.apache.kafka.common.errors.TopicAuthorizationException)4 TransactionalIdAuthorizationException (org.apache.kafka.common.errors.TransactionalIdAuthorizationException)4 StreamsException (org.apache.kafka.streams.errors.StreamsException)4 MissingSourceTopicException (org.apache.kafka.streams.errors.MissingSourceTopicException)2