Advertisement
Guest User

Untitled

a guest
Jul 24th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. Database.executeBatch(new MyBatch());
  2. Database.executeBatch(new MyBatch());
  3.  
  4. Database.executeBatch(new MyBatch());
  5. Integer start = System.Now().millisecond();
  6. while(System.Now().millisecond()< start+10){
  7. }
  8.  
  9. Database.executeBatch(new MyBatch());
  10.  
  11. MyBatch myBatchObject = new MyBatch();
  12. List<SObject> sObjectList = (List<SObject>)myBatchObject.start(null);
  13. myBatchObject.execute(null, sObjectList);
  14. myBatchObject.finish(null);
  15.  
  16. myBatchObject = new MyBatch();
  17. sObjectList = (List<SObject>)myBatchObject.start(null);
  18. if(sObjectList.size() > 0 ){
  19. System.assert( false, 'Size of sObjectList should not be greater than 0' );
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement