use of io.prestosql.server.testing.TestingPrestoServer in project hetu-core by openlookeng.
the class DistributedQueryRunner method isConnectionVisibleToAllNodes.
private boolean isConnectionVisibleToAllNodes(CatalogName catalogName) {
for (TestingPrestoServer server : servers) {
server.refreshNodes();
Set<InternalNode> activeNodesWithConnector = server.getActiveNodesWithConnector(catalogName);
if (activeNodesWithConnector.size() != servers.size()) {
return false;
}
}
return true;
}
use of io.prestosql.server.testing.TestingPrestoServer in project hetu-core by openlookeng.
the class TestGenerateTokenFilter method setup.
@BeforeClass
public void setup() throws Exception {
server = new TestingPrestoServer(ImmutableList.of(new TestGenerateTokenFilterModule()));
httpClient = (JettyHttpClient) server.getInstance(Key.get(HttpClient.class, GenerateTokenFilterTest.class));
// extract the filter
List<HttpRequestFilter> filters = httpClient.getRequestFilters();
assertEquals(filters.size(), 3);
assertInstanceOf(filters.get(2), GenerateTraceTokenRequestFilter.class);
filter = (GenerateTraceTokenRequestFilter) filters.get(2);
}
use of io.prestosql.server.testing.TestingPrestoServer in project hetu-core by openlookeng.
the class TestNodeResource method setup.
@BeforeClass
public void setup() throws Exception {
server = new TestingPrestoServer();
client = new JettyHttpClient();
}
use of io.prestosql.server.testing.TestingPrestoServer in project hetu-core by openlookeng.
the class TestDataCenterClient method setup.
/**
* setup
*
* @throws Exception setup failed.
*/
@BeforeClass
public void setup() throws Exception {
this.server = new TestingPrestoServer();
this.baseUri = server.getBaseUrl();
this.server.installPlugin(new TpchPlugin());
this.server.createCatalog("tpch", "tpch");
this.config = new DataCenterConfig().setConnectionUrl(this.baseUri).setConnectionUser("root");
this.httpClient = DataCenterStatementClientFactory.newHttpClient(this.config);
}
use of io.prestosql.server.testing.TestingPrestoServer in project hetu-core by openlookeng.
the class TestPrestoDriver method setup.
@BeforeClass
public void setup() throws Exception {
Logging.initialize();
server = new TestingPrestoServer();
server.installPlugin(new TpchPlugin());
server.createCatalog(TEST_CATALOG, "tpch");
server.installPlugin(new BlackHolePlugin());
server.createCatalog("blackhole", "blackhole");
waitForNodeRefresh(server);
setupTestTables();
executorService = newCachedThreadPool(daemonThreadsNamed("test-%s"));
}
Aggregations