Loading

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

게시 일자: Aug 14, 2023
상세 설명

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

솔루션

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 기사 번호

000396104

 
로드 중
Salesforce Help | Article