Search in sources :

Example 1 with GetServiceStatus

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

the class AbstractCoherenceCacheServerTest method shouldStartSingletonCluster.

/**
 * Ensure that we can start and stop a single Coherence Cluster Member.
 */
@Test
public void shouldStartSingletonCluster() {
    Platform platform = getPlatform();
    try (CoherenceCacheServer server = platform.launch(CoherenceCacheServer.class, ClusterPort.automatic(), LocalHost.only(), Diagnostics.enabled(), Console.system())) {
        Eventually.assertThat(server, new GetLocalMemberId(), is(1));
        Eventually.assertThat(server, new GetClusterSize(), is(1));
        Eventually.assertThat(server, new GetServiceStatus("DistributedCache"), is(ServiceStatus.ENDANGERED));
    }
}
Also used : 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) GetServiceStatus(com.oracle.bedrock.runtime.coherence.callables.GetServiceStatus) 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 GetClusterSize (com.oracle.bedrock.runtime.coherence.callables.GetClusterSize)1 GetLocalMemberId (com.oracle.bedrock.runtime.coherence.callables.GetLocalMemberId)1 GetServiceStatus (com.oracle.bedrock.runtime.coherence.callables.GetServiceStatus)1 AbstractTest (com.oracle.bedrock.testsupport.junit.AbstractTest)1 Test (org.junit.Test)1