Skip to content

Commit 94abe16

Browse files
committed
test: clean up timezone assertion resources
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
1 parent f397a69 commit 94abe16

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

‎tests/e2e/kernel/execution-e2e.test.ts‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,15 @@ describe('kernel execution end-to-end', function e2eSuite() {
112112
},
113113
});
114114

115-
const operation = await session.executeStatement('SELECT current_timezone() AS timezone', {});
116-
expect(await operation.fetchAll()).to.deep.equal([{ timezone: 'America/Los_Angeles' }]);
117-
await operation.close();
118-
119-
await session.close();
120-
await client.close();
115+
let operation;
116+
try {
117+
operation = await session.executeStatement('SELECT current_timezone() AS timezone', {});
118+
expect(await operation.fetchAll()).to.deep.equal([{ timezone: 'America/Los_Angeles' }]);
119+
} finally {
120+
await operation?.close();
121+
await session.close();
122+
await client.close();
123+
}
121124
});
122125

123126
it('binds ordinary positional parameters through rawParams', async () => {

0 commit comments

Comments
 (0)