more tests
This commit is contained in:
parent
c1ff619781
commit
45b7afe14f
|
@ -43,7 +43,7 @@ public abstract class AbstractScopedSettings extends AbstractComponent {
|
|||
if (entry.getScope() != scope) {
|
||||
throw new IllegalArgumentException("Setting must be a cluster setting but was: " + entry.getScope());
|
||||
}
|
||||
if (entry.isGroupSetting()) {
|
||||
if (entry.hasComplexMatcher()) {
|
||||
complexMatchers.put(entry.getKey(), entry);
|
||||
} else {
|
||||
keySettings.put(entry.getKey(), entry);
|
||||
|
|
|
@ -92,7 +92,7 @@ public class Setting<T> extends ToXContentToBytes {
|
|||
* rather than a single value. The key, see {@link #getKey()}, in contrast to non-group settings is a prefix like <tt>cluster.store.</tt>
|
||||
* that matches all settings with this prefix.
|
||||
*/
|
||||
public boolean isGroupSetting() {
|
||||
boolean isGroupSetting() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -235,6 +235,16 @@ public class ClusterSettingsIT extends ESIntegTestCase {
|
|||
assertThat(response3.getPersistentSettings().get(key2), notNullValue());
|
||||
}
|
||||
|
||||
public void testCanUpdateTracerSettings() {
|
||||
ClusterUpdateSettingsResponse clusterUpdateSettingsResponse = client().admin().cluster()
|
||||
.prepareUpdateSettings()
|
||||
.setTransientSettings(Settings.builder().putArray("transport.tracer.include", "internal:index/shard/recovery/*",
|
||||
"internal:gateway/local*"))
|
||||
.get();
|
||||
assertArrayEquals(clusterUpdateSettingsResponse.getTransientSettings().getAsArray("transport.tracer.include"), new String[] {"internal:index/shard/recovery/*",
|
||||
"internal:gateway/local*"});
|
||||
}
|
||||
|
||||
public void testUpdateDiscoveryPublishTimeout() {
|
||||
|
||||
DiscoverySettings discoverySettings = internalCluster().getInstance(DiscoverySettings.class);
|
||||
|
|
|
@ -151,5 +151,7 @@ public class ScopedSettingsTests extends ESTestCase {
|
|||
assertEquals(ref.get().size(), 2);
|
||||
assertTrue(ref.get().contains("internal:index/shard/recovery/*"));
|
||||
assertTrue(ref.get().contains("internal:gateway/local*"));
|
||||
assertNotNull(settings.get("transport.tracer.include." + randomIntBetween(1, 100)));
|
||||
assertSame(TransportService.TRACE_LOG_INCLUDE_SETTING, settings.get("transport.tracer.include." + randomIntBetween(1, 100)));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue