Search in sources :

Example 16 with State

use of org.apache.mesos.state.State in project jesos by groupon.

the class AbstractTestState method testExpungeNonExistentValue.

@Test
public void testExpungeNonExistentValue() throws Exception {
    final State state = getState();
    final Variable empty = state.fetch("does-not-exist").get();
    assertNotNull(empty);
    assertTrue(empty.value().length == 0);
    final boolean expunged = state.expunge(empty).get();
    assertFalse(expunged);
}
Also used : Variable(org.apache.mesos.state.Variable) State(org.apache.mesos.state.State) Test(org.junit.Test)

Aggregations

State (org.apache.mesos.state.State)16 Test (org.junit.Test)14 Variable (org.apache.mesos.state.Variable)11 InMemoryState (org.apache.mesos.state.InMemoryState)5 ImmutableList (com.google.common.collect.ImmutableList)2 ListenableFuture (com.google.common.util.concurrent.ListenableFuture)2 ListeningExecutorService (com.google.common.util.concurrent.ListeningExecutorService)2 CassandraFrameworkProtos (io.mesosphere.mesos.frameworks.cassandra.CassandraFrameworkProtos)2 Callable (java.util.concurrent.Callable)2 JsonFactory (com.fasterxml.jackson.core.JsonFactory)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 GuavaModule (com.fasterxml.jackson.datatype.guava.GuavaModule)1 JacksonJaxbJsonProvider (com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider)1 ImmutableSet (com.google.common.collect.ImmutableSet)1 ImmutableSortedSet (com.google.common.collect.ImmutableSortedSet)1 ExternalDc (io.mesosphere.mesos.frameworks.cassandra.CassandraFrameworkProtos.ExternalDc)1 HealthReportService (io.mesosphere.mesos.frameworks.cassandra.scheduler.health.HealthReportService)1 Clock (io.mesosphere.mesos.util.Clock)1 SystemClock (io.mesosphere.mesos.util.SystemClock)1 URI (java.net.URI)1