function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Greg RohmanGreg Rohman 

Old triggers with 100% coverage now failing on updated apex class deployment

Hello.

 

I have an apex class on sandbox, with 100% unit test coverage, that I recently modified and am attempting to deploy to production via ANT. When I attempt to deploy this single class, though, I'm getting 0% unit test failures on EVERY one of my existing triggers on production. The existing triggers all have 100% coverage.

 

I tried deploying it via the "Deploy" option under "Setup" and that worked successfully. What would cause the ANT deployment to fail (after having worked for many months) but the Deploy option to succeed?

 

Thanks in advance.

 

-Greg

Greg RohmanGreg Rohman

UPDATE:

 

This has happened to yet another apex class. The first time I attempt to deploy, I get the Request Timeout error pasted below. Subsequent attempts then generate the 0% coverage issue mentioned above.

 

BUILD FAILED
Request timed out.  If this is a large set of metadata components, check that the time allowed by the maxPoll and pollWaitMillis attributes is sufficient.

 

 

Please advise. Thank you.

 

-Greg

Jeremy.NottinghJeremy.Nottingh

For what it's worth, I've noticed something similar happening during Deployment from Eclipse. At some point during the deployment, a box pops up with a message something like, "It's taking a very long time to deploy. Cancel/Continue" If I choose Continue, it will generally succeed after a little while longer. I am not experiencing anything to do with coverage, though.

 

Jeremy

 

 

Going South.ax738Going South.ax738

Do you create records fresh from scratch in test classes or refer to existing records of sandbox?

If not, often times the coverage fails on Fkeys if they are not found. Instead of using existing relationships, try creating all fkey records that you reference and then use their ids after creating them to be part of dummy inserts for other records.

Greg RohmanGreg Rohman

Hello.

 

I'm still encountering this problem. If a deployment (via ANT) times out, any subsequent attempts to deploy (even with increases to MaxPoll and PollWaitMillis) result in a complete failure due to 0% coverage on ALL of my existing triggers/classes.

 

Is there some way to "reset" the connection to the server for deployment?

 

Any help is greatly appreciated.