@@ -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
5861Then ( "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
398401Then ( "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