use of org.finos.legend.engine.plan.execution.stores.inMemory.plugin.InMemoryStoreExecutor in project legend-engine by finos.
the class TestPlanExecutor method testPlanExecutorConstructionWithNoConfig.
@Test
public void testPlanExecutorConstructionWithNoConfig() {
// assert that we construct a plan executor with all known store executors even when no configuration is supplied
PlanExecutor planExecutor = PlanExecutor.newPlanExecutorWithConfigurations();
ImmutableList<StoreExecutor> extraExecutors = planExecutor.getExtraExecutors();
StoreExecutor relationalExecutor = extraExecutors.detect(storeExecutor -> storeExecutor instanceof FakeRelationalStoreExecutorBuilder.Executor);
assertNotNull("failed to locate relational executor", relationalExecutor);
StoreExecutor serviceStoreExecutor = extraExecutors.detect(storeExecutor -> storeExecutor instanceof FakeServiceStoreExecutorBuilder.Executor);
assertNotNull("failed to locate service store executor", serviceStoreExecutor);
StoreExecutor inmemoryExecutor = extraExecutors.detect(storeExecutor -> storeExecutor instanceof InMemoryStoreExecutor);
assertNotNull("failed to locate inmemory executor", inmemoryExecutor);
}
use of org.finos.legend.engine.plan.execution.stores.inMemory.plugin.InMemoryStoreExecutor in project legend-engine by finos.
the class TestPlanExecutor method testPlanExecutorConstructionWithConfig.
@Test
public void testPlanExecutorConstructionWithConfig() {
// assert that we construct a plan executor with the proper configs
PlanExecutor planExecutor = PlanExecutor.newPlanExecutorWithConfigurations(new FakeRelationalStoreExecutorBuilder.Configuration(), new FakeServiceStoreExecutorBuilder.Configuration());
ImmutableList<StoreExecutor> extraExecutors = planExecutor.getExtraExecutors();
StoreExecutor relationalExecutor = extraExecutors.detect(storeExecutor -> storeExecutor instanceof FakeRelationalStoreExecutorBuilder.Executor);
assertNotNull("failed to locate relational executor", relationalExecutor);
StoreExecutorConfiguration relationalConfiguration = ((FakeRelationalStoreExecutorBuilder.Executor) relationalExecutor).getConfiguration();
assertNotNull("builder not invoked with config", relationalConfiguration);
StoreExecutor serviceStoreExecutor = extraExecutors.detect(storeExecutor -> storeExecutor instanceof FakeServiceStoreExecutorBuilder.Executor);
assertNotNull("failed to locate service store executor", serviceStoreExecutor);
StoreExecutorConfiguration serviceStoreConfiguration = ((FakeServiceStoreExecutorBuilder.Executor) serviceStoreExecutor).getConfiguration();
assertNotNull("builder not invoked with config", serviceStoreConfiguration);
StoreExecutor inmemoryExecutor = extraExecutors.detect(storeExecutor -> storeExecutor instanceof InMemoryStoreExecutor);
assertNotNull("failed to locate inmemory executor", inmemoryExecutor);
}
Aggregations