/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2021,2023 Nordix Foundation.
+ * Copyright (C) 2021,2023,2025 OpenInfra Foundation Europe. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
public class ParticipantParameters {
@Min(100)
- private long heartBeatMs;
+ private long heartBeatMs = 20000;
@Min(100)
- private long maxStatusWaitMs;
+ private long maxStatusWaitMs = 150000;
+
+ @Min(100)
+ private long maxOperationWaitMs = 200000;
}
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2025 Nordix Foundation.
+ * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
protected static final Logger LOGGER = LoggerFactory.getLogger(AbstractScanner.class);
- protected final long maxStatusWaitMs;
+ protected final long maxOperationWaitMs;
protected final AutomationCompositionProvider acProvider;
private final ParticipantSyncPublisher participantSyncPublisher;
final AcRuntimeParameterGroup acRuntimeParameterGroup, final EncryptionUtils encryptionUtils) {
this.acProvider = acProvider;
this.participantSyncPublisher = participantSyncPublisher;
- this.maxStatusWaitMs = acRuntimeParameterGroup.getParticipantParameters().getMaxStatusWaitMs();
+ this.maxOperationWaitMs = acRuntimeParameterGroup.getParticipantParameters().getMaxOperationWaitMs();
this.encryptionUtils = encryptionUtils;
}
}
var now = TimestampHelper.nowEpochMilli();
var lastMsg = TimestampHelper.toEpochMilli(automationComposition.getLastMsg());
- if ((now - lastMsg) > maxStatusWaitMs) {
+ if ((now - lastMsg) > maxOperationWaitMs) {
LOGGER.debug("Report timeout for the ac instance {}", automationComposition.getInstanceId());
automationComposition.setStateChangeResult(StateChangeResult.TIMEOUT);
updateSync.setUpdated(true);
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2025 Nordix Foundation.
+ * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
public class AcDefinitionScanner {
private static final Logger LOGGER = LoggerFactory.getLogger(AcDefinitionScanner.class);
- private final long maxStatusWaitMs;
+ private final long maxOperationWaitMs;
private final AcDefinitionProvider acDefinitionProvider;
private final ParticipantSyncPublisher participantSyncPublisher;
final AcRuntimeParameterGroup acRuntimeParameterGroup) {
this.acDefinitionProvider = acDefinitionProvider;
this.participantSyncPublisher = participantSyncPublisher;
- this.maxStatusWaitMs = acRuntimeParameterGroup.getParticipantParameters().getMaxStatusWaitMs();
+ this.maxOperationWaitMs = acRuntimeParameterGroup.getParticipantParameters().getMaxOperationWaitMs();
}
private UpdateSync handlePrimeAckElement(DocMessage message, AutomationCompositionDefinition acDefinition) {
}
var now = TimestampHelper.nowEpochMilli();
var lastMsg = TimestampHelper.toEpochMilli(acDefinition.getLastMsg());
- if ((now - lastMsg) > maxStatusWaitMs) {
+ if ((now - lastMsg) > maxOperationWaitMs) {
LOGGER.debug("Report timeout for the ac definition {}", acDefinition.getCompositionId());
acDefinition.setStateChangeResult(StateChangeResult.TIMEOUT);
result.setUpdated(true);
syncTopic: acm-ppnt-sync
participantParameters:
heartBeatMs: 20000
- maxStatusWaitMs: 200000
+ maxStatusWaitMs: 150000
+ maxOperationWaitMs: 200000
topicParameterGroup:
topicSources:
- topic: ${runtime.topics.operationTopic}
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2025 Nordix Foundation.
+ * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
verify(acDefinitionProvider, times(0)).updateAcDefinitionState(any());
verify(participantSyncPublisher, times(0)).sendSync(any(), any());
- acRuntimeParameterGroup.getParticipantParameters().setMaxStatusWaitMs(-1);
+ acRuntimeParameterGroup.getParticipantParameters().setMaxOperationWaitMs(-1);
acDefinitionScanner = new AcDefinitionScanner(acDefinitionProvider, participantSyncPublisher,
acRuntimeParameterGroup);
acDefinition = createAutomationCompositionDefinition(AcTypeState.PRIMING, StateChangeResult.NO_ERROR);
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2025 Nordix Foundation.
+ * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
var acStateChangePublisher = mock(AutomationCompositionStateChangePublisher.class);
var participantSyncPublisher = mock(ParticipantSyncPublisher.class);
var acRuntimeParameterGroup = CommonTestData.geParameterGroup("dbScanner");
- acRuntimeParameterGroup.getParticipantParameters().setMaxStatusWaitMs(-1);
+ acRuntimeParameterGroup.getParticipantParameters().setMaxOperationWaitMs(-1);
var encryptionUtils = new EncryptionUtils(acRuntimeParameterGroup);
// verify timeout scenario
{
"name": "AutomationCompositionRuntimeGroup",
- "supervisionScannerIntervalSec": 1000,
- "participantAcUpdateIntervalSec": 1000,
- "participantAcStateChangeIntervalSec": 1000,
"participantParameters": {
"heartBeatMs": 120000,
"maxStatusWaitMs": 100000,
- "updateParameters": {
- "maxRetryCount": 1,
- "maxWaitMs": 30000
- }
- },
- "databaseProviderParameters": {
- "name": "PolicyProviderParameterGroup",
- "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl",
- "databaseDriver": "org.h2.Driver",
- "databaseUrl": "${dbName}",
- "databaseUser": "policy",
- "databasePassword": "P01icY",
- "persistenceUnit": "InstantiationTests"
+ "maxOperationWaitMs": 200000
},
"topics":{
"operationTopic": "policy-acruntime-participant",