Skip to content

Commit 5b31baf

Browse files
committed
feat(FIR-37168): testConnection doesn't reset autostop timer
1 parent 3cf1284 commit 5b31baf

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/core/index.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import { makeConnection } from "../connection";
22
import { Authenticator } from "../auth";
3-
import { Context, ConnectionOptions, FireboltClientOptions } from "../types";
3+
import {
4+
Context,
5+
ConnectionOptions,
6+
FireboltClientOptions,
7+
SettingValues
8+
} from "../types";
49
import { ResourceManager } from "../service";
510

611
export class FireboltCore {
@@ -31,6 +36,8 @@ export class FireboltCore {
3136
const connection = makeConnection(this.context, connectionOptions);
3237
await auth.authenticate();
3338
await connection.resolveEngineEndpoint();
34-
await connection.execute("select 1");
39+
await connection.execute("select 1", {
40+
settings: { auto_start_stop_control: SettingValues.IGNORE }
41+
});
3542
}
3643
}

src/types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,16 @@ export enum OutputFormat {
2929
JSON = "JSON"
3030
}
3131

32+
export enum SettingValues {
33+
IGNORE = "ignore"
34+
}
35+
3236
export type QuerySettings = Record<
3337
string,
3438
string | number | boolean | undefined
3539
> & {
3640
output_format?: OutputFormat;
41+
auto_start_stop_control?: SettingValues;
3742
};
3843

3944
export type RowParser = (row: string, isLastRow: boolean) => any;

0 commit comments

Comments
 (0)