Search in sources :

Example 1 with ProcedureRegistry

use of com.facebook.presto.metadata.ProcedureRegistry in project presto by prestodb.

the class TestProcedureCall method setUp.

@BeforeClass
public void setUp() throws Exception {
    TestingPrestoServer coordinator = ((DistributedQueryRunner) getQueryRunner()).getCoordinator();
    tester = coordinator.getProcedureTester();
    // register procedures in the bogus testing catalog
    ProcedureRegistry procedureRegistry = coordinator.getMetadata().getProcedureRegistry();
    TestingProcedures procedures = new TestingProcedures(coordinator.getProcedureTester());
    procedureRegistry.addProcedures(new ConnectorId(TESTING_CATALOG), procedures.getProcedures(PROCEDURE_SCHEMA));
    session = testSessionBuilder().setCatalog(TESTING_CATALOG).setSchema(PROCEDURE_SCHEMA).build();
}
Also used : TestingPrestoServer(com.facebook.presto.server.testing.TestingPrestoServer) ProcedureRegistry(com.facebook.presto.metadata.ProcedureRegistry) ConnectorId(com.facebook.presto.connector.ConnectorId) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

ConnectorId (com.facebook.presto.connector.ConnectorId)1 ProcedureRegistry (com.facebook.presto.metadata.ProcedureRegistry)1 TestingPrestoServer (com.facebook.presto.server.testing.TestingPrestoServer)1 BeforeClass (org.testng.annotations.BeforeClass)1