Search in sources :

Example 1 with GetClusterName

use of com.oracle.bedrock.runtime.coherence.callables.GetClusterName in project oracle-bedrock by coherence-community.

the class AbstractCoherenceCacheServerTest method shouldUseCustomOperationalOverride.

/**
 * Ensure that we can start and stop a Coherence Cluster Member
 * that uses a specific operational override.
 */
@Test
public void shouldUseCustomOperationalOverride() {
    Platform platform = getPlatform();
    try (CoherenceCacheServer server = platform.launch(CoherenceCacheServer.class, ClusterPort.automatic(), OperationalOverride.of("test-operational-override.xml"), LocalHost.only(), Diagnostics.enabled(), Console.system())) {
        assertThat(server, new GetLocalMemberId(), is(1));
        assertThat(server, new GetClusterSize(), is(1));
        assertThat(server, new GetClusterName(), is("MyCluster"));
    }
}
Also used : GetClusterName(com.oracle.bedrock.runtime.coherence.callables.GetClusterName) GetLocalMemberId(com.oracle.bedrock.runtime.coherence.callables.GetLocalMemberId) LocalPlatform(com.oracle.bedrock.runtime.LocalPlatform) Platform(com.oracle.bedrock.runtime.Platform) GetClusterSize(com.oracle.bedrock.runtime.coherence.callables.GetClusterSize) AbstractTest(com.oracle.bedrock.testsupport.junit.AbstractTest) Test(org.junit.Test)

Aggregations

LocalPlatform (com.oracle.bedrock.runtime.LocalPlatform)1 Platform (com.oracle.bedrock.runtime.Platform)1 GetClusterName (com.oracle.bedrock.runtime.coherence.callables.GetClusterName)1 GetClusterSize (com.oracle.bedrock.runtime.coherence.callables.GetClusterSize)1 GetLocalMemberId (com.oracle.bedrock.runtime.coherence.callables.GetLocalMemberId)1 AbstractTest (com.oracle.bedrock.testsupport.junit.AbstractTest)1 Test (org.junit.Test)1