Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion command-snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"testlevel",
"u"
],
"flagChars": ["c", "d", "l", "n", "o", "r", "s", "t", "v", "w", "y"],
"flagChars": ["c", "d", "i", "l", "n", "o", "r", "s", "t", "v", "w", "y"],
"flags": [
"api-version",
"class-names",
Expand All @@ -78,6 +78,7 @@
"flags-dir",
"json",
"loglevel",
"poll-interval",
"output-dir",
"result-format",
"suite-names",
Expand Down
4 changes: 4 additions & 0 deletions messages/runtest.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,7 @@ Display detailed code coverage per test.
# flags.concise.summary

Display only failed test results; works with human-readable output only.

# flags.poll-interval.summary

Number of seconds to wait between retries.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Salesforce",
"bugs": "https://github.com/forcedotcom/cli/issues",
"dependencies": {
"@salesforce/apex-node": "^8.3.8",
"@salesforce/apex-node": "^8.4.0",
"@salesforce/core": "^8.23.4",
"@salesforce/kit": "^3.2.3",
"@salesforce/sf-plugins-core": "^12.2.5",
Expand Down
6 changes: 6 additions & 0 deletions src/commands/apex/run/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ export default class Test extends SfCommand<RunCommandResult> {
description: messages.getMessage('flags.tests.description'),
exclusive: exclusiveTestSpecifiers.filter((specifier) => specifier !== 'tests'),
}),
'poll-interval': Flags.duration({
unit: 'seconds',
char: 'i',
summary: messages.getMessage('flags.poll-interval.summary'),
min: 1,
}),
// we want to pass `undefined` to the API
// eslint-disable-next-line sf-plugin/flag-min-max-default
wait: Flags.duration({
Expand Down
4 changes: 3 additions & 1 deletion src/shared/TestRunService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export type TestRunFlags = {
'result-format'?: string;
json?: boolean;
'test-category'?: string[];
'poll-interval'?: Duration;
};

export type TestRunConfig = {
Expand Down Expand Up @@ -169,7 +170,8 @@ export class TestRunService {
flags.wait && flags.wait.minutes > 0 ? false : !(flags.synchronous && !flags.json),
undefined,
cancellationToken.token,
flags.wait
flags.wait,
flags['poll-interval']
)) as TestRunIdResult;
} catch (e) {
throw TestRunService.handleTestingServerError(SfError.wrap(e), flags, testLevel, config);
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1508,10 +1508,10 @@
resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8"
integrity sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==

"@salesforce/apex-node@^8.3.8":
version "8.3.8"
resolved "https://registry.yarnpkg.com/@salesforce/apex-node/-/apex-node-8.3.8.tgz#fceda4ebb7cb70813bc377ac2ce1682b288e6567"
integrity sha512-dscXGEMc2+/oh1I8nQRn89wUnzGuyph2cyY1Lu3pNu/wh4ivrwzEm0fNJ3YHylVcOqDtujc8fKIKU0wZlJBddg==
"@salesforce/apex-node@^8.4.0":
version "8.4.0"
resolved "https://registry.yarnpkg.com/@salesforce/apex-node/-/apex-node-8.4.0.tgz#20faa5e7f606f7c0ccb5bd9108415691072f7f84"
integrity sha512-zmXfNodRaE8R3tvjSf93db4V2nz7fXD+G9xEaAjLTR+LajNS84SG0bgdKOmD3PT7DHQdyn4r3OaNObTPg6kBEA==
dependencies:
"@salesforce/core" "^8.23.4"
"@salesforce/kit" "^3.2.4"
Expand Down
Loading