Skip to content

Commit 340b394

Browse files
committed
Update cluster.test.ts
1 parent 068a533 commit 340b394

File tree

1 file changed

+38
-30
lines changed

1 file changed

+38
-30
lines changed

storage/valkey/test/cluster.test.ts

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,30 @@ test.it(
4747
},
4848
);
4949

50-
test.it("cluster: getMany should work without CROSSSLOT errors", { retry: 3 }, async (t) => {
51-
const cluster = await createReadyCluster();
52-
const keyv = new KeyvValkey(cluster as Cluster);
50+
test.it(
51+
"cluster: getMany should work without CROSSSLOT errors",
52+
{ retry: 3 },
53+
async (t) => {
54+
const cluster = await createReadyCluster();
55+
const keyv = new KeyvValkey(cluster as Cluster);
5356

54-
const key1 = faker.string.alphanumeric(10);
55-
const key2 = faker.string.alphanumeric(10);
56-
const key3 = faker.string.alphanumeric(10);
57-
const val1 = faker.string.alphanumeric(10);
58-
const val2 = faker.string.alphanumeric(10);
59-
const val3 = faker.string.alphanumeric(10);
57+
const key1 = faker.string.alphanumeric(10);
58+
const key2 = faker.string.alphanumeric(10);
59+
const key3 = faker.string.alphanumeric(10);
60+
const val1 = faker.string.alphanumeric(10);
61+
const val2 = faker.string.alphanumeric(10);
62+
const val3 = faker.string.alphanumeric(10);
6063

61-
await keyv.set(key1, val1);
62-
await keyv.set(key2, val2);
63-
await keyv.set(key3, val3);
64+
await keyv.set(key1, val1);
65+
await keyv.set(key2, val2);
66+
await keyv.set(key3, val3);
6467

65-
const values = await keyv.getMany([key1, key2, key3]);
66-
t.expect(values).toEqual([val1, val2, val3]);
68+
const values = await keyv.getMany([key1, key2, key3]);
69+
t.expect(values).toEqual([val1, val2, val3]);
6770

68-
await keyv.disconnect();
69-
});
71+
await keyv.disconnect();
72+
},
73+
);
7074

7175
test.it(
7276
"cluster: deleteMany should work without CROSSSLOT errors",
@@ -96,21 +100,25 @@ test.it(
96100
},
97101
);
98102

99-
test.it("cluster: hasMany should work without CROSSSLOT errors", { retry: 3 }, async (t) => {
100-
const cluster = await createReadyCluster();
101-
const keyv = new KeyvValkey(cluster as Cluster);
103+
test.it(
104+
"cluster: hasMany should work without CROSSSLOT errors",
105+
{ retry: 3 },
106+
async (t) => {
107+
const cluster = await createReadyCluster();
108+
const keyv = new KeyvValkey(cluster as Cluster);
102109

103-
const key1 = faker.string.alphanumeric(10);
104-
const key2 = faker.string.alphanumeric(10);
105-
const key3 = faker.string.alphanumeric(10);
106-
const val1 = faker.string.alphanumeric(10);
107-
const val2 = faker.string.alphanumeric(10);
110+
const key1 = faker.string.alphanumeric(10);
111+
const key2 = faker.string.alphanumeric(10);
112+
const key3 = faker.string.alphanumeric(10);
113+
const val1 = faker.string.alphanumeric(10);
114+
const val2 = faker.string.alphanumeric(10);
108115

109-
await keyv.set(key1, val1);
110-
await keyv.set(key2, val2);
116+
await keyv.set(key1, val1);
117+
await keyv.set(key2, val2);
111118

112-
const results = await keyv.hasMany([key1, key2, key3]);
113-
t.expect(results).toEqual([true, true, false]);
119+
const results = await keyv.hasMany([key1, key2, key3]);
120+
t.expect(results).toEqual([true, true, false]);
114121

115-
await keyv.disconnect();
116-
});
122+
await keyv.disconnect();
123+
},
124+
);

0 commit comments

Comments
 (0)