-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v1.7.0 - Improve Memory Management for LDV Full Recalculations (#636)
* Actual fixes for #615 - this time with 100% better memory management! This involves a cutover to Database.Cursor as well as a DataWeave script * Fixes #638 by addressing a classic DST issue in RollupDateLiteral. Slight cleanup of RollupFinalizer and RollupParentResetProcessor
- Loading branch information
1 parent
c67a403
commit 63ed889
Showing
65 changed files
with
2,102 additions
and
501 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,31 @@ | ||
@IsTest | ||
private class RollupFinalizerTests { | ||
@TestSetup | ||
static void setup() { | ||
upsert new RollupSettings__c(IsEnabled__c = true); | ||
insert new Account(Name = RollupFinalizerTests.class.getName()); | ||
public class ExampleFinalizerContext implements System.FinalizerContext { | ||
public Id getAsyncApexJobId() { | ||
return RollupTestUtils.createId(AsyncApexJob.SObjectType); | ||
} | ||
|
||
public String getRequestId() { | ||
return System.Request.getCurrent().getRequestId(); | ||
} | ||
|
||
public ParentJobResult getResult() { | ||
return ParentJobResult.UNHANDLED_EXCEPTION; | ||
} | ||
|
||
public Exception getException() { | ||
return new DmlException(); | ||
} | ||
} | ||
|
||
@IsTest | ||
static void shouldGracefullyLogUnhandledException() { | ||
RollupFinalizer.testResult = ParentJobResult.UNHANDLED_EXCEPTION; | ||
System.FinalizerContext fc = new ExampleFinalizerContext(); | ||
|
||
Test.startTest(); | ||
new RollupFinalizer().execute(null); | ||
new RollupFinalizer().execute(fc); | ||
Test.stopTest(); | ||
|
||
System.assertEquals(true, RollupFinalizer.wasCalled); | ||
System.assertEquals(true, RollupFinalizer.wasExceptionLogged); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.