infinispan 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@
5
5
  * Actually used range is: [4400 .. 4403] *
6
6
  *********************************************************************************************************************/
7
7
  syntax = "proto2";
8
- import "Protos/message-wrapping.proto";
8
+ import "message-wrapping.proto";
9
9
 
10
10
  package org.infinispan.query.remote.client;
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "infinispan",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Infinispan Javascript client",
5
5
  "main": "index",
6
6
  "typings": "./types",
@@ -30,13 +30,12 @@
30
30
  "buffer-xor": "^2.0.2",
31
31
  "log4js": "^6.4.6",
32
32
  "protobufjs": "^7.0.0",
33
- "underscore": "^1.13.3"
33
+ "underscore": "^1.13.3",
34
+ "urllib": "^3.23.0"
34
35
  },
35
36
  "devDependencies": {
36
37
  "eslint": "^8.26.0",
37
- "growl": "^1.10.5",
38
- "jasmine-node": "^3.0.0",
39
- "jsdoc": "^3.6.10",
40
- "request": "^2.88.0"
38
+ "jasmine-node": "^1.16.0",
39
+ "long": "^5.2.3"
41
40
  }
42
41
  }
package/run-servers.sh CHANGED
@@ -9,7 +9,7 @@ else
9
9
  fi
10
10
 
11
11
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
12
- SERVER_VERSION="${SERVER_VERSION:-"13.0.0.Final"}"
12
+ SERVER_VERSION="${SERVER_VERSION:-"14.0.27.Final"}"
13
13
  SERVER_HOME=${SCRIPT_DIR}/server/original-server
14
14
  SERVER_ZIP=${SCRIPT_DIR}/server/${SERVER_VERSION}.zip
15
15
  CLUSTER_SIZE_MAIN="$SERVER_HOME/bin/cli.sh -c http://admin:pass@localhost:11322 -f batch "
@@ -30,6 +30,7 @@ EOF
30
30
  MEMBERS_MAIN=''
31
31
  while [ "$MEMBERS_MAIN" != '3' ];
32
32
  do
33
+ echo $CLUSTER_SIZE_MAIN
33
34
  MEMBERS_MAIN=$($CLUSTER_SIZE_MAIN | grep cluster_size | cut -d':' -f2 | sed 's/.$//' | sed -e 's/^[[:space:]]*//')
34
35
  echo "Waiting for clusters to form (main: $MEMBERS_MAIN)"
35
36
  sleep 20
@@ -78,6 +79,18 @@ function prepareServerDir()
78
79
 
79
80
  echo "Infinispan configuration file ${confPath} copied to server ${dirName}."
80
81
 
82
+ #Installing nashorn engine before server startup
83
+ # If java > 15
84
+ if [ $(javap -verbose java.lang.String | grep "major version" | cut -d " " -f5) -ge 60 ]; then
85
+ mkdir -p ${SERVER_TMP}/${dirName}/lib
86
+ ${SERVER_TMP}/bin/cli.sh install org.openjdk.nashorn:nashorn-core:15.4 --server-root=${dirName}
87
+ ${SERVER_TMP}/bin/cli.sh install org.ow2.asm:asm:9.4 --server-root=${dirName}
88
+ ${SERVER_TMP}/bin/cli.sh install org.ow2.asm:asm-commons:9.4 --server-root=${dirName}
89
+ ${SERVER_TMP}/bin/cli.sh install org.ow2.asm:asm-tree:9.4 --server-root=${dirName}
90
+ ${SERVER_TMP}/bin/cli.sh install org.ow2.asm:asm-util:9.4 --server-root=${dirName}
91
+ echo Nashorn script engine installed for ${dirName}
92
+ fi
93
+
81
94
  if [[ ${isSsl} = "true" && ${IS_SSL_PROCESSED} = 0 ]]; then
82
95
  ./make-ssl.sh
83
96
  echo "Generate TLS/SSL certificates"
@@ -112,6 +125,8 @@ function startServer()
112
125
  portStr="-p ${port}"
