Skip to content

Instantly share code, notes, and snippets.

@capeterson
Last active December 11, 2015 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save capeterson/4541434 to your computer and use it in GitHub Desktop.
Save capeterson/4541434 to your computer and use it in GitHub Desktop.
trigger pointlessSOQL on test_obj__c (before insert) {
List<Contact> randomContact = [SELECT id FROM Contact LIMIT 1];
}
@isTest
private class TestCumulative{
@isTest
private static void cumulativeTest(){
List<test_obj__c> objs = [select id from test_obj__c];
for(integer i = 0; i < 99; i++){
insert new test_obj__c();
}
System.debug(LoggingLevel.Error,'Finished the loop. About to die.');
objs = [select id from test_obj__c];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment