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.

ナレッジ記事番号

000396104

 
読み込み中
Salesforce Help | Article