Search in sources :

Example 1 with Property

use of org.elasticsearch.common.settings.Setting.Property in project elasticsearch by elastic.

the class SettingsModuleTests method testRegisterShared.

public void testRegisterShared() {
    Property scope = randomFrom(Property.NodeScope, Property.IndexScope);
    expectThrows(IllegalArgumentException.class, () -> new SettingsModule(Settings.EMPTY, Setting.simpleString("index.foo.bar", scope), Setting.simpleString("index.foo.bar", scope)));
    expectThrows(IllegalArgumentException.class, () -> new SettingsModule(Settings.EMPTY, Setting.simpleString("index.foo.bar", scope, Property.Shared), Setting.simpleString("index.foo.bar", scope)));
    expectThrows(IllegalArgumentException.class, () -> new SettingsModule(Settings.EMPTY, Setting.simpleString("index.foo.bar", scope), Setting.simpleString("index.foo.bar", scope, Property.Shared)));
    new SettingsModule(Settings.EMPTY, Setting.simpleString("index.foo.bar", scope, Property.Shared), Setting.simpleString("index.foo.bar", scope, Property.Shared));
}
Also used : Property(org.elasticsearch.common.settings.Setting.Property)

Aggregations

Property (org.elasticsearch.common.settings.Setting.Property)1