dxatscale / sfpowerscripts

A build system for modular development in Salesforce
https://dxatscale.io
MIT License
213 stars 96 forks source link

Parallel apex retry doesn't handle error cases: 'Too many concurrent Apex compilations during resource mitigation' & 'LIMIT_EXCEEDED' #1437

Closed jdrbc closed 1 year ago

jdrbc commented 1 year ago

Describe the bug

Parallel apex tests that fail with concurrency errors: 'Too many concurrent Apex compilations during resource mitigation' or 'LIMIT_EXCEEDED' are not retried.

Suggested fix: https://github.com/dxatscale/sfpowerscripts/pull/1436

To Reproduce Steps to reproduce the behavior:

@IsTest
class ParallelTest {
    @IsTest
    static void limitExceeded() {
        System.assert(false, 'LIMIT_EXCEEDED');
    }

    @IsTest
    static void otherError() {
        System.assert(false, 'Too many concurrent Apex compilations during resource mitigation');
    }

    @IsTest
    static void successTest() {
        System.assert(true, 'yes');
    }
}

Expected behavior

Tests are re-run automatically due to concurrency error message.

Screenshots n/a

Platform Details (please complete the following information): n/a

Additional context n/a