Skip to content

Commit

Permalink
Add version check for flaky test (#972)
Browse files Browse the repository at this point in the history
  • Loading branch information
srknzl committed Jul 14, 2021
1 parent e9d70e7 commit 2163d2e
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions test/integration/backward_compatible/ClientReconnectTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
const { expect } = require('chai');
const RC = require('../RC');
const { Client } = require('../../../');
const { markClientVersionAtLeast } = require('../../TestUtil');

/**
* Basic tests for reconnection to cluster scenarios.
Expand All @@ -27,9 +28,18 @@ describe('ClientReconnectTest', function () {
let cluster;
let client;

beforeEach(function () {
client = undefined;
cluster = undefined;
});

afterEach(async function () {
await client.shutdown();
await RC.terminateCluster(cluster.id);
if (client) {
await client.shutdown();
}
if (cluster) {
await RC.terminateCluster(cluster.id);
}
});

it('member restarts, while map.put in progress', async function () {
Expand Down Expand Up @@ -80,6 +90,9 @@ describe('ClientReconnectTest', function () {
});

it('create proxy while member is down, member comes back', async function () {
// Before https://github.com/hazelcast/hazelcast-nodejs-client/pull/704, this test is flaky.
// https://github.com/hazelcast/hazelcast-nodejs-client/issues/658#issuecomment-868970776
markClientVersionAtLeast(this, '4.0.2');
cluster = await RC.createCluster(null, null);
const member = await RC.startMember(cluster.id);
client = await Client.newHazelcastClient({
Expand Down

0 comments on commit 2163d2e

Please sign in to comment.