Search in sources :

Example 16 with KsqlRestClientException

use of io.confluent.ksql.rest.client.exception.KsqlRestClientException in project ksql by confluentinc.

the class RemoteServerSpecificCommandTest method shouldThrowIfRestClientThrowsOnSet.

@Test(expected = KsqlRestClientException.class)
public void shouldThrowIfRestClientThrowsOnSet() {
    // Given:
    doThrow(new KsqlRestClientException("Boom")).when(restClient).setServerAddress("localhost:8088");
    // When:
    command.execute(ImmutableList.of("localhost:8088"), terminal);
}
Also used : KsqlRestClientException(io.confluent.ksql.rest.client.exception.KsqlRestClientException) Test(org.junit.Test)

Aggregations

KsqlRestClientException (io.confluent.ksql.rest.client.exception.KsqlRestClientException)16 Test (org.junit.Test)12 IOException (java.io.IOException)4 IntegrationTest (io.confluent.common.utils.IntegrationTest)3 KsqlRestClient (io.confluent.ksql.rest.client.KsqlRestClient)3 KsqlEngine (io.confluent.ksql.engine.KsqlEngine)2 ListQueries (io.confluent.ksql.parser.tree.ListQueries)2 ConfiguredStatement (io.confluent.ksql.statement.ConfiguredStatement)2 PersistentQueryMetadata (io.confluent.ksql.util.PersistentQueryMetadata)2 URI (java.net.URI)2 KsqlErrorMessage (io.confluent.ksql.rest.entity.KsqlErrorMessage)1 KsqlHostInfoEntity (io.confluent.ksql.rest.entity.KsqlHostInfoEntity)1 Queries (io.confluent.ksql.rest.entity.Queries)1 QueryDescriptionList (io.confluent.ksql.rest.entity.QueryDescriptionList)1 ServerInfo (io.confluent.ksql.rest.entity.ServerInfo)1 DiscoverRemoteHostsUtil (io.confluent.ksql.rest.util.DiscoverRemoteHostsUtil)1 KsqlQueryStatus (io.confluent.ksql.util.KsqlConstants.KsqlQueryStatus)1 Context (io.vertx.core.Context)1 VertxException (io.vertx.core.VertxException)1 JksOptions (io.vertx.core.net.JksOptions)1