sfdx force:apex:test:report returns nothing for an AsyncApexJobId with any Aborted ApexClassIds #297
Labels
area:apex
Highlights the apex functional area of the CLI.
owned by another team
The Salesforce CLI team does not own this work but will pass on the information to the correct team.
Summary
Occasionally, on the platform, we run into issues with particular testMethods for an ApexClass running into loops. Therefore, we abort them (via an sfdx plugin we've created) - but any AsyncApexJobId that has Aborted ApexClassIds returns nothing when the report command is run for the AsyncApexJobId.
Steps To Reproduce:
Here's what a snippet of our code looks like:
Expected result
The ApexTestReportCommand should've returned results in json, considering that the test run was Completed.
Actual result
The result returned is
{ status: 0 }
Additional information
I've dug through the code (to salesforce-alm/dist/lib/apex/apexTestApi.js) and noticed this on line 671 under the 'checkProgress' method
and have updated it to be
It looks like it returns the test results successfully now - I know this was intended to be by design, but consider this scenario.
SFDX CLI Version: sfdx-cli/7.42.1 win32-x64 node-v8.11.3
SFDX plugin Version: salesforcedx 47.15.0 (core)
OS and version: Windows 10, Version 1809 (OS Build 17763.973)
The text was updated successfully, but these errors were encountered: