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));
}
Aggregations