You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ko...@apache.org on 2015/02/27 14:24:09 UTC
olingo-odata4-js git commit: [OLINGO-442] fix testcase is cache.js
Repository: olingo-odata4-js
Updated Branches:
refs/heads/master b34559141 -> 8a12d8e7b
[OLINGO-442] fix testcase is cache.js
Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/commit/8a12d8e7
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/tree/8a12d8e7
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/diff/8a12d8e7
Branch: refs/heads/master
Commit: 8a12d8e7b7c7e1236d649fe632a03086b87ef04a
Parents: b345591
Author: Sven Kobler <sv...@sap.com>
Authored: Fri Feb 27 14:24:01 2015 +0100
Committer: Sven Kobler <sv...@sap.com>
Committed: Fri Feb 27 14:24:01 2015 +0100
----------------------------------------------------------------------
src/lib/cache.js | 13 ++++++-------
test/test-demo-scenario.js | 16 ++++++----------
tests/info.txt | 36 ++++++++++++++++++------------------
3 files changed, 30 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/8a12d8e7/src/lib/cache.js
----------------------------------------------------------------------
diff --git a/src/lib/cache.js b/src/lib/cache.js
index 3f39706..da7c35b 100644
--- a/src/lib/cache.js
+++ b/src/lib/cache.js
@@ -244,7 +244,7 @@ function DataCacheOperation(stateMachine, promise, isCancelable, index, count, d
var state = that.s;
if (state !== OPERATION_STATE_ERROR && state !== OPERATION_STATE_END && state !== OPERATION_STATE_CANCEL) {
that.canceled = true;
- transition(OPERATION_STATE_CANCEL, stateData);
+ that.transition(OPERATION_STATE_CANCEL, stateData);
}
};
@@ -254,7 +254,7 @@ function DataCacheOperation(stateMachine, promise, isCancelable, index, count, d
that.complete = function () {
djsassert(that.s !== OPERATION_STATE_END, "DataCacheOperation.complete() - operation is in the end state", that);
- transition(OPERATION_STATE_END, stateData);
+ that.transition(OPERATION_STATE_END, stateData);
};
/** Transitions this operation to the error state.
@@ -264,7 +264,7 @@ function DataCacheOperation(stateMachine, promise, isCancelable, index, count, d
if (!that.canceled) {
djsassert(that.s !== OPERATION_STATE_END, "DataCacheOperation.error() - operation is in the end state", that);
djsassert(that.s !== OPERATION_STATE_ERROR, "DataCacheOperation.error() - operation is in the error state", that);
- transition(OPERATION_STATE_ERROR, err);
+ that.transition(OPERATION_STATE_ERROR, err);
}
};
@@ -284,7 +284,7 @@ function DataCacheOperation(stateMachine, promise, isCancelable, index, count, d
that.wait = function (data) {
djsassert(that.s !== OPERATION_STATE_END, "DataCacheOperation.wait() - operation is in the end state", that);
- transition(OPERATION_STATE_WAIT, data);
+ that.transition(OPERATION_STATE_WAIT, data);
};
/** State machine that describes all operations common behavior.
@@ -312,7 +312,7 @@ function DataCacheOperation(stateMachine, promise, isCancelable, index, count, d
// Cancel state.
stateMachine(that, opTargetState, cacheState, data);
that.fireCanceled();
- transition(OPERATION_STATE_END);
+ that.transition(OPERATION_STATE_END);
break;
case OPERATION_STATE_ERROR:
@@ -320,7 +320,7 @@ function DataCacheOperation(stateMachine, promise, isCancelable, index, count, d
stateMachine(that, opTargetState, cacheState, data);
that.canceled = true;
that.fireRejected(data);
- transition(OPERATION_STATE_END);
+ that.transition(OPERATION_STATE_END);
break;
case OPERATION_STATE_END:
@@ -358,7 +358,6 @@ function DataCacheOperation(stateMachine, promise, isCancelable, index, count, d
* @param {Object} state - State to transition the operation to.
* @param {Object} [data] -
*/
-
that.transition = function (state, data) {
that.s = state;
stateData = data;
http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/8a12d8e7/test/test-demo-scenario.js
----------------------------------------------------------------------
diff --git a/test/test-demo-scenario.js b/test/test-demo-scenario.js
index 9268458..71e37ff 100644
--- a/test/test-demo-scenario.js
+++ b/test/test-demo-scenario.js
@@ -1111,13 +1111,11 @@ var testDataJsonParserMetadataFull = [{
"SpatialData@odata.type": "#GeometryCollection",
"SpatialData": {
"type": "GeometryCollection",
- "geometries": [{"type": "Point", "coordinates": [5, 5], "type@odata.type": "#String"}],
+ "geometries": [{"type": "Point", "coordinates": [5, 5]}],
"crs": {
"type": "name",
- "properties": {"name": "EPSG:4326", "name@odata.type": "#String"},
- "type@odata.type": "#String"
- },
- "type@odata.type": "#String"
+ "properties": {"name": "EPSG:4326"}
+ }
},
"Category@odata.navigationLink": "Foods(0)/Category",
"FoodID@odata.type": "#Int32",
@@ -1421,13 +1419,11 @@ var testDataJsonParserMetadataFull = [{
"SpatialData@odata.type": "#GeometryCollection",
"SpatialData": {
"type": "GeometryCollection",
- "geometries": [{"type": "Point", "coordinates": [5, 5], "type@odata.type": "#String"}],
+ "geometries": [{"type": "Point", "coordinates": [5, 5]}],
"crs": {
"type": "name",
- "properties": {"name": "EPSG:4326", "name@odata.type": "#String"},
- "type@odata.type": "#String"
- },
- "type@odata.type": "#String"
+ "properties": {"name": "EPSG:4326"}
+ }
},
"Category@odata.navigationLink": "Foods(0)/Category",
"FoodID@odata.type": "#Int32",
http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/8a12d8e7/tests/info.txt
----------------------------------------------------------------------
diff --git a/tests/info.txt b/tests/info.txt
index 6dc015d..2b2e21d 100644
--- a/tests/info.txt
+++ b/tests/info.txt
@@ -1,18 +1,18 @@
-FAIL 70 / 75 odata-batch-functional-tests.html
-OK 904 / 904 odata-cache-filter-functional-tests.html
-OK 12 / 12 odata-cache-fperf-tests.html
-OK 1062 / 1062 odata-cache-functional-tests.html
-OK 42 / 42 odata-cache-rx-functional-tests.html
-??OK odata-fuzz.html
-OK 1 / 1 odata-json-parse-tests.html
-OK 16 / 16 odata-links-functional-tests.html
-FAIL 23 / 52 odata-metadata-awareness-functional-tests.html ----> Tests 1-6 OK; Tests 7-27 are using old __metadata
-OK 36 / 36 odata-perf-tests.html ------> calls to nexflix defect --> removed
-OK 975 / 975 odata-qunit-tests.htm
-FAIL 0 / 31 odata-read-crossdomain-functional-tests.html ---->calls to odatasampleservices.azurewebsites.net fail
-OK 124/124 odata-read-functional-tests.html
-OK 52/ 52 odata-request-functional-tests.html
-OK 41/ 42 odatajs-cache-large-collection-functional-tests.html ------> one timeout on server side
-FAIL odatajs-cache-long-haul-tests.html -------> Uses netflix
-OK 1/ 1 odatajs-startup-perf-test.html
-?? test-manager.html
+*FAIL 70 / 75 odata-batch-functional-tests.html
+*OK 904 / 904 odata-cache-filter-functional-tests.html
+*OK 12 / 12 odata-cache-fperf-tests.html
+*OK 1062 / 1062 odata-cache-functional-tests.html
+*OK 42 / 42 odata-cache-rx-functional-tests.html
+*OK odata-fuzz.html
+*OK 1 / 1 odata-json-parse-tests.html
+*OK 16 / 16 odata-links-functional-tests.html
+FAIL 23 / 52 odata-metadata-awareness-functional-tests.html ----> Tests 1-6 OK; Tests 7-27 are using old __metadata
+*OK 36 / 36 odata-perf-tests.html ------> calls to nexflix defect --> removed
+*OK 975 / 975 odata-qunit-tests.htm
+FAIL 0 / 31 odata-read-crossdomain-functional-tests.html ---->calls to odatasampleservices.azurewebsites.net fail
+*OK 124/124 odata-read-functional-tests.html
+*OK 52/ 52 odata-request-functional-tests.html
+*OK 41/ 42 odatajs-cache-large-collection-functional-tests.html ------> one timeout on server side
+FAIL odatajs-cache-long-haul-tests.html -------> Uses netflix
+*OK 1/ 1 odatajs-startup-perf-test.html
+?? test-manager.html