-
Notifications
You must be signed in to change notification settings - Fork 53
Avoid assertion in allDocsQuery:options: when a docId isn't found. #207
Avoid assertion in allDocsQuery:options: when a docId isn't found. #207
Conversation
When using `allDocsQuery:options:` with an array of docIds, a missing document will cause an 'Invalid parameter not satisfying: properties' assertion in `[TD_Body initWithProperties:]`.
Could you add a failing test so I can be sure I'm properly understanding the issue at hand? Also, you'll need to complete and send in a CLA before I can accept this. The process is reasonably painless and can be done electronically, see https://github.com/cloudant/CDTDatastore/blob/master/CONTRIBUTING.md#contributor-license-agreement. |
Apologies. I should have checked the requirements beforehand. I've added the tests as requested and have signed the CLA, which I will be emailing shortly. The first test is in @{ @"_id" : @{ @"$in" : @[@"mike12", @"mike34", @"mike72", @"mike-not-found"] } } This method works as expected, fetching 3 documents and ignoring the non-existent document. It doesn't require the change to The other test is in @[docIds[5], docIds[7], docIds[12], docIds[170], @"i_do_not_exist"]; Without the change in this pull-request, this test will fail with an assertion in the @{ @"key": docID, @"error": @"not_found" } To avoid any unintended side-effects, this pull request only checks for the specific case of |
@sdrew thanks for adding those tests, however we have yet to receive your signed CLA. |
@rhyshort @mikerhodes It was sent on October 19th to github@cloudant.com, the email address listed for the organization. Is there another email I should send it to? |
@sdrew it should have been sent to mike.rhodes@uk.ibm.com as per the instructions in the CLA text. |
@sdrew We have your signed CLA, thanks for that :) |
Looks good, merging |
Avoid assertion in allDocsQuery:options: when a docId isn't found.
@sdrew This has been released as part of 0.19.2, thanks for the hard work. |
When using
allDocsQuery:options:
with an array of docIds, a missing document will cause an 'Invalid parameter not satisfying: properties' assertion in[TD_Body initWithProperties:]
.