113
126
  fi
114
127
 
128
+ echo 'Cleaning data dir in '$SERVER_TMP''
129
+ rm -rf $SERVER_TMP/data/*
115
130
  echo 'Run server '$nodeName' in '$SERVER_TMP''
116
131
 
117
132
  if [[ ${isCi} = "--ci" ]]; then
@@ -6,7 +6,7 @@
6
6
  xmlns:server="urn:infinispan:server:12.0">
7
7
 
8
8
  <cache-container>
9
- <transport cluster="${infinispan.cluster.name}" stack="${infinispan.cluster.stack:tcp}"/>
9
+ <transport cluster="${infinispan.cluster.name:cluster}" stack="${infinispan.cluster.stack:tcp}"/>
10
10
  </cache-container>
11
11
 
12
12
  <server xmlns="urn:infinispan:server:12.0">
@@ -28,7 +28,7 @@
28
28
  <!-- server-identities>
29
29
  <ssl>
30
30
  <keystore path="application.keystore" relative-to="infinispan.server.config.path"
31
- keystore-password="password" alias="server" key-password="password"
31
+ password="password" alias="server" key-password="password"
32
32
  generate-self-signed-certificate-host="localhost"/>
33
33
  </ssl>
34
34
  </server-identities-->
@@ -52,4 +52,4 @@
52
52
  <!-- memcached-connector socket-binding="memcached" / -->
53
53
  </endpoints>
54
54
  </server>
55
- </infinispan>
55
+ </infinispan>
@@ -9,7 +9,7 @@
9
9
  <!-- <security>-->
10
10
  <!-- <authorization/>-->
11
11
  <!-- </security>-->
12
- <transport cluster="${infinispan.cluster.name}" stack="${infinispan.cluster.stack:tcp}" node-name="${infinispan.node.name:}"/>
12
+ <transport cluster="${infinispan.cluster.name:cluster}" stack="${infinispan.cluster.stack:tcp}" node-name="${infinispan.node.name:}"/>
13
13
  <!--<global-state/>-->
14
14
  <metrics accurate-size="true"/>
15
15
  <distributed-cache name="default" segments="20" remote-timeout="30000">
@@ -36,7 +36,7 @@
36
36
  <!-- server-identities>
37
37
  <ssl>
38
38
  <keystore path="application.keystore" relative-to="infinispan.server.config.path"
39
- keystore-password="password" alias="server" key-password="password"
39
+ password="password" alias="server" key-password="password"
40
40
  generate-self-signed-certificate-host="localhost"/>
41
41
  </ssl>
42
42
  </server-identities-->
@@ -46,7 +46,7 @@
46
46
  <security-realm name="default">
47
47
  <server-identities>
48
48
  <ssl>
49
- <keystore path="server.p12" keystore-password="secret" alias="server"/>
49
+ <keystore path="server.p12" password="secret" alias="server"/>
50
50
  </ssl>
51
51
  </server-identities>
52
52
  <properties-realm groups-attribute="Roles">
@@ -57,33 +57,33 @@
57
57
  <security-realm name="client-cert">
58
58
  <server-identities>
59
59
  <ssl>
60
- <keystore path="server.p12" keystore-password="secret" alias="server"/>
60
+ <keystore path="server.p12" password="secret" alias="server"/>
61
61
  </ssl>
62
62
  </server-identities>
63
63
  <properties-realm groups-attribute="Roles">
64
64
  <user-properties path="users.properties"/>
65
65
  <group-properties path="groups.properties"/>
66
66
  </properties-realm>
67
- <!--truststore-realm path="client.p12" keystore-password="secret"/-->
67
+ <!--truststore-realm path="client.p12" password="secret"/-->
68
68
  </security-realm>
69
69
  <security-realm name="Trust1Realm">
70
70
  <server-identities>
71
71
  <ssl>
72
- <keystore path="trust1.p12" keystore-password="secret"/>
72
+ <keystore path="trust1.p12" password="secret"/>
73
73
  </ssl>
74
74
  </server-identities>
75
75
  </security-realm>
76
76
  <security-realm name="Trust2Realm">
77
77
  <server-identities>
78
78
  <ssl>
79
- <keystore path="trust2.p12" keystore-password="secret"/>
79
+ <keystore path="trust2.p12" password="secret"/>
80
80
  </ssl>
81
81
  </server-identities>
82
82
  </security-realm>
83
83
  <security-realm name="UntrustRealm">
84
84
  <server-identities>
85
85
  <ssl>
86
- <keystore path="untrust.p12" keystore-password="secret"/>
86
+ <keystore path="untrust.p12" password="secret"/>
87
87
  </ssl>
88
88
  </server-identities>
89
89
  </security-realm>
@@ -19,9 +19,7 @@
19
19
  mcast_recv_buf_size="25m"
20
20
  ip_ttl="${jgroups.ip_ttl:2}"
21
21
  thread_naming_pattern="pl"
22
- enable_diagnostics="false"
23
22
  bundler_type="no-bundler"
24
- max_bundle_size="8500"
25
23
 
26
24
  thread_pool.min_threads="${jgroups.thread_pool.min_threads:0}"
27
25
  thread_pool.max_threads="${jgroups.thread_pool.max_threads:200}"
@@ -49,7 +47,7 @@
49
47
  xmit_table_msgs_per_row="1024"
50
48
  xmit_table_max_compaction_time="30000"
51
49
  />
52
- <pbcast.STABLE stability_delay="500"
50
+ <pbcast.STABLE
53
51
  desired_avg_gossip="5000"
54
52
  max_bytes="1M"
55
53
  />
@@ -74,9 +72,7 @@
74
72
  mcast_recv_buf_size="25m"
75
73
  ip_ttl="${jgroups.ip_ttl:2}"
76
74
  thread_naming_pattern="pl"
77
- enable_diagnostics="false"
78
75
  bundler_type="no-bundler"
79
- max_bundle_size="8500"
80
76
 
81
77
  thread_pool.min_threads="${jgroups.thread_pool.min_threads:0}"
82
78
  thread_pool.max_threads="${jgroups.thread_pool.max_threads:200}"
@@ -104,7 +100,7 @@
104
100
  xmit_table_msgs_per_row="1024"
105
101
  xmit_table_max_compaction_time="30000"
106
102
  />
107
- <pbcast.STABLE stability_delay="500"
103
+ <pbcast.STABLE
108
104
  desired_avg_gossip="5000"
109
105
  max_bytes="1M"
110
106
  />
@@ -161,7 +157,7 @@
161
157
  <!-- server-identities>
162
158
  <ssl>
163
159
  <keystore path="application.keystore" relative-to="infinispan.server.config.path"
164
- keystore-password="password" alias="server" key-password="password"
160
+ password="password" alias="server" key-password="password"
165
161
  generate-self-signed-certificate-host="localhost"/>
166
162
  </ssl>
167
163
  </server-identities-->
@@ -19,9 +19,7 @@
19
19
  mcast_recv_buf_size="25m"
20
20
  ip_ttl="${jgroups.ip_ttl:2}"
21
21
  thread_naming_pattern="pl"
22
- enable_diagnostics="false"
23
22
  bundler_type="no-bundler"
24
- max_bundle_size="8500"
25
23
 
26
24
  thread_pool.min_threads="${jgroups.thread_pool.min_threads:0}"
27
25
  thread_pool.max_threads="${jgroups.thread_pool.max_threads:200}"
@@ -49,7 +47,7 @@
49
47
  xmit_table_msgs_per_row="1024"
50
48
  xmit_table_max_compaction_time="30000"
51
49
  />
52
- <pbcast.STABLE stability_delay="500"
50
+ <pbcast.STABLE
53
51
  desired_avg_gossip="5000"
54
52
  max_bytes="1M"
55
53
  />
@@ -74,9 +72,7 @@
74
72
  mcast_recv_buf_size="25m"
75
73
  ip_ttl="${jgroups.ip_ttl:2}"
76
74
  thread_naming_pattern="pl"
77
- enable_diagnostics="false"
78
75
  bundler_type="no-bundler"
79
- max_bundle_size="8500"
80
76
 
81
77
  thread_pool.min_threads="${jgroups.thread_pool.min_threads:0}"
82
78
  thread_pool.max_threads="${jgroups.thread_pool.max_threads:200}"
@@ -104,7 +100,7 @@
104
100
  xmit_table_msgs_per_row="1024"
105
101
  xmit_table_max_compaction_time="30000"
106
102
  />
107
- <pbcast.STABLE stability_delay="500"
103
+ <pbcast.STABLE
108
104
  desired_avg_gossip="5000"
109
105
  max_bytes="1M"
110
106
  />
@@ -163,7 +159,7 @@
163
159
  <!-- server-identities>
164
160
  <ssl>
165
161
  <keystore path="application.keystore" relative-to="infinispan.server.config.path"
166
- keystore-password="password" alias="server" key-password="password"
162
+ password="password" alias="server" key-password="password"
167
163
  generate-self-signed-certificate-host="localhost"/>
168
164
  </ssl>
169
165
  </server-identities-->
@@ -50,7 +50,7 @@
50
50
  <!-- server-identities>
51
51
  <ssl>
52
52
  <keystore path="application.keystore" relative-to="infinispan.server.config.path"
53
- keystore-password="password" alias="server" key-password="password"
53
+ password="password" alias="server" key-password="password"
54
54
  generate-self-signed-certificate-host="localhost"/>
55
55
  </ssl>
56
56
  </server-identities-->
@@ -27,7 +27,7 @@ describe('Infinispan TLS/SSL client', function() {
27
27
  );
28
28
 
29
29
  it('fails to operate if default server name (SNI) does not match default server realm',
30
- testError(expectContainsError("self signed certificate in certificate chain"),
30
+ testError(expectContainsAnyErrors(["self signed certificate in certificate chain", "self-signed certificate in certificate chain"]),
31
31
  sslSniDefault())
32
32
  );
33
33
 
@@ -37,6 +37,7 @@ describe('Infinispan TLS/SSL client', function() {
37
37
  ['CERT_SIGNATURE_FAILURE'
38
38
  , 'certificate signature failure'
39
39
  , 'self signed certificate in certificate chain'
40
+ , 'self-signed certificate in certificate chain'
40
41
  ])
41
42
  , sslSniUntrusted()
42
43
  )
@@ -53,7 +54,7 @@ describe('Infinispan TLS/SSL client', function() {
53
54
  );
54
55
 
55
56
  it('fails to operate if no encrypted transport is provided',
56
- testError(expectAnyExactErrors(['self signed certificate in certificate chain']),
57
+ testError(expectAnyExactErrors(['self signed certificate in certificate chain', 'self-signed certificate in certificate chain']),
57
58
  sslStoreNoCryptoStore())
58
59
  );
59
60
 
@@ -78,7 +79,7 @@ describe('Infinispan TLS/SSL client', function() {
78
79
  // );
79
80
 
80
81
  it('fails to operate if trusted certificate is missing for authenticated encrypted transport',
81
- testError(expectAnyExactErrors(['self signed certificate in certificate chain']),
82
+ testError(expectAnyExactErrors(['self signed certificate in certificate chain', 'self-signed certificate in certificate chain']),
82
83
  sslAuthWithMissingTrustCertificate())
83
84
  );
84
85
 
@@ -253,10 +254,10 @@ describe('Infinispan TLS/SSL client', function() {
253
254
  }
254
255
  }
255
256
 
256
- function expectContainsError(msg) {
257
+ function expectContainsAnyErrors(msg) {
257
258
  return function(done) {
258
259
  return function(err) {
259
- toContainAnyOf([msg], err, done);
260
+ toContainAnyOf(msg, err, done);
260
261
  }
261
262
  }
262
263
  }
@@ -1,3 +1,4 @@
1
+ /* eslint-disable require-jsdoc */
1
2
  // Commons functions
