question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Same Command Different Outcomes

See original GitHub issue

Summary

Running sfdx force:apex:test:run -l RunLocalTests -u ${username} --json in CI/CD waits for all tests to finish, running locally on mac/windows it returns immediately with the test run id

Steps To Reproduce:

  1. Run sfdx force:apex:test:run -l RunLocalTests -u ${username} --json in Windows or Mac
  2. Get back something also immediately akin too
{
  "status": 0,
  "result": {
    "testRunId": "7071100002CE9yl"
  }
}
  1. Run same command in Github Actions using Ubuntu image.
  2. No immediate response is given and it provides the final report an hour later
undefined undefined
,{
  "status": 0,
  "result": {
    "summary": {
      "outcome": "Passed",
      "testsRan": 2000,
      "passing": 2000,
      "failing": 0,
      "skipped": 0,
      "passRate": "100%",
      "failRate": "0%",
      "testStartTime": "Mon Apr 12 2021 12:05:34 PM",
      "testExecutionTime": "869706 ms",
      "testTotalTime": "869706 ms",
      "commandTime": "1222 ms",
      "hostname": "xxxxxxxxxxxxxxxxx",
      "orgId": "xxxxxxxxxxxxxxxx",
      "username": "xxxxxxxxxxxxxx",
      "testRunId": "707S000001hpUdZ",
      "userId": "00550000007aWbzAAE"
    },
   // cut off for brevity

Expected result

Returns immediately with Test Report ID

Actual result

Only for CI/CD it long tails, the rest give immediate response

Additional information

SFDX CLI Version(to find the version of the CLI engine run sfdx --version): Locally: 7.94.3-a4e7c7955b Remotely: 7.96.0-633fe15

OS and version: Tested on Mac/Windows locally and tested on ubuntu-latest in github actions

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
MGarfOppLoanscommented, Oct 25, 2021

no longer running into the issue

1reaction
MGarfOppLoanscommented, May 4, 2021

That’s locally, I’ll get the other. Just need to run the command in my ci/cd

Read more comments on GitHub >

github_iconTop Results From Across the Web

Same command sequence produces different results in ...
bash - Same command sequence produces different results in command-line and script - Unix & Linux Stack Exchange. Stack Overflow for Teams – ......
Read more >
Same command; different outcomes - AutoIt General Help and Support
When the "control system" command is executed, however (which again, runs fine from Run box), the new window appears when the main window...
Read more >
Same commands, different results - linux - Stack Overflow
I run same commands on my terminal command line, but get different results. Following lines are copied-pasted from my bash terminal windows:
Read more >
Same script opened in three different ways produces three ...
So, I have two questions: Why are the outputs for the above commands different though they are running the same script? sh produces...
Read more >
Overloaded vs. Generic Commands - Nielsen Norman Group
Overloaded commands use variants of the same command to achieve different outcomes — sometimes depending on the context and other times ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found