Skip to content

Commit 2bd6572

Browse files
committed
fix
1 parent 1ab2a48 commit 2bd6572

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

bindings/nodejs/tests/binding.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ Given("A new Databend Driver Client", async function () {
5252
assert.fail("No connection returned");
5353
}
5454
this.conn = conn;
55-
conn.exec("set timezone='Asia/Shanghai'");
55+
// Initially no query ID
56+
assert.equal(this.conn.lastQueryId(), null);
57+
58+
await conn.exec("set timezone='Asia/Shanghai'");
5659
});
5760

5861
Then("Select string {string} should be equal to {string}", async function (input, output) {
@@ -142,7 +145,7 @@ Then("Select types should be expected native types", async function () {
142145
// TIMESTAMP
143146
{
144147
const row = await this.conn.queryRow(
145-
"settings(timezone='Asia/Shanghai') SELECT to_datetime('2020-01-01 12:34:56.789'), to_datetime('2020-01-02 12:34:56.789')",
148+
"SELECT to_datetime('2020-01-01 12:34:56.789'), to_datetime('2020-01-02 12:34:56.789')",
146149
);
147150
assert.deepEqual(row.values(), [new Date("2020-01-01T04:34:56.789Z"), new Date("2020-01-02T04:34:56.789Z")]);
148151
}
@@ -396,8 +399,7 @@ Then("Temp table is cleaned up when conn is dropped", async function () {
396399
});
397400

398401
Then("last_query_id should return query ID after execution", async function () {
399-
// Initially no query ID
400-
assert.equal(this.conn.lastQueryId(), null);
402+
401403

402404
// Execute a query
403405
await this.conn.queryRow("SELECT 1");

0 commit comments

Comments
 (0)