Repository: olingo-odata4-js Updated Branches: refs/heads/master 5bff25daf -> a822e7f45
[OLINGO-442] fix testcases 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/a822e7f4 Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/tree/a822e7f4 Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/diff/a822e7f4 Branch: refs/heads/master Commit: a822e7f451bb08e491a40c9220b087b3cdd4286f Parents: 5bff25d Author: Sven Kobler <[email protected]> Authored: Thu Feb 26 15:55:54 2015 +0100 Committer: Sven Kobler <[email protected]> Committed: Thu Feb 26 15:55:54 2015 +0100 ---------------------------------------------------------------------- src/lib/store.js | 7 +++-- tests/info.txt | 41 +++++++++++-------------- tests/odata-cache-rx-functional-tests.html | 3 +- tests/odata-cache-rx-functional-tests.js | 28 ++++++++++++----- tests/odata-fuzz.html | 2 +- tests/odatajs-cache-long-haul-tests.html | 6 ++-- 6 files changed, 48 insertions(+), 39 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/a822e7f4/src/lib/store.js ---------------------------------------------------------------------- diff --git a/src/lib/store.js b/src/lib/store.js index 9dd2701..d7e321d 100644 --- a/src/lib/store.js +++ b/src/lib/store.js @@ -50,6 +50,9 @@ exports.createStore = function (name, mechanism) { throw { message: "Failed to create store", name: name, mechanism: mechanism }; }; +exports.DomStore = DomStore = require('./store/dom.js'); +exports.IndexedDBStore = IndexedDBStore = require('./store/indexeddb.js'); +exports.MemoryStore = MemoryStore = require('./store/memory.js'); var mechanisms = { indexeddb: IndexedDBStore, @@ -60,7 +63,5 @@ var mechanisms = { exports.mechanisms = mechanisms; -exports.DomStore = DomStore = require('./store/dom.js'); -exports.IndexedDBStore = IndexedDBStore = require('./store/indexeddb.js'); -exports.MemoryStore = MemoryStore = require('./store/memory.js'); + http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/a822e7f4/tests/info.txt ---------------------------------------------------------------------- diff --git a/tests/info.txt b/tests/info.txt index 094b3d0..6dc015d 100644 --- a/tests/info.txt +++ b/tests/info.txt @@ -1,23 +1,18 @@ - Monday, February 23, 2015 10:44 AM 2,315 odata-batch-functional-tests.html -OK 904 / 904 Monday, February 23, 2015 10:44 AM 2,580 odata-cache-filter-functional-tests.html -OK 12 / 12 Monday, February 23, 2015 10:44 AM 2,406 odata-cache-fperf-tests.html -OK 1062 / 1062 Monday, February 23, 2015 10:44 AM 2,585 odata-cache-functional-tests.html -OK 42 / 42 Monday, February 23, 2015 10:44 AM 2,420 odata-cache-rx-functional-tests.html -?? Monday, February 23, 2015 10:44 AM 34,770 odata-fuzz.html -OK 1 / 1 Monday, February 23, 2015 10:44 AM 3,399 odata-json-parse-tests.html -OK 16 / 16 Monday, February 23, 2015 10:44 AM 2,372 odata-links-functional-tests.html -FAIL 23 / 52 Monday, February 23, 2015 10:44 AM 2,350 odata-metadata-awareness-functional-tests.html - Tests 1-6 OK; Tests 7-27 are using old __metadata -OK 36 / 36 Monday, February 23, 2015 10:44 AM 2,295 odata-perf-tests.html - ->calls to nexflix defect --> removed -FAIL 751 / 763 Monday, February 23, 2015 03:54 PM 3,744 odata-qunit-tests.htm - -> problems with observable and localstoreage -?? 0/ 31 Monday, February 23, 2015 10:44 AM 2,378 odata-read-crossdomain-functional-tests.html - -> calls to odatasampleservices.azurewebsites.net fail -OK 124/124 Monday, February 23, 2015 10:44 AM 2,375 odata-read-functional-tests.html -OK 52/ 52 Monday, February 23, 2015 10:44 AM 2,332 odata-request-functional-tests.html -OK 17/ 18 Monday, February 23, 2015 10:44 AM 2,554 odatajs-cache-large-collection-functional-tests.html - -> one timeout on server side -?? Monday, February 23, 2015 10:44 AM 8,264 odatajs-cache-long-haul-tests.html -OK 1/ 1 Monday, February 23, 2015 10:44 AM 5,359 odatajs-startup-perf-test.html -?? Monday, February 23, 2015 10:44 AM 4,577 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 http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/a822e7f4/tests/odata-cache-rx-functional-tests.html ---------------------------------------------------------------------- diff --git a/tests/odata-cache-rx-functional-tests.html b/tests/odata-cache-rx-functional-tests.html index 48aadb7..839218a 100644 --- a/tests/odata-cache-rx-functional-tests.html +++ b/tests/odata-cache-rx-functional-tests.html @@ -39,7 +39,8 @@ <script type="text/javascript" src="common/djstest.js"></script> <script type="text/javascript" src="common/djstest-browser-ext.js"></script> <script type="text/javascript" src="common/ODataVerifyReader.js"></script> - <script type="text/javascript" src="common/rx.js"></script> + <!--<script type="text/javascript" src="common/rx.js"></script>--> + <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/rxjs/2.3.5/rx.all.js"></script> <script type="text/javascript" src="odata-cache-rx-functional-tests.js"></script> </head> <body> http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/a822e7f4/tests/odata-cache-rx-functional-tests.js ---------------------------------------------------------------------- diff --git a/tests/odata-cache-rx-functional-tests.js b/tests/odata-cache-rx-functional-tests.js index 75dd09a..b2060ba 100644 --- a/tests/odata-cache-rx-functional-tests.js +++ b/tests/odata-cache-rx-functional-tests.js @@ -35,12 +35,24 @@ ]; var operatorTests = [ - function (observable) { return observable.Take(0); }, - function (observable) { return observable.Take(1); }, - function (observable) { return observable.Skip(1); }, - function (observable) { return observable.Skip(2).Take(4); }, - function (observable) { return observable.Select(function (item) { return item.Name; }); }, - function (observable) { return observable.Where(function (item) { return item.FoodID % 2 === 1; }); } + function (observable) { + return observable.take(0); + }, + function (observable) { + return observable.take(1); + }, + function (observable) { + return observable.skip(1); + }, + function (observable) { + return observable.skip(2).take(4); + }, + function (observable) { + return observable.select(function (item) { return item.Name; }); + }, + function (observable) { + return observable.where(function (item) { return item.FoodID % 2 === 1; }); + } ]; /** Asserts two finite observables generate the same sequence @@ -52,7 +64,7 @@ var toArray = function (observable, callback) { var arr = []; - observable.Subscribe( + observable.subscribe( function (item) { arr.push(item); }, function (err) { arr.push({ "__error__": err }); }, function () { callback(arr); }); @@ -77,7 +89,7 @@ var cache = odatajs.cache.createDataCache(options); ODataVerifyReader.readJsonAcrossServerPages(params.feedUri, function (collection) { - assertObservables(params.operator(cache.toObservable()), params.operator(window.Rx.Observable.FromArray(collection.value)), function () { + assertObservables(params.operator(cache.toObservable()), params.operator(window.Rx.Observable.fromArray(collection.value)), function () { djstest.destroyCacheAndDone(cache); }); }); http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/a822e7f4/tests/odata-fuzz.html ---------------------------------------------------------------------- diff --git a/tests/odata-fuzz.html b/tests/odata-fuzz.html index 14199a2..740b31a 100644 --- a/tests/odata-fuzz.html +++ b/tests/odata-fuzz.html @@ -539,7 +539,7 @@ $("#fuzz-status").text(text); } - OData.read("url", readCallback, readCallback, undefined, fakeHttpClient); + odatajs.oData.read("url", readCallback, readCallback, undefined, fakeHttpClient); } $(document).ready(function () { http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/a822e7f4/tests/odatajs-cache-long-haul-tests.html ---------------------------------------------------------------------- diff --git a/tests/odatajs-cache-long-haul-tests.html b/tests/odatajs-cache-long-haul-tests.html index 5983a08..a827d26 100644 --- a/tests/odatajs-cache-long-haul-tests.html +++ b/tests/odatajs-cache-long-haul-tests.html @@ -27,7 +27,7 @@ <meta http-equiv="expires" content="-1" /> <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js"></script> <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.js"></script> - <script type="text/javascript" src="../build/lib/odatajs-latest.js"></script> + <script type="text/javascript" src="../_build/lib/odatajs-latest.js"></script> <script type="text/javascript" src="common/common.js"></script> <script type="text/javascript" src="common/djstest.js"></script> <script type="text/javascript" src="common/djstest-browser-ext.js"></script> @@ -125,8 +125,8 @@ if (inputHours !== undefined && typeof inputHours === "number" && !isNaN(inputHours) && isFinite(inputHours) && inputHours > 0) { goalRunTimeMS = hourMS * inputHours; } - OData.defaultHttpClient.enableJsonpCallback = true; - cache = datajs.cache.createDataCache({ name: "cache" + new Date().valueOf(), source: testFeed, pageSize: 5, prefetchSize: prefetchSize }); + odatajs.oData.net.defaultHttpClient.enableJsonpCallback = true; + cache = odatajs.cache.createDataCache({ name: "cache" + new Date().valueOf(), source: testFeed, pageSize: 5, prefetchSize: prefetchSize }); failureCount = 0; iterationsRun = 0; currentRunTimeMS = 0;
