Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Connection exception during test execution #66

Open
ksiu opened this issue Jul 24, 2017 · 2 comments
Open

Connection exception during test execution #66

ksiu opened this issue Jul 24, 2017 · 2 comments

Comments

@ksiu
Copy link

ksiu commented Jul 24, 2017

When running a moderate number of tests (e.g. 173), the following exception occurs:
22:02:39 INFO c.s.c.a.c.TestStatusPollerAndResultHandler - Total tests executed 93 , Remaining tests 80
22:02:39 INFO c.s.c.a.c.TestStatusPollerAndResultHandler - Now executing the test class: *** (https:///*** ) Status : Queued
22:04:01 ERROR com.sforce.cd.apexUnit.ApexUnitUtils - Connection exception encountered while executing query :Select Id, ApexClassId, ApexClass.Name, ExtendedStatus, ParentJobId, Status, SystemModstamp, CreatedDate From ApexTestQueueItem Where ParentJobId = '************'

This happens despite that all tests have passed on the server. Re-running the tests doesn't seem to fix it. If it's related to timeout, we need to know how to adjust the timeout to make it reflect the fact that all tests have passed.

@vamshi-sfdc
Copy link
Contributor

Hi @ksiu can you please share the steps on how to reproduce this issue?

@adarsh-ramakrishna-sfdc I do not recall this issuing earlier. Do you think he is missing something?

@adarsh-ramakrishna-sfdc
Copy link
Contributor

@vamshi-sfdc It might be the case of one of the tests taking a long time and connection getting dropped off. We introduced the cli option -max.test.execution.time.threshold to handle this.

@ksiu Can you try adding -max.test.execution.time.threshold cli option and run the tool? I suggest trying with 1-2 minutes.

Here is the description for this cli option:
-max.test.execution.time.threshold : Maximum execution time(in minutes) for a test before it gets aborted

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants