Skip to content

Commit e3d6b97

Browse files
committed
tests: Fix Database.close() calls
They're sync
1 parent b508d8c commit e3d6b97

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

integration-tests/tests/async.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ test.serial("errors", async (t) => {
320320

321321
test.serial("Database.prepare() after close()", async (t) => {
322322
const db = t.context.db;
323-
await db.close();
323+
db.close();
324324
await t.throwsAsync(async () => {
325325
await db.prepare("SELECT 1");
326326
}, {
@@ -331,7 +331,7 @@ test.serial("Database.prepare() after close()", async (t) => {
331331

332332
test.serial("Database.exec() after close()", async (t) => {
333333
const db = t.context.db;
334-
await db.close();
334+
db.close();
335335
await t.throwsAsync(async () => {
336336
await db.exec("SELECT 1");
337337
}, {

integration-tests/tests/concurrency.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ test("Concurrent reads", async (t) => {
4444
t.is(typeof result.name, 'string');
4545
t.is(typeof result.email, 'string');
4646
}
47-
await cleanup(t.context);
47+
cleanup(t.context);
4848
});
4949

5050
test("Concurrent writes", async (t) => {
@@ -76,7 +76,7 @@ test("Concurrent writes", async (t) => {
7676
const result = await countStmt.get();
7777
t.is(result.count, 50);
7878

79-
await cleanup(t.context);
79+
cleanup(t.context);
8080
});
8181

8282
test("Concurrent transaction isolation", async (t) => {
@@ -119,7 +119,7 @@ test("Concurrent transaction isolation", async (t) => {
119119
t.truthy(results[0].name.startsWith('Alice'));
120120
t.truthy(results[1].name.startsWith('Bob'));
121121

122-
await cleanup(t.context);
122+
cleanup(t.context);
123123
});
124124

125125
test("Concurrent reads and writes", async (t) => {
@@ -182,8 +182,8 @@ test("Concurrent operations with timeout should handle busy database", async (t)
182182
t.true(elapsed > timeout / 2, "Timeout should be respected");
183183
}
184184

185-
await conn1.close();
186-
await conn2.close();
185+
conn1.close();
186+
conn2.close();
187187
fs.unlinkSync(path);
188188
});
189189

@@ -196,7 +196,7 @@ const connect = async (path_opt, options = {}) => {
196196
};
197197

198198
const cleanup = async (context) => {
199-
await context.db.close();
199+
context.db.close();
200200
fs.unlinkSync(context.path);
201201
};
202202

0 commit comments

Comments
 (0)