Loading

Apex Test method initially show 'Pass' and then fail with 'Connection Canceled'

Publiseringsdato: Aug 14, 2023
Beskrivelse

Customers can sometimes see Apex Test failure when running a single test class via the UI. In the test result table, initially, the corresponding Test Class method status shows 'Pass' then it will show as 'Failed' with a 'connection canceled' error message

Løsning

This is working as designed. If the test class execution is successful as per code logic, it will be initially marked as successful. But if the whole text execution takes too long to commit, it will eventually fail with an error message 'connection canceled'. One can try to optimize test class logic to overcome this.

Knowledge-artikkelnummer

000396104

 
Laster
Salesforce Help | Article