Merge pull request #14142 from Budibase/fix-flake
Fix a flake in the redis.spec.ts file.
This commit is contained in:
commit
109b1eb8ee
|
@ -2,6 +2,7 @@ import { GenericContainer, StartedTestContainer } from "testcontainers"
|
||||||
import { generator, structures } from "../../../tests"
|
import { generator, structures } from "../../../tests"
|
||||||
import RedisWrapper from "../redis"
|
import RedisWrapper from "../redis"
|
||||||
import { env } from "../.."
|
import { env } from "../.."
|
||||||
|
import { randomUUID } from "crypto"
|
||||||
|
|
||||||
jest.setTimeout(30000)
|
jest.setTimeout(30000)
|
||||||
|
|
||||||
|
@ -52,10 +53,10 @@ describe("redis", () => {
|
||||||
describe("bulkStore", () => {
|
describe("bulkStore", () => {
|
||||||
function createRandomObject(
|
function createRandomObject(
|
||||||
keyLength: number,
|
keyLength: number,
|
||||||
valueGenerator: () => any = () => generator.word()
|
valueGenerator: () => any = () => randomUUID()
|
||||||
) {
|
) {
|
||||||
return generator
|
return generator
|
||||||
.unique(() => generator.word(), keyLength)
|
.unique(() => randomUUID(), keyLength)
|
||||||
.reduce((acc, key) => {
|
.reduce((acc, key) => {
|
||||||
acc[key] = valueGenerator()
|
acc[key] = valueGenerator()
|
||||||
return acc
|
return acc
|
||||||
|
|
Loading…
Reference in New Issue