(path: string, marker: string)
| 864 | }; |
| 865 | |
| 866 | const writeLiveWalMarker = async (path: string, marker: string): Promise<void> => { |
| 867 | const client = await openLocalLibsql(path); |
| 868 | // oxlint-disable-next-line executor/no-try-catch-or-throw -- test DB adapter boundary: close the SQLite client even when marker setup fails |
| 869 | try { |
| 870 | await client.execute("PRAGMA journal_mode=WAL"); |
| 871 | await client.execute("PRAGMA wal_autocheckpoint=0"); |
| 872 | await client.execute("CREATE TABLE IF NOT EXISTS wal_marker (id text PRIMARY KEY, value text)"); |
| 873 | await client.execute({ |
| 874 | sql: "INSERT INTO wal_marker (id, value) VALUES (?, ?)", |
| 875 | args: [marker, "x".repeat(4096)], |
| 876 | }); |
| 877 | } finally { |
| 878 | client.close(); |
| 879 | } |
| 880 | expect(sqliteWalSize(path)).toBeGreaterThan(0); |
| 881 | }; |
| 882 | |
| 883 | const assertWalMarkerRows = async (input: { readonly path: string; readonly marker: string }) => { |
| 884 | expect(existsSync(input.path)).toBe(true); |
no test coverage detected