2
3
 
3
4
  var _ = require('underscore');
@@ -5,7 +6,7 @@ var _ = require('underscore');
5
6
  var log4js = require('log4js');
6
7
 
7
8
  var readFile = require('fs').readFile;
8
- var httpRequest = require('request');
9
+ var httpRequest = require('urllib');
9
10
  var util = require('util');
10
11
 
11
12
  var f = require('../../lib/functional');
@@ -719,65 +720,36 @@ function getClusterMembers(port) {
719
720
 
720
721
  return invokeDmrHttpGet('GET', opUrl, port)
721
722
  .then(function(response) {
722
- logger.debugf("Server '%s' replied with cluster members: %s", port, response.cluster_size);
723
+ logger.debugf('Server %s replied with cluster members: %s', port, response.cluster_size);
723
724
  var members = response.cluster_size;
724
- logger.debugf("Members are: %s", members);
725
+ logger.debugf('Members are: %s', members);
725
726
  return members;
726
727
  });
727
- }
728
+ };
728
729
  }
729
730
 
730
731
  function invokeDmrHttp(op, port) {
731
- return new Promise(function(fulfil, reject) {
732
- httpRequest({
733
- method: 'POST',
734
- url: 'http://localhost:' + port + '/rest/v2',
735
- auth: {
736
- user: 'admin',
737
- pass: 'pass',
738
- sendImmediately: false
739
- },
740
- headers: {
741
- 'Content-Type' : 'application/json'
742
- },
743
- body: JSON.stringify(op)
744
- }, function(error, response, body) {
745
- if (!error && response.statusCode == 200) {
746
- fulfil(JSON.parse(body));
747
- } else {
748
- reject(util.format('Error (%s), body (%s), response(%s)',
749
- error, body, JSON.stringify(response)));
750
- }
751
- });
752
- });
732
+ return httpRequest.request(`http://localhost:${port}/rest/v2`,
733
+ {method:'POST',
734
+ digestAuth: 'admin:pass',
735
+ headers:{
736
+ 'Content-Type': 'application/json',
737
+ 'body': op
738
+ }}).then(res => res.statusCode==200 ? JSON.parse(res.data) : {},
739
+ error => (util.format('Error (%s)', error)));
753
740
  }
