Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sf apex get tests hangs for two minutes #5381

Open
cinicola opened this issue Jan 29, 2024 · 10 comments
Open

sf apex get tests hangs for two minutes #5381

cinicola opened this issue Jan 29, 2024 · 10 comments

Comments

@cinicola
Copy link

cinicola commented Jan 29, 2024

Summary

Steps To Reproduce

Get a org with a big number of tests, and run the command:

sf apex get test --test-run-id=707XXXXXXXXX --target-org YourOrgAlias

Expected result

The CLI executes the command, displaying the test results in a few seconds and releases the prompt.

Actual result

The CLI executes the command, displaying the test results in a few seconds, but is keeping the command running for about 2 minutes. After these 2 minutes, the prompt is released.

This behavior is holding up Github Actions running and using limits unnecessarily.

The same problem is ocurring when you ask to run tests:

sf apex test run -l RunLocalTests --target-org YourOrgAlias

The test execution request happens in a few seconds, but the terminal is locked for two minutes.

System Information

I tried to run this commands in PowerShell with the last cli version and in Linux bash *Github Actions( and the behavior is the same.

CLI Version:
@salesforce/cli/2.25.7 win32-x64 node-v20.10.0

Copy link

Hello @cinicola 👋 It looks like you didn't include the full Salesforce CLI version information in your issue.
Please provide the output of version --verbose --json for the CLI you're using (sf or sfdx).

A few more things to check:

  • Make sure you've provided detailed steps to reproduce your issue.
    • A repository that clearly demonstrates the bug is ideal.
  • Make sure you've installed the latest version of Salesforce CLI. (docs)
    • Better yet, try the rc or nightly versions. (docs)
  • Try running the doctor command to diagnose common issues.
  • Search GitHub for existing related issues.

Thank you!

Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@mshanemc
Copy link
Contributor

How many tests do we need to replicate the problem?

@cinicola
Copy link
Author

Hello @mshanemc. The org with the symptom has with 2.700 tests. Other orgs with hundreds of tests I don't have problem.

@cinicola
Copy link
Author

I just uploaded a video showing the issue:

https://www.youtube.com/watch?v=FruBOh_G10w

@mshanemc mshanemc transferred this issue from forcedotcom/cli Jan 29, 2024
@mshanemc
Copy link
Contributor

I transferred this to the VSCode team, who owns the TestService that the apex plugin is calling. I'm wildly speculating that this is related to its use of the StreamingAPI.

#5381

@peternhale
Copy link
Contributor

Thanks @mshanemc
@cinicola I am going to move this over to out primary issues repo.

@peternhale peternhale transferred this issue from forcedotcom/salesforcedx-apex Jan 29, 2024
@luizMoraisBuilders
Copy link

Hi, I have the same issue. Is there any update on this?

@BrunaToledoC
Copy link

Hello everyone! We're having the same time loss here, I'd appreciate receiving updates in this issue please.

@tggagne
Copy link

tggagne commented Nov 5, 2024

I'm noticing this issue in...

@salesforce/cli/2.64.8 linux-x64 node-v18.20.4

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

No branches or pull requests

7 participants