use of org.elasticsearch.test.engine.MockEngineFactory in project elasticsearch by elastic.
the class IndexModuleTests method testWrapperIsBound.
public void testWrapperIsBound() throws IOException {
IndexModule module = new IndexModule(indexSettings, new AnalysisRegistry(environment, emptyMap(), emptyMap(), emptyMap(), emptyMap(), emptyMap()));
module.setSearcherWrapper((s) -> new Wrapper());
module.engineFactory.set(new MockEngineFactory(AssertingDirectoryReader.class));
IndexService indexService = newIndexService(module);
assertTrue(indexService.getSearcherWrapper() instanceof Wrapper);
assertSame(indexService.getEngineFactory(), module.engineFactory.get());
indexService.close("simon says", false);
}
Aggregations