Search in sources :

Example 6 with SettingsModule

use of org.opensearch.common.settings.SettingsModule in project OpenSearch by opensearch-project.

the class ClusterModuleTests method testRegisterIndexDynamicSetting.

public void testRegisterIndexDynamicSetting() {
    SettingsModule module = new SettingsModule(Settings.EMPTY, Setting.boolSetting("index.foo.bar", false, Property.Dynamic, Property.IndexScope));
    assertInstanceBinding(module, IndexScopedSettings.class, service -> service.isDynamicSetting("index.foo.bar"));
}
Also used : SettingsModule(org.opensearch.common.settings.SettingsModule)

Example 7 with SettingsModule

use of org.opensearch.common.settings.SettingsModule in project OpenSearch by opensearch-project.

the class ClusterModuleTests method testRegisterClusterDynamicSetting.

public void testRegisterClusterDynamicSetting() {
    SettingsModule module = new SettingsModule(Settings.EMPTY, Setting.boolSetting("foo.bar", false, Property.Dynamic, Property.NodeScope));
    assertInstanceBinding(module, ClusterSettings.class, service -> service.isDynamicSetting("foo.bar"));
}
Also used : SettingsModule(org.opensearch.common.settings.SettingsModule)

Aggregations

SettingsModule (org.opensearch.common.settings.SettingsModule)7 IndexNameExpressionResolver (org.opensearch.cluster.metadata.IndexNameExpressionResolver)5 IndexScopedSettings (org.opensearch.common.settings.IndexScopedSettings)4 Settings (org.opensearch.common.settings.Settings)4 SettingsFilter (org.opensearch.common.settings.SettingsFilter)4 TestThreadPool (org.opensearch.threadpool.TestThreadPool)4 ThreadPool (org.opensearch.threadpool.ThreadPool)4 IOException (java.io.IOException)3 ThreadContext (org.opensearch.common.util.concurrent.ThreadContext)3 RestHandler (org.opensearch.rest.RestHandler)3 UsageService (org.opensearch.usage.UsageService)3 Collections.emptyList (java.util.Collections.emptyList)2 Collections.emptySet (java.util.Collections.emptySet)2 TimeUnit (java.util.concurrent.TimeUnit)2 Supplier (java.util.function.Supplier)2 After (org.junit.After)2 Before (org.junit.Before)2 ActionListener (org.opensearch.action.ActionListener)2 IndicesRequest (org.opensearch.action.IndicesRequest)2 ActionFilters (org.opensearch.action.support.ActionFilters)2