Skip to content

Commit

Permalink
chore: deps
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgroshkov committed May 11, 2024
1 parent 098c1b0 commit 5cfcf01
Show file tree
Hide file tree
Showing 2 changed files with 318 additions and 379 deletions.
6 changes: 4 additions & 2 deletions src/test/redis.manual.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { CommonKeyValueDao, CommonKeyValueDaoMemoCache } from '@naturalcycles/db
import { runCommonKeyValueDBTest, TEST_TABLE } from '@naturalcycles/db-lib/dist/testing'
import { runCommonKeyValueDaoTest } from '@naturalcycles/db-lib/dist/testing/keyValueDaoTest'
import { KeyValueDBTuple } from '@naturalcycles/db-lib/src/kv/commonKeyValueDB'
import { _AsyncMemo, _range, localTimeNow, pDelay } from '@naturalcycles/js-lib'
import { _AsyncMemo, _range, localTime, pDelay } from '@naturalcycles/js-lib'
import { RedisClient } from '../redisClient'
import { RedisKeyValueDB } from '../redisKeyValueDB'

Expand Down Expand Up @@ -30,7 +30,9 @@ test('saveBatch with EXAT', async () => {
const testIds = _range(1, 4).map(n => `id${n}`)
const testEntries: KeyValueDBTuple[] = testIds.map(id => [id, Buffer.from(`${id}value`)])

await db.saveBatch(TEST_TABLE, testEntries, { expireAt: localTimeNow().plus(1, 'second').unix() })
await db.saveBatch(TEST_TABLE, testEntries, {
expireAt: localTime.now().plus(1, 'second').unix(),
})
let loaded = await db.getByIds(TEST_TABLE, testIds)
expect(loaded.length).toBe(3)
await pDelay(2000)
Expand Down
Loading

0 comments on commit 5cfcf01

Please sign in to comment.