Loading

Apex Test Failure due to 'Connection Canceled' seen in UI but not in Deployment

Udgivelsesdato: Aug 21, 2026
Beskrivelse

Customers can sometimes see a difference between the number of Apex test failures when running all tests or a single test via the UI compared to the failure count observed when performing a deployment. A comparison between the differences leads to the conclusion that they can be accounted for by observing 'Connection Canceled' errors in the UI but not in the deployment. Why does this happen?

Løsning

Why This Happens

During deployments, Salesforce does not enforce a fixed Apex test run time limit check, whereas running tests via the UI (either 'Run All Tests' or running a test for an individual class) does enforce this check. In the deployment context, this limit is relaxed. If the differences between the test failures seen in the UI compared to the deployment are solely down to 'Connection Canceled' errors, this is expected behavior — Salesforce intentionally does not perform this hard check during a deployment.

Note: Metadata API Behavior

The same behavior can also be observed when simply running tests outside of a deployment or validation scenario, via the Metadata API. This is also expected behavior.

Vidensartikelnummer

000396102

 
Indlæser
Salesforce Help | Article