use of com.hazelcast.config.InstanceTrackingConfig in project hazelcast by hazelcast.
the class ClientConfigXmlGeneratorTest method testInstanceTrackingConfig.
@Test
public void testInstanceTrackingConfig() {
clientConfig.getInstanceTrackingConfig().setEnabled(true).setFileName("/dummy/file").setFormatPattern("dummy-pattern with $HZ_INSTANCE_TRACKING{placeholder} and $RND{placeholder}");
InstanceTrackingConfig originalConfig = clientConfig.getInstanceTrackingConfig();
InstanceTrackingConfig generatedConfig = newConfigViaGenerator().getInstanceTrackingConfig();
assertEquals(originalConfig.isEnabled(), generatedConfig.isEnabled());
assertEquals(originalConfig.getFileName(), generatedConfig.getFileName());
assertEquals(originalConfig.getFormatPattern(), generatedConfig.getFormatPattern());
}
use of com.hazelcast.config.InstanceTrackingConfig in project hazelcast by hazelcast.
the class XmlClientConfigBuilderTest method testInstanceTrackingConfig.
@Override
public void testInstanceTrackingConfig() {
String xml = HAZELCAST_CLIENT_START_TAG + "<instance-tracking enabled=\"true\">" + " <file-name>/dummy/file</file-name>" + " <format-pattern>dummy-pattern with $HZ_INSTANCE_TRACKING{placeholder} and $RND{placeholder}</format-pattern>" + "</instance-tracking>" + HAZELCAST_CLIENT_END_TAG;
ClientConfig config = buildConfig(xml);
InstanceTrackingConfig trackingConfig = config.getInstanceTrackingConfig();
assertTrue(trackingConfig.isEnabled());
assertEquals("/dummy/file", trackingConfig.getFileName());
assertEquals("dummy-pattern with $HZ_INSTANCE_TRACKING{placeholder} and $RND{placeholder}", trackingConfig.getFormatPattern());
}
use of com.hazelcast.config.InstanceTrackingConfig in project hazelcast by hazelcast.
the class YamlClientConfigBuilderTest method testInstanceTrackingConfig.
@Override
public void testInstanceTrackingConfig() {
String yaml = "" + "hazelcast-client:\n" + " instance-tracking:\n" + " enabled: true\n" + " file-name: /dummy/file\n" + " format-pattern: dummy-pattern with $HZ_INSTANCE_TRACKING{placeholder} and $RND{placeholder}";
ClientConfig config = buildConfig(yaml);
InstanceTrackingConfig trackingConfig = config.getInstanceTrackingConfig();
assertTrue(trackingConfig.isEnabled());
assertEquals("/dummy/file", trackingConfig.getFileName());
assertEquals("dummy-pattern with $HZ_INSTANCE_TRACKING{placeholder} and $RND{placeholder}", trackingConfig.getFormatPattern());
}
use of com.hazelcast.config.InstanceTrackingConfig in project hazelcast by hazelcast.
the class TestFullApplicationContext method testInstanceTrackingConfig.
@Test
public void testInstanceTrackingConfig() {
InstanceTrackingConfig trackingConfig = config.getInstanceTrackingConfig();
assertTrue(trackingConfig.isEnabled());
assertEquals("/dummy/file", trackingConfig.getFileName());
assertEquals("dummy-pattern with $HZ_INSTANCE_TRACKING{placeholder} and $RND{placeholder}", trackingConfig.getFormatPattern());
}
use of com.hazelcast.config.InstanceTrackingConfig in project hazelcast by hazelcast.
the class TestClientApplicationContext method testInstanceTracking.
@Test
public void testInstanceTracking() {
InstanceTrackingConfig trackingConfig = instanceTrackingClient.getClientConfig().getInstanceTrackingConfig();
assertTrue(trackingConfig.isEnabled());
assertEquals("/dummy/file", trackingConfig.getFileName());
assertEquals("dummy-pattern with $HZ_INSTANCE_TRACKING{placeholder} and $RND{placeholder}", trackingConfig.getFormatPattern());
}
Aggregations