diff options
author | liamfallon <liam.fallon@est.tech> | 2019-07-10 19:44:39 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2019-07-10 19:44:39 +0000 |
commit | adf67497761295115dc75b525500d687518fc4fd (patch) | |
tree | c5c5b5e737ac08256e9f782b5dccbd3ddc08d3c3 /services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/enevent/ApexEvent2EnEventConverter.java | |
parent | 5c384fb2888029c2babb859c30318749e1ce828c (diff) |
Add integration tests for executor properties
Added integration test that sets properties in a dummy plugin and amends
them in tasks in a policy. Variosu tests added to check combinations of
where properties are set in plugins or in tasks or both.
Implementaiton changed to:
- Always pass in a Properies object, the properties object coming into
the policy cannot be null because the task/TSL/SFL may wish to set it
- Fix a bug where the properties were not passed from the ApexEvent to
the engine event in the ApexEventUnmarshaller class
Issue-ID: POLICY-1743
Change-Id: I6aa152b28d46cf3cc6fa56a1a95b76a8e55f5a49
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/enevent/ApexEvent2EnEventConverter.java')
-rw-r--r-- | services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/enevent/ApexEvent2EnEventConverter.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/enevent/ApexEvent2EnEventConverter.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/enevent/ApexEvent2EnEventConverter.java index bd0753d02..14486614c 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/enevent/ApexEvent2EnEventConverter.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/enevent/ApexEvent2EnEventConverter.java @@ -5,15 +5,15 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * + * * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ @@ -84,8 +84,8 @@ public final class ApexEvent2EnEventConverter implements ApexEventConverter { final ApexEvent apexEvent = new ApexEvent(axEvent.getKey().getName(), axEvent.getKey().getVersion(), axEvent.getNameSpace(), axEvent.getSource(), axEvent.getTarget()); - // Copy the ExecutionID from the EnEvent into the ApexEvent apexEvent.setExecutionId(enEvent.getExecutionId()); + apexEvent.setExecutionProperties(enEvent.getExecutionProperties()); // Copy he exception message to the Apex event if it is set if (enEvent.getExceptionMessage() != null) { @@ -126,8 +126,8 @@ public final class ApexEvent2EnEventConverter implements ApexEventConverter { // Set the data on the engine event enEvent.putAll(apexEvent); - // copy the ExecutionID from the ApexEvent into the EnEvent enEvent.setExecutionId(apexEvent.getExecutionId()); + enEvent.setExecutionProperties(apexEvent.getExecutionProperties()); return enEvent; } |