Search in sources :

Example 1 with BackendGlobalState

use of com.yelp.nrtsearch.server.luceneserver.state.BackendGlobalState in project nrtsearch by Yelp.

the class GlobalStateTest method testCreateBackendGlobalState.

@Test
public void testCreateBackendGlobalState() throws IOException {
    String configFile = String.join("\n", "stateConfig:", "  backendType: LOCAL", "stateDir: " + folder.getRoot().getAbsolutePath());
    LuceneServerConfiguration configuration = getConfig(configFile);
    GlobalState globalState = GlobalState.createState(configuration);
    assertTrue(globalState instanceof BackendGlobalState);
}
Also used : LuceneServerConfiguration(com.yelp.nrtsearch.server.config.LuceneServerConfiguration) BackendGlobalState(com.yelp.nrtsearch.server.luceneserver.state.BackendGlobalState) LegacyGlobalState(com.yelp.nrtsearch.server.luceneserver.state.LegacyGlobalState) BackendGlobalState(com.yelp.nrtsearch.server.luceneserver.state.BackendGlobalState) Test(org.junit.Test)

Aggregations

LuceneServerConfiguration (com.yelp.nrtsearch.server.config.LuceneServerConfiguration)1 BackendGlobalState (com.yelp.nrtsearch.server.luceneserver.state.BackendGlobalState)1 LegacyGlobalState (com.yelp.nrtsearch.server.luceneserver.state.LegacyGlobalState)1 Test (org.junit.Test)1