Skip to content

Commit 81465a6

Browse files
committed
Fix the test.
1 parent b82f30a commit 81465a6

File tree

8 files changed

+9
-10
lines changed

8 files changed

+9
-10
lines changed

packages/driver/src/util/SingleConnectionPool.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export class SingleConnectionPool implements SqliteDriverConnectionPool {
2929
async reserveConnection(
3030
options?: ReserveConnectionOptions
3131
): Promise<ReservedConnection> {
32-
console.log('single reserveConnection', this.connection.lock);
3332
if (options?.signal?.aborted) {
3433
throw new Error('Aborted');
3534
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ export class OPFSCoopSyncVFS2 extends FacadeVFS {
6262
mapIdToFile = new Map<number, File>();
6363

6464
lastError = null;
65-
// log = null; //function(...args) { console.log(`[${contextName}]`, ...args) };
66-
log = function (...args) {
67-
console.log(`[OPFSCoopSyncVFS2]`, ...args);
68-
};
65+
log = null;
66+
// log = function (...args) {
67+
// console.log(`[OPFSCoopSyncVFS2]`, ...args);
68+
// };
6969

7070
persistentFiles = new Map<string, PersistentFile>();
7171
boundAccessHandles = new Map<string, FileSystemSyncAccessHandle>();

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ export function waSqliteWorkerPool(path: string): SqliteDriverConnectionPool {
3838
async openConnection(
3939
options?: ReserveConnectionOptions & { connectionName?: string }
4040
): Promise<SqliteDriverConnection> {
41-
console.log('openConnection', options);
4241
const connection = new WorkerDriverConnection(
4342
new Worker(new URL('./wa-sqlite-worker.js', import.meta.url), {
4443
type: 'module'

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ setupDriverWorker({
99
if (vfs != null) {
1010
throw new Error('Can only open one connection');
1111
}
12-
console.log('open', options);
1312
vfs = await OPFSCoopSyncVFS2.create(
1413
'test.db',
1514
module,

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ export function setupDriverPort(config: WorkerDriverConfig) {
2727
const listener = async (value: any) => {
2828
const [message, id, args] = value.data;
2929

30-
console.log('received', message, id, args);
31-
3230
if (message == 'open') {
3331
const open = new Deferred<void>();
3432
opened = open.promise;

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ export class WorkerDriverConnection implements SqliteDriverConnection {
117117
this._maybeFlush();
118118
}
119119

120+
log(...args: any[]) {
121+
console.log(this.options.path, this.options.connectionName, ...args);
122+
}
123+
120124
private registerCallback(callback: (value: any) => void) {
121125
const id = this.nextCallbackId++;
122126
this.callbacks.set(id, callback);

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,6 @@ describe('concurrency tests', () => {
8383
})();
8484
promises.push(p);
8585
}
86+
await Promise.all(promises);
8687
});
8788
});

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ describeDriverTests(
55
'wa-sqlite',
66
{ getColumns: true, rawResults: true, allowsMissingParameters: false },
77
async (path) => {
8-
console.log('open', path);
98
return waSqliteSingleWorker(path);
109
}
1110
);

0 commit comments

Comments
 (0)