Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#2769 closed defect (fixed)

M2: 09 JsonItemStore needs correction in error handling case.

Reported by: guest Owned by: Adam Peller
Priority: high Milestone:
Component: Data Version: 0.9
Keywords: Cc:
Blocked By: Blocking:


The JsonItemStore? implementation has a problem in how it is passing back errors (or lack there of), in one of the async cases. This is easy to correct and a patch will be provided by Jared Jurkiewicz along with updated unit tests.

Will also fix some param ordering to make a few things more consistent and clean up a few trivial things in the UT to make the tests better examples for users to look off of.

-- Jared Jurkiewicz

Attachments (1)

dojo.data_20070423.patch (21.4 KB) - added by Jared Jurkiewicz 15 years ago.
Updated patch with minor tweaks to UT

Download all attachments as: .zip

Change History (7)

comment:1 Changed 15 years ago by Jared Jurkiewicz

I've added a patch that fixes the async unit test error condition testcases. I've also done a small bit of cleanup in the tests such that all params used by the callback functions are declared in the callbacks passed, even if they are not used. This was at request by another developer who said doing so makes the testcases better indicators of how to use the code.

In addition, I have applied the outcome of the 04-16-2007 meeting, which made aminor API change to the loadItem() function definition. This was to handle problems where loadItem would generlaly act in an async manner.

Lastly, I made a minor change to the simpleFetch.js mixin. The change was requested by a developer who is working at implementing another store and suggested this would make the API more consistent. Basically, it was just a params ordering change in the callback handlers used by _fetchItems() as defined by data/simpleFetch.js. All in all, very trivial changes that should hopefully make the API more understandable. This change should not cause any major impacts at this time (As only one store JsonItemStore?), has been officially ported to the 0.9 apis and it has already been updated and tested.

Please review this patch and apply it if you find it acceptable.


-- Jared

Changed 15 years ago by Jared Jurkiewicz

Attachment: dojo.data_20070423.patch added

Updated patch with minor tweaks to UT

comment:2 Changed 15 years ago by Jared Jurkiewicz

Note: Patch was updated to do some minor tweaks to UT. errback should always get passed an error object, so that was updated (couple places I passed false). Also updated to use assertEqual() in comparison between values cases instead of the generic assertTrue().

comment:3 Changed 15 years ago by Adam Peller

Owner: changed from skinner to Adam Peller

comment:4 Changed 15 years ago by Adam Peller

Status: newassigned

comment:5 Changed 15 years ago by Adam Peller

Resolution: fixed
Status: assignedclosed

(In [8247]) Fixes #2769

comment:6 Changed 15 years ago by (none)

Milestone: 0.9M2

Milestone 0.9M2 deleted

Note: See TracTickets for help on using tickets.