Skip to content

Commit edd07c8

Browse files
committed
test(sea): update fakes for statementId / sessionId on the napi surface
The cascade commit that surfaced `statementId` on `SeaNativeStatement` and `sessionId` on `SeaNativeConnection` (matching the kernel napi binding's new getters) didn't update the blocking test fakes, breaking compilation. Add the readonly fields to FakeNativeStatement / FakeNativeConnection (execution.test.ts) and FakeNativeStatement / FakeMetadataConnection (metadata.test.ts). The async fakes already carried statementId. Co-authored-by: Isaac Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
1 parent 9dcb28c commit edd07c8

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

tests/unit/sea/execution.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ import { ConnectionOptions } from '../../../lib/contracts/IDBSQLClient';
3838
// -----------------------------------------------------------------------------
3939

4040
class FakeNativeStatement implements SeaNativeStatement {
41+
public readonly statementId = 'fake-statement-id';
42+
4143
public closed = false;
4244

4345
public cancelled = false;
@@ -98,6 +100,8 @@ class FakeNativeAsyncStatement implements SeaNativeAsyncStatement {
98100
}
99101

100102
class FakeNativeConnection implements SeaNativeConnection {
103+
public readonly sessionId = 'fake-session-id';
104+
101105
public closed = false;
102106

103107
public lastSql?: string;

tests/unit/sea/metadata.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import HiveDriverError from '../../../lib/errors/HiveDriverError';
2929
// ─── Fakes ───────────────────────────────────────────────────────────────────
3030

3131
class FakeNativeStatement implements SeaNativeStatement {
32+
public readonly statementId = 'fake-statement-id';
3233
public async fetchNextBatch() { return null; }
3334
public async schema() { return { ipcBytes: Buffer.alloc(0) }; }
3435
public async cancel() {}
@@ -47,6 +48,8 @@ interface RecordedMetadataCall {
4748
* wrapping path.
4849
*/
4950
class FakeMetadataConnection implements SeaNativeConnection {
51+
public readonly sessionId = 'fake-session-id';
52+
5053
public readonly calls: RecordedMetadataCall[] = [];
5154

5255
public throwNextCall: unknown = null;

0 commit comments

Comments
 (0)