Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version check for flaky ClientReconnectTest test #972

Merged
merged 1 commit into from
Jul 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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