Skip to content

Commit c3be92e

Browse files
committed
Minor fix in ssl tests to properyly ignore when server is not enterprise
1 parent 866e456 commit c3be92e

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

test/ssl/ClientSSLAuthenticationTest.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,12 @@ describe('SSL Client Authentication Test', function () {
9292
describe(title, function () {
9393

9494
before(function () {
95+
markEnterprise(this);
9596
Util.markServerVersionAtLeast(this, null, '3.8.1');
9697
});
9798

9899
afterEach(function () {
99-
return Controller.terminateCluster(cluster.id);
100+
return Controller.shutdownCluster(cluster.id);
100101
});
101102

102103
it('ma:required, they both know each other should connect', function () {

test/ssl/ClientSSLTest.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,32 +49,34 @@ describe("Client with SSL enabled", function () {
4949
return Controller.shutdownCluster(cluster.id);
5050
});
5151

52-
function createCluster() {
53-
return Controller.createCluster(null, serverConfig).then(function (response) {
52+
function createCluster(sConfig) {
53+
return Controller.createCluster(null, sConfig).then(function (response) {
5454
cluster = response;
5555
return Controller.startMember(cluster.id);
5656
});
5757
}
5858

5959
it('should not be able to connect to the server with invalid certificate', function () {
60-
serverConfig = serverConfig.replace('[serverCertificate]', 'com/hazelcast/nio/ssl-mutual-auth/server1.keystore');
61-
serverConfig = serverConfig.replace('[password]', 'password');
62-
return createCluster().then(function () {
60+
var sConfig = serverConfig
61+
.replace('[serverCertificate]', 'com/hazelcast/nio/ssl-mutual-auth/server1.keystore')
62+
.replace('[password]', 'password');
63+
return createCluster(sConfig).then(function () {
6364
var clientConfig = new Config.ClientConfig();
6465
clientConfig.networkConfig.sslConfig.enabled = true;
6566
return expect(HazelcastClient.newHazelcastClient(clientConfig)).to.be.rejectedWith(Errors.IllegalStateError);
6667
})
6768
});
6869

6970
it('should be able to connect to the server with valid certificate', function () {
70-
serverConfig = serverConfig.replace('[serverCertificate]', 'com/hazelcast/nio/ssl/letsencrypt.jks');
71-
serverConfig = serverConfig.replace('[password]', '123456');
72-
return createCluster().then(function () {
71+
var sConfig = serverConfig
72+
.replace('[serverCertificate]', 'com/hazelcast/nio/ssl/letsencrypt.jks')
73+
.replace('[password]', '123456');
74+
return createCluster(sConfig).then(function () {
7375
var clientConfig = new Config.ClientConfig();
7476
clientConfig.networkConfig.sslConfig.enabled = true;
7577
return HazelcastClient.newHazelcastClient(clientConfig);
7678
}).then(function (hazelcastClient) {
77-
client = hazelcastClient
79+
client = hazelcastClient;
7880
return expect(client.lifecycleService.isRunning()).to.be.true;
7981
});
8082
});

test/statistics/StatisticsTest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ describe('Statistics with default period', function () {
107107
}).then(function () {
108108
return map.get('key');
109109
}).then(function () {
110-
return Util.promiseWaitMilliseconds(5000);
110+
return Util.promiseWaitMilliseconds(7000);
111111
}).then(function () {
112112
return getClientStatisticsFromServer(cluster);
113113
}).then(function (stats) {

0 commit comments

Comments
 (0)