Skip really long test in ci

This commit is contained in:
Jacob Karlsson 2024-04-17 12:32:32 +02:00
parent b4190b0ae2
commit f93082f38d
1 changed files with 46 additions and 40 deletions

View File

@ -141,7 +141,10 @@ test('Log deletes', async (t) => {
await p(log.close)()
})
await t.test('Many deleted records', { timeout: 3 * 60e3 }, async (t) => {
await t.test(
'Many deleted records',
{ timeout: 3 * 60e3, skip: !!process.env.CI },
async (t) => {
const file = '/tmp/aaol-test-delete-many' + Date.now() + '.log'
const log = Log(file, { blockSize: 64 * 1024 })
@ -173,9 +176,11 @@ test('Log deletes', async (t) => {
log.scan(
(offset, rec, length) => {
if (i % 2 === 0) {
if (rec !== null) assert.fail('record ' + i + ' should be deleted')
if (rec !== null)
assert.fail('record ' + i + ' should be deleted')
} else {
if (rec === null) assert.fail('record ' + i + ' should be present')
if (rec === null)
assert.fail('record ' + i + ' should be present')
}
i += 1
},
@ -187,5 +192,6 @@ test('Log deletes', async (t) => {
})
await p(log.close)()
})
}
)
})