Skip to content

Commit 76ddf15

Browse files
committed
chore: force pinging the database, as the provider does not test it
We might be telling the user that they successfully connected to a database and we haven't tested it, failing afterwards. By running the hello command, we verify that the user does indeed connected.
1 parent c042cff commit 76ddf15

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/common/session.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ export class Session extends EventEmitter<SessionEvents> {
122122
proxy: { useEnvironmentVariableProxies: true },
123123
applyProxyToOIDC: true,
124124
});
125+
126+
await this.serviceProvider?.runCommand?.("admin", { hello: 1 });
125127
} catch (error: unknown) {
126128
const message = error instanceof Error ? error.message : `${error}`;
127129
this.emit("connection-error", message);

0 commit comments

Comments
 (0)