Search in sources :

Example 1 with EmrClusterDefinitionSpotSpecification

use of org.finra.herd.model.api.xml.EmrClusterDefinitionSpotSpecification in project herd by FINRAOS.

the class EmrDaoImplTest method testGetSpotSpecification.

@Test
public void testGetSpotSpecification() {
    // Create objects required for testing.
    final Integer timeoutDurationMinutes = INTEGER_VALUE;
    final String timeoutAction = STRING_VALUE;
    final Integer blockDurationMinutes = INTEGER_VALUE_2;
    final EmrClusterDefinitionSpotSpecification emrClusterDefinitionSpotSpecification1 = new EmrClusterDefinitionSpotSpecification(timeoutDurationMinutes, timeoutAction, blockDurationMinutes);
    // Call the method under test.
    SpotProvisioningSpecification result = emrDaoImpl.getSpotSpecification(emrClusterDefinitionSpotSpecification1);
    // Verify the external calls.
    verifyNoMoreInteractionsHelper();
    // Validate the results.
    assertEquals(new SpotProvisioningSpecification().withTimeoutDurationMinutes(timeoutDurationMinutes).withTimeoutAction(timeoutAction).withBlockDurationMinutes(blockDurationMinutes), result);
}
Also used : EmrClusterDefinitionSpotSpecification(org.finra.herd.model.api.xml.EmrClusterDefinitionSpotSpecification) SpotProvisioningSpecification(com.amazonaws.services.elasticmapreduce.model.SpotProvisioningSpecification) Test(org.junit.Test) AbstractDaoTest(org.finra.herd.dao.AbstractDaoTest)

Example 2 with EmrClusterDefinitionSpotSpecification

use of org.finra.herd.model.api.xml.EmrClusterDefinitionSpotSpecification in project herd by FINRAOS.

the class EmrDaoImplTest method testGetLaunchSpecifications.

@Test
public void testGetLaunchSpecifications() {
    // Create objects required for testing.
    final EmrClusterDefinitionSpotSpecification emrClusterDefinitionSpotSpecification = null;
    final EmrClusterDefinitionLaunchSpecifications emrClusterDefinitionLaunchSpecifications = new EmrClusterDefinitionLaunchSpecifications(emrClusterDefinitionSpotSpecification);
    // Call the method under test.
    InstanceFleetProvisioningSpecifications result = emrDaoImpl.getLaunchSpecifications(emrClusterDefinitionLaunchSpecifications);
    // Verify the external calls.
    verifyNoMoreInteractionsHelper();
    // Validate the results.
    assertEquals(new InstanceFleetProvisioningSpecifications().withSpotSpecification(null), result);
}
Also used : EmrClusterDefinitionSpotSpecification(org.finra.herd.model.api.xml.EmrClusterDefinitionSpotSpecification) InstanceFleetProvisioningSpecifications(com.amazonaws.services.elasticmapreduce.model.InstanceFleetProvisioningSpecifications) EmrClusterDefinitionLaunchSpecifications(org.finra.herd.model.api.xml.EmrClusterDefinitionLaunchSpecifications) Test(org.junit.Test) AbstractDaoTest(org.finra.herd.dao.AbstractDaoTest)

Aggregations

AbstractDaoTest (org.finra.herd.dao.AbstractDaoTest)2 EmrClusterDefinitionSpotSpecification (org.finra.herd.model.api.xml.EmrClusterDefinitionSpotSpecification)2 Test (org.junit.Test)2 InstanceFleetProvisioningSpecifications (com.amazonaws.services.elasticmapreduce.model.InstanceFleetProvisioningSpecifications)1 SpotProvisioningSpecification (com.amazonaws.services.elasticmapreduce.model.SpotProvisioningSpecification)1 EmrClusterDefinitionLaunchSpecifications (org.finra.herd.model.api.xml.EmrClusterDefinitionLaunchSpecifications)1