Skip to content

Commit

Permalink
Node: fix pubsub IT by making sure cluster mode tests run only with c…
Browse files Browse the repository at this point in the history
…luster mode enabled flag (#2317)

* Signed-off-by: Yury-Fridlyand <[email protected]>

* Signed-off-by: Yury-Fridlyand <[email protected]>
  • Loading branch information
Yury-Fridlyand authored Sep 19, 2024
1 parent e37308d commit 1c3aa0d
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions node/tests/PubSub.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4018,7 +4018,7 @@ describe("PubSub", () => {
*
* @param clusterMode - Indicates if the test should be run in cluster mode.
*/
it.each([true, false])(
it.each([true])(
"test pubsub numsub and shardnumsub separation_%p",
async (clusterMode) => {
//const clusterMode = false;
Expand Down Expand Up @@ -4070,17 +4070,13 @@ describe("PubSub", () => {
});

// Test pubsubShardnumsub
if (clusterMode) {
const shardSubscribers = await (
client2 as GlideClusterClient
).pubsubShardNumSub([regularChannel, shardChannel]);
expect(
convertGlideRecordToRecord(shardSubscribers),
).toEqual({
[regularChannel]: 0,
[shardChannel]: 2,
});
}
const shardSubscribers = await (
client2 as GlideClusterClient
).pubsubShardNumSub([regularChannel, shardChannel]);
expect(convertGlideRecordToRecord(shardSubscribers)).toEqual({
[regularChannel]: 0,
[shardChannel]: 2,
});
} finally {
if (client1) {
await clientCleanup(client1, pubSub!);
Expand Down

0 comments on commit 1c3aa0d

Please sign in to comment.