};
private DependencyGraphExecutionFuture executeTestJob(final DependencyGraphExecutorFactory factory) {
final InMemoryLKVMarketDataProvider marketDataProvider = new InMemoryLKVMarketDataProvider();
final MarketDataProviderResolver marketDataProviderResolver = new SingleMarketDataProviderResolver(new SingletonMarketDataProviderFactory(marketDataProvider));
final InMemoryFunctionRepository functionRepository = new InMemoryFunctionRepository();
_functionCount.set(0);
final MockFunction mockFunction = new MockFunction(ComputationTarget.NULL) {
@Override
public Set<ComputedValue> execute(final FunctionExecutionContext executionContext, final FunctionInputs inputs, final ComputationTarget target, final Set<ValueRequirement> desiredValues) {
try {
Thread.sleep(JOB_FINISH_TIME / (JOB_SIZE * 2));
} catch (final InterruptedException e) {
throw new OpenGammaRuntimeException("Function interrupted", e);
}
_functionCount.incrementAndGet();
return super.execute(executionContext, inputs, target, desiredValues);
}
};
functionRepository.addFunction(mockFunction);
final FunctionCompilationContext compilationContext = new FunctionCompilationContext();
final CompiledFunctionService compilationService = new CompiledFunctionService(functionRepository, new CachingFunctionRepositoryCompiler(), compilationContext);
compilationService.initialize();
final FunctionResolver functionResolver = new DefaultFunctionResolver(compilationService);
final InMemorySecuritySource securitySource = new InMemorySecuritySource();