File tree Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,8 @@ export abstract class Connection {
5454
5555 abstract resolveEngineEndpoint ( ) : Promise < string > ;
5656
57+ abstract testConnection ( ) : Promise < void > ;
58+
5759 protected getRequestUrl ( executeQueryOptions : ExecuteQueryOptions ) : string {
5860 const params = this . getBaseParameters ( executeQueryOptions ) ;
5961
Original file line number Diff line number Diff line change @@ -59,4 +59,8 @@ export class ConnectionV1 extends BaseConnection {
5959 }
6060 return this . accountInfo ;
6161 }
62+
63+ async testConnection ( ) {
64+ await this . execute ( "select 1" ) ;
65+ }
6266}
Original file line number Diff line number Diff line change @@ -69,4 +69,9 @@ export class ConnectionV2 extends BaseConnection {
6969
7070 return this . engineEndpoint ;
7171 }
72+
73+ async testConnection ( ) {
74+ const settings = { internal : [ { auto_start_stop_control : "ignore" } ] } ;
75+ await this . execute ( "select 1" , { settings } ) ;
76+ }
7277}
Original file line number Diff line number Diff line change @@ -31,10 +31,6 @@ export class FireboltCore {
3131 const connection = makeConnection ( this . context , connectionOptions ) ;
3232 await auth . authenticate ( ) ;
3333 await connection . resolveEngineEndpoint ( ) ;
34- // auto_start_stop_control is only available for v2
35- const settings = auth . isServiceAccount ( )
36- ? { internal : [ { auto_start_stop_control : "ignore" } ] }
37- : { } ;
38- await connection . execute ( "select 1" , { settings } ) ;
34+ await connection . testConnection ( ) ;
3935 }
4036}
You can’t perform that action at this time.
0 commit comments