Skip to content

Commit fcb3467

Browse files
authored
Merge pull request #422 from salesforcecli/wr/timeoutApex
fix: allow timeouts with --wait
2 parents 9857518 + 6e98a3e commit fcb3467

File tree

3 files changed

+38
-13
lines changed

3 files changed

+38
-13
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"bugs": "https://github.com/forcedotcom/cli/issues",
77
"dependencies": {
88
"@oclif/core": "^3.26.2",
9-
"@salesforce/apex-node": "^5.0.0-beta.0",
9+
"@salesforce/apex-node": "^5.0.0-beta.2",
1010
"@salesforce/core": "^7.0.1",
1111
"@salesforce/kit": "^3.1.0",
1212
"@salesforce/sf-plugins-core": "^9.0.0",

src/commands/apex/run/test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,17 +217,17 @@ export default class Test extends SfCommand<RunCommandResult> {
217217
};
218218

219219
// cast as TestRunIdResult because we're building an async payload which will return an async result
220-
return testService.runTestAsynchronous(
220+
return (await testService.runTestAsynchronous(
221221
payload,
222222
flags['code-coverage'],
223223
flags.wait && flags.wait.minutes > 0 ? false : !(flags.synchronous && !this.jsonEnabled()),
224224
undefined,
225-
this.cancellationTokenSource.token
226-
) as Promise<TestRunIdResult>;
225+
this.cancellationTokenSource.token,
226+
flags.wait
227+
)) as TestRunIdResult;
227228
}
228229
}
229230

230-
// eslint-disable-next-line class-methods-use-this
231231
const validateFlags = async (
232232
classNames?: string[],
233233
suiteNames?: string[],

yarn.lock

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,13 +1625,13 @@
16251625
resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33"
16261626
integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==
16271627

1628-
"@salesforce/apex-node@^5.0.0-beta.0":
1629-
version "5.0.0-beta.0"
1630-
resolved "https://registry.yarnpkg.com/@salesforce/apex-node/-/apex-node-5.0.0-beta.0.tgz#ee3f965180e86a0cbf3d03a1830eed9c0ef974c4"
1631-
integrity sha512-DF9WdxGUqtaixRdV0YDhOlXCLTxaCHa7d2U618Yg6r1V2O4whEX9+wUJ7H6CtZMSsj/EUPAudrpfneMP2u8v0w==
1628+
"@salesforce/apex-node@^5.0.0-beta.2":
1629+
version "5.0.0-beta.2"
1630+
resolved "https://registry.yarnpkg.com/@salesforce/apex-node/-/apex-node-5.0.0-beta.2.tgz#370ddb3e1f5ddcd58f39f350bdbf1aabed85a904"
1631+
integrity sha512-jLQX4tqasxllcjBSC9c6XPErqJwItCW/nWwJu8QPVhAJA3AAGJaom4/RyPSV3McMBH8kYefGsNTDr3snSlI1Hw==
16321632
dependencies:
16331633
"@jsforce/jsforce-node" "^3.1.0"
1634-
"@salesforce/core" "^7.0.0"
1634+
"@salesforce/core" "^7.2.0"
16351635
"@salesforce/kit" "^3.1.0"
16361636
"@types/istanbul-reports" "^3.0.4"
16371637
faye "1.4.0"
@@ -6898,7 +6898,16 @@ srcset@^5.0.0:
68986898
resolved "https://registry.yarnpkg.com/srcset/-/srcset-5.0.0.tgz#9df6c3961b5b44a02532ce6ae4544832609e2e3f"
68996899
integrity sha512-SqEZaAEhe0A6ETEa9O1IhSPC7MdvehZtCnTR0AftXk3QhY2UNgb+NApFOUPZILXk/YTDfFxMTNJOBpzrJsEdIA==
69006900

6901-
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
6901+
"string-width-cjs@npm:string-width@^4.2.0":
6902+
version "4.2.3"
6903+
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
6904+
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
6905+
dependencies:
6906+
emoji-regex "^8.0.0"
6907+
is-fullwidth-code-point "^3.0.0"
6908+
strip-ansi "^6.0.1"
6909+
6910+
string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
69026911
version "4.2.3"
69036912
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
69046913
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -6957,7 +6966,14 @@ string_decoder@~1.1.1:
69576966
dependencies:
69586967
safe-buffer "~5.1.0"
69596968

6960-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", [email protected], strip-ansi@^6.0.0, strip-ansi@^6.0.1:
6969+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
6970+
version "6.0.1"
6971+
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
6972+
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
6973+
dependencies:
6974+
ansi-regex "^5.0.1"
6975+
6976+
[email protected], strip-ansi@^6.0.0, strip-ansi@^6.0.1:
69616977
version "6.0.1"
69626978
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
69636979
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -7495,7 +7511,7 @@ [email protected]:
74957511
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343"
74967512
integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==
74977513

7498-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
7514+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
74997515
version "7.0.0"
75007516
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
75017517
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -7513,6 +7529,15 @@ wrap-ansi@^6.2.0:
75137529
string-width "^4.1.0"
75147530
strip-ansi "^6.0.0"
75157531

7532+
wrap-ansi@^7.0.0:
7533+
version "7.0.0"
7534+
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
7535+
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
7536+
dependencies:
7537+
ansi-styles "^4.0.0"
7538+
string-width "^4.1.0"
7539+
strip-ansi "^6.0.0"
7540+
75167541
wrap-ansi@^8.1.0:
75177542
version "8.1.0"
75187543
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"

0 commit comments

Comments
 (0)