[ https://issues.apache.org/jira/browse/AIRAVATA-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16411451#comment-16411451 ]
ASF GitHub Bot commented on AIRAVATA-2657: ------------------------------------------ DImuthuUpe commented on a change in pull request #167: [AIRAVATA-2657] Refactoring App Catalog Implementation - ApplicationDeployment and ApplicationInterface Modules URL: https://github.com/apache/airavata/pull/167#discussion_r176748684 ########## File path: modules/registry-refactoring/src/test/java/org/apache/airavata/registry/core/repositories/appcatalog/ApplicationDeploymentRepositoryTest.java ########## @@ -161,23 +161,29 @@ public void ApplicationDeploymentRepositoryTest() throws AppCatalogException { applicationDeploymentRepository.updateApplicationDeployment(appDeploymentId , applicationDeploymentDescription); assertTrue(applicationDeploymentRepository.getApplicationDeployement(appDeploymentId).getDefaultQueueName().equals("queue3")); - applicationDeploymentRepository.addApplicationDeployment(applicationDeploymentDescription1, gatewayId); + String deploymentId1 = applicationDeploymentRepository.addApplicationDeployment(applicationDeploymentDescription1, gatewayId); List<ApplicationDeploymentDescription> appDeploymentList = applicationDeploymentRepository.getAllApplicationDeployements(gatewayId); List<String> appDeploymentIds = applicationDeploymentRepository.getAllApplicationDeployementIds(); assertTrue(appDeploymentList.size() == 2); assertTrue(appDeploymentIds.size() == 2); - applicationDeploymentRepository.removeAppDeployment(applicationDeploymentDescription1.getAppDeploymentId()); - assertFalse(applicationDeploymentRepository.isExists(applicationDeploymentDescription1.getAppDeploymentId())); - Map<String, String> filters = new HashMap<>(); filters.put(DBConstants.ApplicationDeployment.APPLICATION_MODULE_ID, applicationModule.getAppModuleId()); filters.put(DBConstants.ApplicationDeployment.COMPUTE_HOST_ID, computeResourceDescription.getComputeResourceId()); appDeploymentList = applicationDeploymentRepository.getApplicationDeployements(filters); assertEquals(computeResourceDescription.getComputeResourceId(), appDeploymentList.get(0).getComputeHostId()); Review comment: Is it safe to call appDeploymentList.get(0) ? You might have to check the size of the appDeploymentList first and a potential null check of appDeploymentList ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Refactoring App Catalog implementation - ApplicationDeployment and > ApplicationInterface > --------------------------------------------------------------------------------------- > > Key: AIRAVATA-2657 > URL: https://issues.apache.org/jira/browse/AIRAVATA-2657 > Project: Airavata > Issue Type: Task > Components: Application Catalog > Reporter: Sneha Tilak > Assignee: Sneha Tilak > Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)