Search in sources :

Example 6 with AmazonElasticMapReduceClient

use of com.amazonaws.services.elasticmapreduce.AmazonElasticMapReduceClient in project herd by FINRAOS.

the class EmrDaoTest method getEmrClientAssertClientConfigurationNotSetWhenProxyHostIsBlank.

@Test
public void getEmrClientAssertClientConfigurationNotSetWhenProxyHostIsBlank() throws Exception {
    String httpProxyHost = "";
    Integer httpProxyPort = 1234;
    AwsParamsDto awsParamsDto = new AwsParamsDto();
    awsParamsDto.setHttpProxyHost(httpProxyHost);
    awsParamsDto.setHttpProxyPort(httpProxyPort);
    AmazonElasticMapReduceClient amazonElasticMapReduceClient = emrDao.getEmrClient(awsParamsDto);
    ClientConfiguration clientConfiguration = (ClientConfiguration) ReflectionTestUtils.getField(amazonElasticMapReduceClient, "clientConfiguration");
    assertNotNull(clientConfiguration);
    assertNull(clientConfiguration.getProxyHost());
}
Also used : AwsParamsDto(org.finra.herd.model.dto.AwsParamsDto) AmazonElasticMapReduceClient(com.amazonaws.services.elasticmapreduce.AmazonElasticMapReduceClient) ClientConfiguration(com.amazonaws.ClientConfiguration) Test(org.junit.Test)

Aggregations

AmazonElasticMapReduceClient (com.amazonaws.services.elasticmapreduce.AmazonElasticMapReduceClient)6 AwsParamsDto (org.finra.herd.model.dto.AwsParamsDto)6 Test (org.junit.Test)6 ClientConfiguration (com.amazonaws.ClientConfiguration)3 AbstractDaoTest (org.finra.herd.dao.AbstractDaoTest)2 ClusterSummary (com.amazonaws.services.elasticmapreduce.model.ClusterSummary)1 ListClustersRequest (com.amazonaws.services.elasticmapreduce.model.ListClustersRequest)1 ListClustersResult (com.amazonaws.services.elasticmapreduce.model.ListClustersResult)1 ListInstanceFleetsRequest (com.amazonaws.services.elasticmapreduce.model.ListInstanceFleetsRequest)1 ListInstanceFleetsResult (com.amazonaws.services.elasticmapreduce.model.ListInstanceFleetsResult)1