Skip to content

Commit 3a43479

Browse files
committed
chore: apply oxfmt formatting to clickhouse retry files
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B5mP4ULoVXdrAWmiMQh5bG
1 parent 8833162 commit 3a43479

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

internal-packages/clickhouse/src/client/client.retry.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ describe("isRetryableConnectionError", () => {
196196
});
197197

198198
it("classifies an ECONNRESET substring in the message as retryable", () => {
199-
expect(isRetryableConnectionError(new Error("Unable to query clickhouse: read ECONNRESET"))).toBe(
200-
true
201-
);
199+
expect(
200+
isRetryableConnectionError(new Error("Unable to query clickhouse: read ECONNRESET"))
201+
).toBe(true);
202202
});
203203

204204
it("classifies a wrapped connection error (via cause) as retryable", () => {

internal-packages/clickhouse/src/client/client.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,7 @@ export function isRetryableConnectionError(error: unknown): boolean {
119119
}
120120

121121
/** Full-jitter exponential backoff, bounded by `maxDelayMs`. */
122-
function computeRetryBackoffMs(
123-
attempt: number,
124-
minDelayMs: number,
125-
maxDelayMs: number
126-
): number {
122+
function computeRetryBackoffMs(attempt: number, minDelayMs: number, maxDelayMs: number): number {
127123
if (minDelayMs <= 0) {
128124
return 0;
129125
}
@@ -185,7 +181,10 @@ export class ClickhouseClient implements ClickhouseReader, ClickhouseWriter {
185181
* against dead keep-alive sockets surfacing as `ECONNRESET` on the first use
186182
* of a pooled connection. Server-side errors are re-thrown immediately.
187183
*/
188-
private async queryWithConnectionRetry<T>(operationName: string, fn: () => Promise<T>): Promise<T> {
184+
private async queryWithConnectionRetry<T>(
185+
operationName: string,
186+
fn: () => Promise<T>
187+
): Promise<T> {
189188
const { maxAttempts, minDelayMs, maxDelayMs } = this.connectionRetry;
190189

191190
let attempt = 0;

0 commit comments

Comments
 (0)