From 49f50144eeef5433a2ff4bb658910939308e7fea Mon Sep 17 00:00:00 2001 From: ptiurin Date: Tue, 4 Nov 2025 09:57:58 +0000 Subject: [PATCH] docs(NoTicket): Add better description to testConnection --- README.md | 2 +- src/connection/connection_v2.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 24b3ac68..5e6c66c5 100644 --- a/README.md +++ b/README.md @@ -292,7 +292,7 @@ Test the connection using the following example script: const firebolt = Firebolt(); await firebolt.testConnection(connectionOptions) ``` -which will perform authentication and a simple `select 1` query +which will perform authentication and a simple `select 1` query. This method is designed to verify the connection end-to-end and will fail if an engine is stopped, even if it's set to auto-start. In order to start a stopped engine with auto-start enabled submit a query via `connection.execute`. ### Engine URL diff --git a/src/connection/connection_v2.ts b/src/connection/connection_v2.ts index e76bfa4a..5e07124b 100644 --- a/src/connection/connection_v2.ts +++ b/src/connection/connection_v2.ts @@ -215,6 +215,8 @@ export class ConnectionV2 extends BaseConnection { } async testConnection() { + // Test the connection without starting the engine + // Will fail if the engine is stopped even with auto-start enabled const settings = { internal: [{ auto_start_stop_control: "ignore" }] }; await this.execute("select 1", { settings }); }