Skip to content

Commit 7b7c0e8

Browse files
committed
Functioning test again.
1 parent fe737c4 commit 7b7c0e8

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

packages/wa-sqlite-driver/src/wa-sqlite-driver.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as SQLite from '@journeyapps/wa-sqlite';
22
import SQLiteESMFactory from '@journeyapps/wa-sqlite/dist/wa-sqlite-async.mjs';
3+
// import SQLiteESMFactory from '@journeyapps/wa-sqlite/dist/wa-sqlite.mjs';
34
// import * as SQLite from 'wa-sqlite';
45
// import SQLiteESMFactory from 'wa-sqlite/dist/wa-sqlite-async.mjs';
56
import {

packages/wa-sqlite-driver/src/wa-sqlite-worker.ts

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,18 @@ setupDriverWorker({
1313
if (vfs != null) {
1414
throw new Error('Can only open one connection');
1515
}
16-
// vfs = await OPFSCoopSyncVFS2.create(
17-
// 'test.db',
18-
// module,
19-
// options.readonly ?? false
20-
// );
16+
vfs = await OPFSCoopSyncVFS2.create(
17+
'test.db',
18+
module,
19+
options.readonly ?? false
20+
);
2121
// IDBBatchAtomicVFS - breaks hard (database disk image is malformed)
22-
vfs = await (IDBBatchAtomicVFS0 as any).create('test.db', module);
22+
// vfs = await (IDBBatchAtomicVFS0 as any).create('test.db', module);
2323
// OPFSAdaptiveVFS - works great
2424
// vfs = await (OPFSAdaptiveVFS as any).create('test.db', module, {
2525
// ifAvailable: true,
2626
// mode: 'shared'
2727
// });
28-
// vfs = await (OPFSAdaptiveVFS as any).create('test.db', module, {
29-
// ifAvailable: true,
30-
// mode: 'shared'
31-
// });
3228

3329
// database disk image is malformed
3430
// vfs = await (OPFSPermutedVFS as any).create('test.db', module);
@@ -37,8 +33,8 @@ setupDriverWorker({
3733
sqlite3.vfs_register(vfs as any, true);
3834

3935
const con = await WaSqliteConnection.open(options.path);
40-
using stmt = await con.prepare('PRAGMA busy_timeout = 10000');
41-
await stmt.step();
36+
// using stmt = await con.prepare('PRAGMA busy_timeout = 10000');
37+
// await stmt.step();
4238
return con;
4339
}
4440
});

packages/wa-sqlite-driver/test/src/mptest-runner.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ class MptestRunner {
410410
}
411411
case 'wait': {
412412
const target = command.args[0] ?? 'all';
413-
const timeout = command.args[1] ? Number(command.args[1]) : 30_000;
413+
const timeout = command.args[1] ? Number(command.args[1]) : 120_000;
414414
if (target === 'all') {
415415
await this.waitForAll(timeout);
416416
} else {

0 commit comments

Comments
 (0)