use of io.confluent.ksql.tools.migrations.MigrationException in project ksql by confluentinc.
the class CommandParserTest method shouldThrowOnExplainStatement.
@Test
public void shouldThrowOnExplainStatement() {
// When:
final MigrationException e = assertThrows(MigrationException.class, () -> parse("explain my_query_id;"));
// Then:
assertThat(e.getMessage(), is("'EXPLAIN' statements are not supported."));
}
use of io.confluent.ksql.tools.migrations.MigrationException in project ksql by confluentinc.
the class CommandParserTest method shouldThrowOnSelectStatement.
@Test
public void shouldThrowOnSelectStatement() {
// When:
final MigrationException e = assertThrows(MigrationException.class, () -> parse("select * from my_stream emit changes;"));
// Then:
assertThat(e.getMessage(), is("'SELECT' statements are not supported."));
}
use of io.confluent.ksql.tools.migrations.MigrationException in project ksql by confluentinc.
the class CommandParserTest method shouldThrowOnListStatement.
@Test
public void shouldThrowOnListStatement() {
// When:
final MigrationException e = assertThrows(MigrationException.class, () -> parse("list queries;"));
// Then:
assertThat(e.getMessage(), is("'LIST' statements are not supported."));
}
use of io.confluent.ksql.tools.migrations.MigrationException in project ksql by confluentinc.
the class CommandParserTest method shouldThrowOnPrintStatement.
@Test
public void shouldThrowOnPrintStatement() {
// When:
final MigrationException e = assertThrows(MigrationException.class, () -> parse("print 'my_topic';"));
// Then:
assertThat(e.getMessage(), is("'PRINT' statements are not supported."));
}
use of io.confluent.ksql.tools.migrations.MigrationException in project ksql by confluentinc.
the class CommandParserTest method shouldThrowOnMalformedQuote.
@Test
public void shouldThrowOnMalformedQuote() {
// When:
final MigrationException e = assertThrows(MigrationException.class, () -> CommandParser.splitSql("select 'unclosed quote;"));
// Then:
assertThat(e.getMessage(), is("Invalid sql - failed to find closing token '''"));
}
Aggregations