Utilize InstanceFleet features in EMR Cluster Mgmt
Fix failing REST layer unit tests
@@ -106,18 +106,18 @@ public class EmrClusterDefinitionRestControllerTest extends AbstractRestTest
assertEquals("An EMR cluster definition configuration must be specified.", e.getMessage());
}
- // Try to perform a create without specifying instance definitions.
+ // Try to perform a create without specifying both instance definitions and instance fleets.
try
{
EmrClusterDefinition emrClusterDefinitionConfiguration = getTestEmrClusterDefinitionConfiguration(EMR_CLUSTER_DEFINITION_XML_FILE_WITH_CLASSPATH);
emrClusterDefinitionConfiguration.setInstanceDefinitions(null);
emrClusterDefinitionRestController
.createEmrClusterDefinition(createEmrClusterDefinitionCreateRequest(NAMESPACE, EMR_CLUSTER_DEFINITION_NAME, emrClusterDefinitionConfiguration));
- fail("Should throw an IllegalArgumentException when instance definitions are not specified.");
+ fail();
}
catch (IllegalArgumentException e)
{
- assertEquals("Instance definitions must be specified.", e.getMessage());
+ assertEquals("Instance group definitions or instance fleets must be specified.", e.getMessage());
}
// Try to perform a create without specifying master instances.
@@ -649,18 +649,18 @@ public class EmrClusterDefinitionRestControllerTest extends AbstractRestTest
assertEquals("An EMR cluster definition configuration must be specified.", e.getMessage());
}
- // Try to perform an update without specifying instance definitions.
+ // Try to perform an update without specifying both instance definitions and instance fleets.
try
{
EmrClusterDefinition emrClusterDefinitionConfiguration = getTestEmrClusterDefinitionConfiguration(EMR_CLUSTER_DEFINITION_XML_FILE_WITH_CLASSPATH);
emrClusterDefinitionConfiguration.setInstanceDefinitions(null);
emrClusterDefinitionRestController
.updateEmrClusterDefinition(NAMESPACE, EMR_CLUSTER_DEFINITION_NAME, createEmrClusterDefinitionUpdateRequest(emrClusterDefinitionConfiguration));
- fail("Should throw an IllegalArgumentException when instance definitions are not specified.");
+ fail();
}
catch (IllegalArgumentException e)
{
- assertEquals("Instance definitions must be specified.", e.getMessage());
+ assertEquals("Instance group definitions or instance fleets must be specified.", e.getMessage());
}
// Try to perform an update without specifying master instances.
