Skip to content

Commit

Permalink
fix: --max-backoff accepts seconds, not ms (#588)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrodewig authored Feb 7, 2025
1 parent 49016eb commit 37fbe45
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/lib/options.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export const QUERY_OPTIONS = {
"max-backoff": {
type: "number",
description:
"Maximum backoff time (in milliseconds) between retry attempts. Only applies to v10 queries.",
"Maximum backoff time, in seconds, between retry attempts. Only applies to v10 queries.",
default: undefined,
group: "API:",
},
Expand Down
4 changes: 2 additions & 2 deletions test/commands/query/v10.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ describe("query v10", function () {

it("can set various query options", async function () {
await run(
`query "Database.all()" --secret=foo --typecheck --performance-hints --max-attempts 5 --max-backoff 2000 --timeout 10000 --max-contention-retries 3`,
`query "Database.all()" --secret=foo --typecheck --performance-hints --max-attempts 5 --max-backoff 2 --timeout 10000 --max-contention-retries 3`,
container,
);

Expand All @@ -135,7 +135,7 @@ describe("query v10", function () {
typecheck: true,
performanceHints: true,
maxAttempts: 5,
maxBackoff: 2000,
maxBackoff: 2,
maxContentionRetries: 3,
}),
);
Expand Down
4 changes: 2 additions & 2 deletions test/commands/shell.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ describe("shell", function () {
let query = "Database.all().take(1)";

const runPromise = run(
"shell --secret=foo --typecheck --performance-hints --max-attempts 5 --max-backoff 2000 --timeout 10000 --max-contention-retries 3",
"shell --secret=foo --typecheck --performance-hints --max-attempts 5 --max-backoff 2 --timeout 10000 --max-contention-retries 3",
container,
);

Expand All @@ -359,7 +359,7 @@ describe("shell", function () {
typecheck: true,
performanceHints: true,
maxAttempts: 5,
maxBackoff: 2000,
maxBackoff: 2,
maxContentionRetries: 3,
}),
);
Expand Down

0 comments on commit 37fbe45

Please sign in to comment.