Skip to content

Commit 48b0494

Browse files
fix: allow timeouts with --wait
1 parent 9857518 commit 48b0494

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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[],

0 commit comments

Comments
 (0)