aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters/src
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-03-01 21:00:04 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-01 21:00:04 +0000
commitfcba36304c65fe00512bdaa689e65172a1ba054d (patch)
treee75bda30775b33194610cbf5135490c0e4074e3e /adapters/mso-openstack-adapters/src
parentbe1a6ddb97550e8d03869f112edb88d67c025da1 (diff)
parente57ae2b868eb1015a723ff522f787587f99aab74 (diff)
Merge "audit poller is polling too fast"
Diffstat (limited to 'adapters/mso-openstack-adapters/src')
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackService.java6
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackServiceData.java2
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/audit/AuditStackServiceDataTest.java2
3 files changed, 5 insertions, 5 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackService.java
index aace75ff99..499c1137c7 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackService.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackService.java
@@ -59,9 +59,9 @@ public class AuditStackService {
ClientRequestInterceptor interceptor = new BasicAuthProvider(env.getRequiredProperty("mso.config.cadi.aafId"),
auth);
ExternalTaskClient client = ExternalTaskClient.create()
- .baseUrl(env.getRequiredProperty("mso.workflow.endpoint")).maxTasks(5).addInterceptor(interceptor)
- .asyncResponseTimeout(120000).backoffStrategy(new ExponentialBackoffStrategy(5000, 2, 30000)).build();
- client.subscribe("InventoryAudit").lockDuration(5000)
+ .baseUrl(env.getRequiredProperty("mso.workflow.endpoint")).maxTasks(1).addInterceptor(interceptor)
+ .asyncResponseTimeout(120000).backoffStrategy(new ExponentialBackoffStrategy(10000, 2, 120000)).build();
+ client.subscribe("InventoryAudit").lockDuration(60000)
.handler(auditStack::executeExternalTask).open();
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackServiceData.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackServiceData.java
index d1f952c829..773705d566 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackServiceData.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackServiceData.java
@@ -72,7 +72,7 @@ public class AuditStackServiceData {
}else if(externalTask.getRetries() != null &&
externalTask.getRetries()-1 == 0){
logger.debug("The External Task Id: {} Failed, All Retries Exhausted", externalTask.getId());
- externalTaskService.handleBpmnError(externalTask, "AuditAAIInventoryFailure", "Number of Retries Exceeded auditing inventory");
+ externalTaskService.handleBpmnError(externalTask, "AuditAAIInventoryFailure");
}else{
logger.debug("The External Task Id: {} Failed, Decrementing Retries: {} , Retry Delay: ", externalTask.getId(),externalTask.getRetries()-1, calculateRetryDelay(externalTask.getRetries()));
externalTaskService.handleFailure(externalTask, UNABLE_TO_FIND_ALL_V_SERVERS_AND_L_INTERACES_IN_A_AI, UNABLE_TO_FIND_ALL_V_SERVERS_AND_L_INTERACES_IN_A_AI, externalTask.getRetries()-1, calculateRetryDelay(externalTask.getRetries()));
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/audit/AuditStackServiceDataTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/audit/AuditStackServiceDataTest.java
index 52b67b8eb9..d7739e56f6 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/audit/AuditStackServiceDataTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/audit/AuditStackServiceDataTest.java
@@ -105,7 +105,7 @@ public class AuditStackServiceDataTest extends AuditStackServiceData {
doReturn(1).when(mockExternalTask).getRetries();
auditStackService.executeExternalTask(mockExternalTask, mockExternalTaskService);
Mockito.verify(mockExternalTaskService).handleBpmnError(mockExternalTask,
- "AuditAAIInventoryFailure", "Number of Retries Exceeded auditing inventory");
+ "AuditAAIInventoryFailure");
}
@Test