Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add developer API to mirror triggerHandler behavior #221

Conversation

jondavis9898
Copy link
Contributor

See Issue #196 and PR #208 for background

When there are no oldRecords or there are no newRecords, change
detection does not need to occur.  Also corrected/updated comments.
RollupService.rollup(new Map<Id, SObject>(children), new Map<Id, SObject>(newAndOldChildren), childType);

// Assert parents are updated
assertParents = new Map<Id, SObject>(Database.query(String.format('select id, {0} from {1}', new List<String>{ aggregateResultField, parentObjectName })));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth checking Limits class before and after have not changed (within expected tolerances) for SOQL and DML usage for super paranoid testing? ;-)

@jondavis9898
Copy link
Contributor Author

Yeah, I covered some Limits assertions in one of the tests but I can definitely add some more. Will throw some in and update PR. Everything else look OK and inline with what you were thinking?

@afawcett
Copy link
Collaborator

Yes for sure, loving it actually, the tests are soooo important for this thing, its gather quite a lot of users, using it in mission critical situations, a regression would not be good! ;-)

@jondavis9898
Copy link
Contributor Author

agreed and yes the library is awesome and seems to have a gained a lot of momentum. Fortunately the changes to existing code path are rather minor but still want to make sure we have all bases covered.

@afawcett
Copy link
Collaborator

Cool, let me know when its ready to merge.

@jondavis9898
Copy link
Contributor Author

Hi @afawcett - In adding in the limit assertions to these tests, I was encountering some unexpected results and have opened #226 and #227. Let me know your thoughts on those and once decided upon, I'll wrap up this PR accordingly. Thanks!

afawcett added a commit that referenced this pull request Aug 26, 2015
…ike-triggerhandler

Add developer API to mirror triggerHandler behavior
@afawcett afawcett merged commit 6a4f011 into SFDO-Community:master Aug 26, 2015
jondavis9898 added a commit to jondavis9898/declarative-lookup-rollup-summaries that referenced this pull request Aug 27, 2015
With governor limits reduced based on fix for isolating master records
that require update, add governor checks to trigger like dev api per
@afawcette comment in PR SFDO-Community#221
@jondavis9898 jondavis9898 deleted the issue196-developer-rollup-like-triggerhandler branch August 27, 2015 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants