use of com.mesosphere.sdk.offer.OfferRecommendation in project dcos-commons by mesosphere.
the class ResourceCleanupStepTest method testNonMatchingUpdateOfferStatus.
@Test
public void testNonMatchingUpdateOfferStatus() throws Exception {
OfferRecommendation offerRecommendation = new UnreserveOfferRecommendation(null, ResourceTestUtils.getReservedCpus(1.0, DIFFERENT_RESOURCE_ID));
resourceCleanupStep.start();
resourceCleanupStep.updateOfferStatus(Collections.singletonList(offerRecommendation));
assert resourceCleanupStep.getStatus().equals(Status.PREPARED);
}
use of com.mesosphere.sdk.offer.OfferRecommendation in project dcos-commons by mesosphere.
the class ResourceCleanupStepTest method testMixedUpdateOfferStatus.
@Test
public void testMixedUpdateOfferStatus() throws Exception {
OfferRecommendation rec1 = new CreateOfferRecommendation(null, ResourceTestUtils.getReservedRootVolume(999.0));
OfferRecommendation rec2 = new UnreserveOfferRecommendation(null, ResourceTestUtils.getReservedCpus(1.0, TestConstants.RESOURCE_ID));
resourceCleanupStep.start();
resourceCleanupStep.updateOfferStatus(Arrays.asList(rec1, rec2));
assert resourceCleanupStep.getStatus().equals(Status.COMPLETE);
}
Aggregations