Merge pull request #14142 from Budibase/fix-flake

Fix a flake in the redis.spec.ts file.
This commit is contained in:
Sam Rose 2024-07-11 15:18:50 +01:00 committed by GitHub
commit 109b1eb8ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@ import { GenericContainer, StartedTestContainer } from "testcontainers"
import { generator, structures } from "../../../tests"
import RedisWrapper from "../redis"
import { env } from "../.."
import { randomUUID } from "crypto"
jest.setTimeout(30000)
@ -52,10 +53,10 @@ describe("redis", () => {
describe("bulkStore", () => {
function createRandomObject(
keyLength: number,
valueGenerator: () => any = () => generator.word()
valueGenerator: () => any = () => randomUUID()
) {
return generator
.unique(() => generator.word(), keyLength)
.unique(() => randomUUID(), keyLength)
.reduce((acc, key) => {
acc[key] = valueGenerator()
return acc