Search in sources :

Example 1 with InstanceTrackingConfig

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());
}
Also used : InstanceTrackingConfig(com.hazelcast.config.InstanceTrackingConfig) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 2 with InstanceTrackingConfig

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());
}
Also used : InstanceTrackingConfig(com.hazelcast.config.InstanceTrackingConfig)

Example 3 with InstanceTrackingConfig

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());
}
Also used : InstanceTrackingConfig(com.hazelcast.config.InstanceTrackingConfig)

Example 4 with InstanceTrackingConfig

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());
}
Also used : InstanceTrackingConfig(com.hazelcast.config.InstanceTrackingConfig) Test(org.junit.Test) QuickTest(com.hazelcast.test.annotation.QuickTest)

Example 5 with InstanceTrackingConfig

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());
}
Also used : InstanceTrackingConfig(com.hazelcast.config.InstanceTrackingConfig) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

InstanceTrackingConfig (com.hazelcast.config.InstanceTrackingConfig)5 QuickTest (com.hazelcast.test.annotation.QuickTest)3 Test (org.junit.Test)3 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)1