Search in sources :

Example 1 with OperationRecorder

use of com.mesosphere.sdk.offer.OperationRecorder in project dcos-commons by mesosphere.

the class UninstallRecorderTest method testHandlingOfUnexpectedOfferRecommendation.

@Test
public void testHandlingOfUnexpectedOfferRecommendation() throws Exception {
    Protos.Resource resource = ResourceTestUtils.getUnreservedCpus(1.0);
    OfferRecommendation unsupportedOfferRecommendation = new CreateOfferRecommendation(null, resource);
    StateStore mockStateStore = mock(StateStore.class);
    OperationRecorder operationRecorder = new UninstallRecorder(mockStateStore, null);
    // should just return without error
    operationRecorder.record(unsupportedOfferRecommendation);
}
Also used : Protos(org.apache.mesos.Protos) StateStore(com.mesosphere.sdk.state.StateStore) OperationRecorder(com.mesosphere.sdk.offer.OperationRecorder) CreateOfferRecommendation(com.mesosphere.sdk.offer.CreateOfferRecommendation) OfferRecommendation(com.mesosphere.sdk.offer.OfferRecommendation) CreateOfferRecommendation(com.mesosphere.sdk.offer.CreateOfferRecommendation) Test(org.junit.Test)

Aggregations

CreateOfferRecommendation (com.mesosphere.sdk.offer.CreateOfferRecommendation)1 OfferRecommendation (com.mesosphere.sdk.offer.OfferRecommendation)1 OperationRecorder (com.mesosphere.sdk.offer.OperationRecorder)1 StateStore (com.mesosphere.sdk.state.StateStore)1 Protos (org.apache.mesos.Protos)1 Test (org.junit.Test)1