aboutsummaryrefslogtreecommitdiffstats
path: root/testsuites/integration/integration-common/src/main/resources/org
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2020-03-02 17:08:47 +0000
committerliamfallon <liam.fallon@est.tech>2020-03-04 08:33:25 +0000
commit9e5c4b882728ebf3330568d068f109965d599410 (patch)
tree8ad948a28268b50b97946168b7a8ceab54872dc5 /testsuites/integration/integration-common/src/main/resources/org
parent5922128637471bfa1897b8808561000988da733d (diff)
Preparing integration tests for Graal Javascript
Graal enforces Javascript more strictly than Nashorn does. This review changes the tests in apex-pdp to comply with the stricter -Javascript checking, re-enabling the integration test module. - All log calls must be passed as strings, using toString() - Byte/Float/Long Java types not supported in Javascript Disable integration tests so that other changes can be brought in. JMS integration test is disabled for now, it will be re-enabled in a review shortly. Issue-ID: POLICY-2106 Change-Id: I14bdb930eff735e862b51802cf72e4793cec3699 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'testsuites/integration/integration-common/src/main/resources/org')
-rw-r--r--testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/DefaultStateLogic.javascript7
-rw-r--r--testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/DefaultTaskLogic.javascript9
-rw-r--r--testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/EvalStateLogic.javascript3
-rw-r--r--testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/EvalTaskLogic.javascript7
4 files changed, 15 insertions, 11 deletions
diff --git a/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/DefaultStateLogic.javascript b/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/DefaultStateLogic.javascript
index e25cb9c6e..a3f1525d0 100644
--- a/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/DefaultStateLogic.javascript
+++ b/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/DefaultStateLogic.javascript
@@ -1,6 +1,7 @@
/*
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,10 +19,10 @@
* ============LICENSE_END=========================================================
*/
-executor.logger.debug(executor.subject.id);
+executor.logger.debug(executor.subject.getId());
var gc = executor.getContextAlbum("GlobalContextAlbum");
-executor.logger.debug(gc.name);
-executor.subject.defaultTaskKey.copyTo(executor.selectedTask)
+executor.logger.debug(gc.getName());
+executor.getSubject().getDefaultTaskKey().copyTo(executor.selectedTask);
var returnValue = executor.isTrue;
diff --git a/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/DefaultTaskLogic.javascript b/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/DefaultTaskLogic.javascript
index 158e49eea..36fd2c4a2 100644
--- a/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/DefaultTaskLogic.javascript
+++ b/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/DefaultTaskLogic.javascript
@@ -1,6 +1,7 @@
/*
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,15 +19,15 @@
* ============LICENSE_END=========================================================
*/
-executor.logger.debug(executor.subject.id);
+executor.logger.debug(executor.subject.getId());
var gc = executor.getContextAlbum("GlobalContextAlbum");
-executor.logger.debug(gc.name);
-executor.logger.debug(executor.inFields);
+executor.logger.debug(gc.getName());
+executor.logger.debug(executor.inFields.get("TestSlogan"));
var caseSelectedType = Java.type("java.lang.Byte");
executor.outFields.put("Test<STATE_NAME>CaseSelected", new caseSelectedType(<RANDOM_BYTE_VALUE>));
executor.outFields.put("Test<STATE_NAME>StateTime", java.lang.System.nanoTime());
-executor.logger.debug(executor.eo);
+executor.logger.debug(executor.inFields.get("TestSlogan"));
var returnValue = executor.isTrue;
diff --git a/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/EvalStateLogic.javascript b/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/EvalStateLogic.javascript
index 535cad595..5ee2a0448 100644
--- a/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/EvalStateLogic.javascript
+++ b/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/EvalStateLogic.javascript
@@ -1,6 +1,7 @@
/*
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +19,7 @@
* ============LICENSE_END=========================================================
*/
-executor.logger.debug(executor.subject.id);
+executor.logger.debug(executor.subject.getId());
executor.subject.defaultTaskKey.copyTo(executor.selectedTask);
var returnValue = executor.isTrue;
diff --git a/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/EvalTaskLogic.javascript b/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/EvalTaskLogic.javascript
index efbe5cb4d..b29e96fcf 100644
--- a/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/EvalTaskLogic.javascript
+++ b/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/EvalTaskLogic.javascript
@@ -1,6 +1,7 @@
/*
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,10 +19,10 @@
* ============LICENSE_END=========================================================
*/
-executor.logger.debug(executor.subject.id);
-executor.logger.debug(executor.inFields);
+executor.logger.debug(executor.subject.getId());
+executor.logger.debug(executor.inFields.get("name"));
executor.outFields.put("State<STATE_NUMBER>Timestamp", java.lang.System.nanoTime());
-executor.logger.debug(executor.outFields);
+executor.logger.debug(executor.outFields.get("name"));
var returnValue = executor.isTrue;