summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.appc/src/test
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-03-03 16:54:52 -0500
committerJim Hahn <jrh3@att.com>2020-03-03 16:54:52 -0500
commit958fc6626f14e4101f0101d7c3bc75793aefa754 (patch)
tree5a43f571c41c8ff3e01db633f7f1d1fe6b86e0ab /models-interactions/model-actors/actor.appc/src/test
parent3f06effedc552c31e2608f5b8871301ba5b23033 (diff)
Translate APPC Instant to Long
APPC uses encode Instant fields as milliseconds instead of as ISO date strings. Issue-ID: POLICY-2363 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Id9bedb11c43264f882b6fd044155621c8ccc79f6
Diffstat (limited to 'models-interactions/model-actors/actor.appc/src/test')
-rw-r--r--models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/BasicAppcOperation.java6
-rw-r--r--models-interactions/model-actors/actor.appc/src/test/resources/modifyConfig.json5
2 files changed, 5 insertions, 6 deletions
diff --git a/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/BasicAppcOperation.java b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/BasicAppcOperation.java
index ecba91996..06ad1661d 100644
--- a/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/BasicAppcOperation.java
+++ b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/BasicAppcOperation.java
@@ -35,6 +35,7 @@ import java.util.function.BiConsumer;
import org.onap.policy.appc.Response;
import org.onap.policy.appc.ResponseCode;
import org.onap.policy.appc.ResponseStatus;
+import org.onap.policy.common.utils.coder.StandardCoderInstantAsMillis;
import org.onap.policy.common.utils.coder.StandardCoderObject;
import org.onap.policy.controlloop.actor.test.BasicBidirectionalTopicOperation;
import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
@@ -49,7 +50,7 @@ import org.powermock.reflect.Whitebox;
* Superclass for various operator tests.
*/
public abstract class BasicAppcOperation extends BasicBidirectionalTopicOperation {
- protected static final String[] IGNORE_FIELDS = {"RequestID", "subRequestID", "seconds", "nanos"};
+ protected static final String[] IGNORE_FIELDS = {"RequestID", "subRequestID", "TimeStamp"};
protected static final String MY_DESCRIPTION = "my-description";
protected static final String MY_VNF = "my-vnf";
protected static final String KEY1 = "my-key-A";
@@ -65,7 +66,7 @@ public abstract class BasicAppcOperation extends BasicBidirectionalTopicOperatio
* Constructs the object using a default actor and operation name.
*/
public BasicAppcOperation() {
- super();
+ this.coder = new StandardCoderInstantAsMillis();
}
/**
@@ -76,6 +77,7 @@ public abstract class BasicAppcOperation extends BasicBidirectionalTopicOperatio
*/
public BasicAppcOperation(String actor, String operation) {
super(actor, operation);
+ this.coder = new StandardCoderInstantAsMillis();
}
/**
diff --git a/models-interactions/model-actors/actor.appc/src/test/resources/modifyConfig.json b/models-interactions/model-actors/actor.appc/src/test/resources/modifyConfig.json
index eae6223f1..582e63b7f 100644
--- a/models-interactions/model-actors/actor.appc/src/test/resources/modifyConfig.json
+++ b/models-interactions/model-actors/actor.appc/src/test/resources/modifyConfig.json
@@ -1,9 +1,6 @@
{
"CommonHeader": {
- "TimeStamp": {
- "seconds": 1582057368,
- "nanos": 981593700
- },
+ "TimeStamp": 981593700981,
"APIver": "1.01",
"RequestID": "9a06c485-ebf1-4780-a183-6a1d862eebeb",
"SubRequestID": "2d011587-a311-45e6-a75d-67fcd3dfae1a",