Search in sources :

Example 1 with HttpClient

use of io.airlift.http.client.HttpClient in project presto by prestodb.

the class TestProgressMonitor method createConnection.

private Connection createConnection() throws SQLException {
    HttpClient client = new TestingHttpClient(new TestingHttpClientProcessor(RESPONSES));
    QueryExecutor testQueryExecutor = QueryExecutor.create(client);
    String uri = format("prestotest://%s", SERVER_ADDRESS);
    return new PrestoConnection(new PrestoDriverUri(uri), "test", testQueryExecutor);
}
Also used : HttpClient(io.airlift.http.client.HttpClient) TestingHttpClient(io.airlift.http.client.testing.TestingHttpClient) TestingHttpClient(io.airlift.http.client.testing.TestingHttpClient)

Aggregations

HttpClient (io.airlift.http.client.HttpClient)1 TestingHttpClient (io.airlift.http.client.testing.TestingHttpClient)1