Replace the index's `-shm` with a FIFO: SQLite's first read then fails with a real SQLITE_IOERR.
(dbPath: string)
| 215 | |
| 216 | /** Replace the index's `-shm` with a FIFO: SQLite's first read then fails with a real SQLITE_IOERR. */ |
| 217 | function breakSharedMemory(dbPath: string): void { |
| 218 | fs.rmSync(`${dbPath}-shm`, { force: true }); |
| 219 | execFileSync('mkfifo', [`${dbPath}-shm`]); |
| 220 | } |
| 221 | |
| 222 | // mkfifo is POSIX-only. |
| 223 | describe.runIf(process.platform !== 'win32')('a real SQLite I/O error on open', () => { |
no outgoing calls
no test coverage detected