754
741
 
755
742
  function invokeDmrHttpGet(method, opUrl, port) {
756
- return new Promise(function(fulfil, reject) {
757
- httpRequest({
758
- method: method,
759
- url: 'http://localhost:' + port + '/rest/v2' + opUrl,
760
- auth: {
761
- user: 'admin',
762
- pass: 'pass',
763
- sendImmediately: false
764
- },
765
- headers: {
766
- 'Content-Type' : 'application/json'
767
- }
768
- }, function(error, response, body) {
769
- if (!error && response.statusCode >= 200 && response.statusCode <= 204) {
770
- var resp = "";
771
- if (body) {
772
- resp = JSON.parse(body);
773
- }
774
- fulfil(resp);
775
- } else {
776
- reject(util.format('Error (%s), body (%s), response(%s)',
777
- error, body, JSON.stringify(response)));
778
- }
779
- });
780
- });
743
+
744
+ logger.debugf(`URL http://localhost:${port}/rest/v2${opUrl}`);
745
+ return httpRequest.request(`http://localhost:${port}/rest/v2${opUrl}`, {
746
+ method: method,
747
+ digestAuth: 'admin:pass',
748
+ headers: {
749
+ 'Content-Type' : 'application/json'
750
+ }
751
+ }).then( res => res.statusCode==200 ? JSON.parse(res.data) : {},
752
+ error => (util.format('Error (%s)', error)));
781
753
  }
782
754
 
783
755
  function readFileAsync(path) {