You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/06/19 12:23:28 UTC
[1/2] incubator-ignite git commit: #ignite-961: add ignite-nodejs
module.
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-965 [created] cd063b611
#ignite-961: add ignite-nodejs module.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c37bfc18
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c37bfc18
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c37bfc18
Branch: refs/heads/ignite-965
Commit: c37bfc18e534fd470a5da02f499e0f26c2c03f89
Parents: d006389
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri Jun 19 13:19:53 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri Jun 19 13:21:35 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/util/GridJavaProcess.java | 42 +++++
modules/nodejs/README.txt | 28 +++
modules/nodejs/pom.xml | 76 ++++++++
modules/nodejs/src/main/js/apache-ignite.js | 23 +++
modules/nodejs/src/main/js/cache.js | 159 +++++++++++++++++
modules/nodejs/src/main/js/ignite.js | 49 ++++++
modules/nodejs/src/main/js/ignition.js | 107 ++++++++++++
modules/nodejs/src/main/js/package.json | 14 ++
modules/nodejs/src/main/js/server.js | 173 +++++++++++++++++++
.../ignite/internal/NodeJsAbstractTest.java | 167 ++++++++++++++++++
.../ignite/internal/NodeJsCacheApiSelfTest.java | 85 +++++++++
.../ignite/internal/NodeJsIgnitionSelfTest.java | 66 +++++++
.../internal/NodeJsSecretKeySelfTest.java | 72 ++++++++
.../testsuites/IgniteNodeJsTestSuite.java | 40 +++++
modules/nodejs/src/test/js/rest-jetty.xml | 71 ++++++++
modules/nodejs/src/test/js/test-cache-api.js | 146 ++++++++++++++++
modules/nodejs/src/test/js/test-ignition.js | 91 ++++++++++
modules/nodejs/src/test/js/test-key.js | 62 +++++++
modules/nodejs/src/test/js/test-node.xml | 97 +++++++++++
modules/nodejs/src/test/js/test-runner.js | 45 +++++
modules/nodejs/src/test/js/test-utils.js | 149 ++++++++++++++++
modules/nodejs/src/test/js/test.js | 116 +++++++++++++
parent/pom.xml | 1 +
pom.xml | 1 +
24 files changed, 1880 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/core/src/main/java/org/apache/ignite/internal/util/GridJavaProcess.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/GridJavaProcess.java b/modules/core/src/main/java/org/apache/ignite/internal/util/GridJavaProcess.java
index 4946eb2..693d486 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/GridJavaProcess.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/GridJavaProcess.java
@@ -174,6 +174,48 @@ public final class GridJavaProcess {
}
/**
+ * Executes cmd in a separate system process.
+ *
+ * @param cmd Commands to run.
+ * @param env Environment variable.
+ * @param log Log to use.
+ * @param printC Optional closure to be called each time wrapped process prints line to system.out or system.err.
+ * @param procKilledC Optional closure to be called when process termination is detected.
+ * @return Wrapper around {@link Process}
+ * @throws Exception If any problem occurred.
+ */
+ public static GridJavaProcess exec(List<String> cmd, Map<String, String> env, @Nullable IgniteLogger log,
+ @Nullable IgniteInClosure<String> printC, @Nullable GridAbsClosure procKilledC)
+ throws Exception {
+
+ if (!(U.isLinux() || U.isMacOs() || U.isWindows()))
+ throw new Exception("Your OS is not supported.");
+
+ GridJavaProcess gjProc = new GridJavaProcess();
+
+ gjProc.log = log;
+ gjProc.procKilledC = procKilledC;
+
+ ProcessBuilder builder = new ProcessBuilder(cmd);
+
+ builder.redirectErrorStream(true);
+
+ builder.environment().putAll(env);
+
+ Process proc = builder.start();
+
+ gjProc.osGrabber = gjProc.new ProcessStreamGrabber(proc.getInputStream(), printC);
+ gjProc.esGrabber = gjProc.new ProcessStreamGrabber(proc.getErrorStream(), printC);
+
+ gjProc.osGrabber.start();
+ gjProc.esGrabber.start();
+
+ gjProc.proc = proc;
+
+ return gjProc;
+ }
+
+ /**
* Kills the java process.
*
* @throws Exception If any problem occurred.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/nodejs/README.txt
----------------------------------------------------------------------
diff --git a/modules/nodejs/README.txt b/modules/nodejs/README.txt
new file mode 100644
index 0000000..34a9a60
--- /dev/null
+++ b/modules/nodejs/README.txt
@@ -0,0 +1,28 @@
+Apache Ignite NodeJS Module
+------------------------
+
+Apache Ignite NodeJS module provides NodeJS client for Apache Ignite.
+
+Importing Apache Ignite NodeJS Module In Maven Project
+-------------------------------------
+
+If you are using Maven to manage dependencies of your project, you can add Cloud module
+dependency like this (replace '${ignite.version}' with actual Ignite version you are
+interested in):
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ ...
+ <dependencies>
+ ...
+ <dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-nodejs</artifactId>
+ <version>${ignite.version}</version>
+ </dependency>
+ ...
+ </dependencies>
+ ...
+</project>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/nodejs/pom.xml
----------------------------------------------------------------------
diff --git a/modules/nodejs/pom.xml b/modules/nodejs/pom.xml
new file mode 100644
index 0000000..5dbfc89
--- /dev/null
+++ b/modules/nodejs/pom.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!--
+ POM file.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-parent</artifactId>
+ <version>1</version>
+ <relativePath>../../parent</relativePath>
+ </parent>
+
+ <artifactId>ignite-nodejs</artifactId>
+ <version>1.1.1-SNAPSHOT</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-spring</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-log4j</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-rest-http</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.11</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-core</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/nodejs/src/main/js/apache-ignite.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/main/js/apache-ignite.js b/modules/nodejs/src/main/js/apache-ignite.js
new file mode 100644
index 0000000..e03334d
--- /dev/null
+++ b/modules/nodejs/src/main/js/apache-ignite.js
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+module.exports = {
+ Cache : require('./cache.js').Cache,
+ Ignition : require('./ignition.js').Ignition,
+ Server : require('./server.js').Server,
+ Ignite : require('./ignite.js').Ignite
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/nodejs/src/main/js/cache.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/main/js/cache.js b/modules/nodejs/src/main/js/cache.js
new file mode 100644
index 0000000..bf4089b
--- /dev/null
+++ b/modules/nodejs/src/main/js/cache.js
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var Server = require("./server").Server;
+
+/**
+ * Creates an instance of Cache
+ *
+ * @constructor
+ * @this {Cache}
+ * @param {Server} server Server class
+ * @param {string} cacheName Cache name
+ */
+function Cache(server, cacheName) {
+ this._server = server;
+ this._cacheName = cacheName;
+ this._cacheNameParam = Server.pair("cacheName", this._cacheName);
+}
+
+/**
+ * Callback for cache get
+ * @callback Cache~onGet
+ * @param {string} error Error
+ * @param {string} result Result value
+ */
+
+/**
+ * Get cache value
+ *
+ * @this {Cache}
+ * @param {string} key Key
+ * @param {Cache~onGet} callback Called on finish
+ */
+Cache.prototype.get = function(key, callback) {
+ this._server.runCommand("get", [this._cacheNameParam, Server.pair("key", key)], callback);
+};
+
+/**
+ * Callback for cache put
+ * @callback Cache~noValue
+ * @param {string} error Error
+ */
+
+/**
+ * Put cache value
+ *
+ * @this {Cache}
+ * @param {string} key Key
+ * @param {string} value Value
+ * @param {Cache~noValue} callback Called on finish
+ */
+Cache.prototype.put = function(key, value, callback) {
+ this._server.runCommand("put", [this._cacheNameParam, Server.pair("key", key), Server.pair("val", value)],
+ callback);
+}
+
+/**
+ * Remove cache key
+ *
+ * @this {Cache}
+ * @param {string} key Key
+ * @param {Cache~noValue} callback Called on finish
+ */
+Cache.prototype.remove = function(key, callback) {
+ this._server.runCommand("rmv", [this._cacheNameParam, Server.pair("key", key)], callback);
+}
+
+/**
+ * Remove cache keys
+ *
+ * @this {Cache}
+ * @param {string[]} keys Keys to remove
+ * @param {Cache~noValue} callback Called on finish
+ */
+Cache.prototype.removeAll = function(keys, callback) {
+ var params = [this._cacheNameParam];
+
+ params = params.concat(Cache.concatParams("k", keys));
+
+ this._server.runCommand("rmvall", params, callback);
+}
+
+/**
+ * Put keys to cache
+ *
+ * @this {Cache}
+ * @param {Object.<string, string>} collection of entries to put in the cache
+ * @param {Cache~noValue} callback Called on finish
+ */
+Cache.prototype.putAll = function(map, callback) {
+ var keys = Object.keys(map);
+
+ var values = [];
+
+ for (var key of keys) {
+ values.push(map[key]);
+ }
+
+ var params = Cache.concatParams("k", keys);
+ params = params.concat(Cache.concatParams("v", values));
+
+ params.push(this._cacheNameParam);
+
+ this._server.runCommand("putall", params, callback);
+}
+
+/**
+ * Callback for cache get
+ * @callback Cache~onGetAll
+ * @param {string} error Error
+ * @param {string[]} results Result values
+ */
+
+/**
+ * Get keys from the cache
+ *
+ * @this {Cache}
+ * @param {string[]} keys Keys
+ * @param {Cache~onGetAll} callback Called on finish
+ */
+Cache.prototype.getAll = function(keys, callback) {
+ var params = Cache.concatParams("k", keys);
+
+ params.push(this._cacheNameParam);
+
+ this._server.runCommand("getall", params, callback);
+}
+
+/**
+ * Concatenate all parameters
+ *
+ * @param {string} pref Prefix
+ * @param {string[]} keys Keys
+ * @returns List of parameters.
+ */
+Cache.concatParams = function(pref, keys) {
+ var temp = []
+
+ for (var i = 1; i <= keys.length; ++i) {
+ temp.push(Server.pair(pref + i, keys[i-1]));
+ }
+
+ return temp;
+}
+exports.Cache = Cache
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/nodejs/src/main/js/ignite.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/main/js/ignite.js b/modules/nodejs/src/main/js/ignite.js
new file mode 100644
index 0000000..2f3ff44
--- /dev/null
+++ b/modules/nodejs/src/main/js/ignite.js
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Create an instance of Ignite
+ *
+ * @constructor
+ * @this {Ignite}
+ * @param {Server} Server
+ */
+function Ignite(server) {
+ this._server = server;
+}
+
+/**
+ * @returns {Server} Server
+ */
+Ignite.prototype.server = function() {
+ return this._server;
+}
+
+/**
+ * Get an instance of cache
+ *
+ * @this {Ignite}
+ * @param {string} Cache name
+ * @returns {Cache} Cache
+ */
+Ignite.prototype.cache = function(cacheName) {
+ var Cache = require("./cache").Cache;
+
+ return new Cache(this._server, cacheName);
+}
+
+exports.Ignite = Ignite;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/nodejs/src/main/js/ignition.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/main/js/ignition.js b/modules/nodejs/src/main/js/ignition.js
new file mode 100644
index 0000000..d641d26
--- /dev/null
+++ b/modules/nodejs/src/main/js/ignition.js
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Creates an instance of Ignition
+ *
+ * @constructor
+ */
+function Ignition() {
+}
+
+/**
+ * Callback for Ignition start
+ *
+ * @callback Ignition~onStart
+ * @param {string} error Error
+ * @param {Ignite} ignite Connected ignite
+ */
+
+/**
+ * Open connection with server node
+ *
+ * @param {string[]} address List of nodes hosts with ports
+ * @param {string} secretKey Secret key.
+ * @param {Ignition~onStart} callback Called on finish
+ */
+Ignition.start = function(address, secretKey, callback) {
+ var Server = require("./server").Server;
+ var Ignite = require("./ignite").Ignite
+
+ var numConn = 0;
+
+ for (var addr of address) {
+ var params = addr.split(":");
+
+ var portsRange = params[1].split("..");
+
+ var start;
+ var end;
+
+ if (portsRange.length === 1) {
+ start = parseInt(portsRange[0], 10);
+ end = start;
+ }
+ else if (portsRange.length === 2) {
+ start = parseInt(portsRange[0], 10);
+ end = parseInt(portsRange[1], 10);
+ }
+ if (isNaN(start) || isNaN(end)) {
+ incorrectAddress();
+
+ return;
+ }
+
+ for (var i = start; i <= end; i++) {
+ checkServer(params[0], i, secretKey);
+ }
+ }
+
+ function checkServer(host, port, secretKey) {
+ numConn++;
+
+ var server = new Server(host, port, secretKey);
+
+ server.checkConnection(onConnect.bind(null, server));
+ }
+
+ function incorrectAddress() {
+ callback.call(null, "Incorrect address format.", null);
+
+ callback = null;
+ }
+
+ function onConnect(server, error) {
+ if (!callback) return;
+
+ numConn--;
+
+ if (!error) {
+ callback.call(null, null, new Ignite(server));
+
+ callback = null;
+
+ return;
+ }
+
+ if (!numConn) {
+ callback.call(null, "Cannot connect to servers. " + error, null);
+ }
+ }
+}
+
+exports.Ignition = Ignition;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/nodejs/src/main/js/package.json
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/main/js/package.json b/modules/nodejs/src/main/js/package.json
new file mode 100644
index 0000000..7efc4e2
--- /dev/null
+++ b/modules/nodejs/src/main/js/package.json
@@ -0,0 +1,14 @@
+{
+ "name" : "apache-ignite",
+ "version" : "1.0.0-SNAPSHOT",
+ "author" : "Semyon Boikov <sb...@gridgain.com>",
+ "contributors": [{
+ "name": "Irina Vasilinets",
+ "email": "ivasilients@gridgain.com"
+ }],
+ "main" : "apache-ignite.js",
+ "license" : "Apache-2.0",
+ "keywords" : "grid",
+ "homepage" : "https://ignite.incubator.apache.org/",
+ "engines" : { "node" : ">=0.12.4" }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/nodejs/src/main/js/server.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/main/js/server.js b/modules/nodejs/src/main/js/server.js
new file mode 100644
index 0000000..b1a3190
--- /dev/null
+++ b/modules/nodejs/src/main/js/server.js
@@ -0,0 +1,173 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Creates an instance of Server
+ *
+ * @constructor
+ * @this {Server}
+ * @param {string} host Host address
+ * @param {number} port Port
+ * @param {string} secretKey Secret key for connection
+ */
+function Server(host, port, secretKey) {
+ this._host = host;
+ this._port = port;
+ this._secretKey = secretKey;
+}
+
+/**
+ * Host value
+ *
+ * @this {Server}
+ * @returns {string} Host value
+ */
+Server.prototype.host = function() {
+ return this._host;
+}
+
+/**
+ * Callback for Server runCommand
+ *
+ * @callback Server~onRunCommand
+ * @param {string} error Error
+ * @param {string} result Result value
+ */
+
+/**
+ * Run http request
+ *
+ * @this {Server}
+ * @param {string} cmdName command name.
+ * @param params Parameters for command.
+ * @param {Server~onRunCommand} Called on finish
+ */
+Server.prototype.runCommand = function(cmdName, params, callback) {
+ var paramsString = "";
+
+ for (var p of params) {
+ paramsString += "&" + p.key + "=" + p.value;
+ }
+
+ var requestQry = "cmd=" + cmdName + paramsString;
+
+ var http = require('http');
+
+ var options = {
+ host: this._host,
+ port: this._port,
+ path: "/ignite?" + requestQry,
+ headers: this._signature()
+ };
+
+ function streamCallback(response) {
+ var fullResponseString = '';
+
+ response.on('data', function (chunk) {
+ fullResponseString += chunk;
+ });
+
+ response.on('end', function () {
+ if (response.statusCode !== 200) {
+ if (response.statusCode === 401) {
+ callback.call(null, "Authentication failed. Status code 401.");
+ }
+ else {
+ callback.call(null, "Request failed. Status code " + response.statusCode);
+ }
+
+ return;
+ }
+
+ var igniteResponse;
+
+ try {
+ igniteResponse = JSON.parse(fullResponseString);
+ }
+ catch (e) {
+ callback.call(null, e, null);
+ return;
+ }
+
+ if (igniteResponse.successStatus) {
+ callback.call(null, igniteResponse.error, null)
+ }
+ else {
+ callback.call(null, null, igniteResponse.response);
+ }
+ });
+ }
+
+ var request = http.request(options, streamCallback);
+
+ request.setTimeout(5000, callback.bind(null, "Request timeout: >5 sec"));
+
+ request.on('error', callback);
+
+ request.end();
+}
+
+/**
+ * Check the connection with server node.
+ *
+ * @this {Server}
+ * @param {Server~onRunCommand} callback Called on finish
+ */
+Server.prototype.checkConnection = function(callback) {
+ this.runCommand("version", [], callback);
+}
+
+/**
+ * Returns pair for runCommand
+ *
+ * @param {string} key Key
+ * @param {string} value Value
+ * @returns Pair of strings
+ */
+Server.pair = function(key, value) {
+ return {key: key, value: value}
+}
+
+/**
+ * Get signature for connection.
+ *
+ * @this {Server}
+ * @returns Signature
+ */
+Server.prototype._signature = function() {
+ if (!this._secretKey) {
+ return "";
+ }
+
+ var loadTimeInMS = Date.now();
+
+ var baseKey = '' + loadTimeInMS + ":" + this._secretKey;
+
+ var crypto = require('crypto')
+
+ var shasum = crypto.createHash('sha1');
+
+ shasum.update(baseKey, 'binary');
+
+ var hash = shasum.digest('base64');
+
+ var key = loadTimeInMS + ":" + hash;
+
+ return {"X-Signature" : key};
+}
+
+exports.Server = Server;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsAbstractTest.java b/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsAbstractTest.java
new file mode 100644
index 0000000..5b7af7b
--- /dev/null
+++ b/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsAbstractTest.java
@@ -0,0 +1,167 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal;
+
+import org.apache.ignite.cache.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.util.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.junits.common.*;
+
+import java.util.*;
+import java.util.concurrent.*;
+
+import static java.util.concurrent.TimeUnit.*;
+
+/**
+ * Abstract class for Node JS testing.
+ */
+public class NodeJsAbstractTest extends GridCommonAbstractTest {
+ /** Cache name. */
+ public static final String CACHE_NAME = "mycache";
+
+ /** Failed message. */
+ public static final String SCRIPT_FAILED = "node js test failed:";
+
+ /** Ok message. */
+ public static final String SCRIPT_FINISHED = "node js test finished.";
+
+ /** Node JS file with tests. */
+ private String fileName;
+
+ /** */
+ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+ /**
+ * @param fileName Node JS file name.
+ */
+ protected NodeJsAbstractTest(String fileName) {
+ this.fileName = fileName;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+ cfg.setCacheConfiguration(cacheConfiguration());
+
+ ConnectorConfiguration conCfg = new ConnectorConfiguration();
+
+ conCfg.setJettyPath(getNodeJsTestDir() + "rest-jetty.xml");
+
+ cfg.setConnectorConfiguration(conCfg);
+
+ TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
+ disco.setIpFinder(IP_FINDER);
+
+ cfg.setDiscoverySpi(disco);
+
+ return cfg;
+ }
+
+ /**
+ * @return Cache configuration.
+ */
+ protected CacheConfiguration cacheConfiguration() {
+ CacheConfiguration ccfg = new CacheConfiguration();
+
+ ccfg.setName(CACHE_NAME);
+ ccfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
+
+ return ccfg;
+ }
+
+ /**
+ * @return Node js test dir.
+ */
+ protected String getNodeJsTestDir() {
+ String sep = System.getProperty("file.separator");
+
+ return U.getIgniteHome() +
+ sep + "modules" +
+ sep + "nodejs" +
+ sep + "src" +
+ sep + "test" +
+ sep + "js" + sep;
+ }
+
+ /**
+ * @param functionName Function name.
+ * @throws Exception If script failed.
+ */
+ protected void runJsScript(String functionName) throws Exception {
+ final CountDownLatch readyLatch = new CountDownLatch(1);
+
+ GridJavaProcess proc = null;
+
+ final List<String> errors = new ArrayList<>();
+
+ List<String> cmd = new ArrayList<>();
+
+ cmd.add("node");
+
+ cmd.add(getNodeJsTestDir() + "test-runner.js");
+
+ cmd.add(fileName);
+
+ cmd.add(functionName);
+
+ Map<String, String> env = new HashMap<>();
+
+ env.put("IGNITE_HOME", IgniteUtils.getIgniteHome());
+
+ try {
+ proc = GridJavaProcess.exec(
+ cmd,
+ env,
+ log,
+ new CI1<String>() {
+ @Override public void apply(String s) {
+ info("Node js: " + s);
+
+ s = s.toLowerCase();
+
+ if (s.contains(SCRIPT_FINISHED))
+ readyLatch.countDown();
+
+ if (s.contains("assert") || s.contains(SCRIPT_FAILED)) {
+ errors.add(s);
+
+ readyLatch.countDown();
+ }
+ }
+ },
+ null
+ );
+
+ assertTrue(readyLatch.await(60, SECONDS));
+
+ proc.getProcess().waitFor();
+
+ assertEquals(errors.toString(), 0, errors.size());
+ }
+ finally {
+ if (proc != null)
+ proc.killProcess();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsCacheApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsCacheApiSelfTest.java b/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsCacheApiSelfTest.java
new file mode 100644
index 0000000..6c02ede
--- /dev/null
+++ b/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsCacheApiSelfTest.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal;
+
+/**
+ * Test node js client put/get.
+ */
+public class NodeJsCacheApiSelfTest extends NodeJsAbstractTest {
+ /** Constructor. */
+ public NodeJsCacheApiSelfTest() {
+ super("test-cache-api.js");
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void beforeTestsStarted() throws Exception {
+ startGrid(0);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTestsStopped() throws Exception {
+ stopAllGrids();
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void beforeTest() throws Exception {
+ grid(0).cache(NodeJsAbstractTest.CACHE_NAME).removeAll();
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testPutGet() throws Exception {
+ runJsScript("testPutGet");
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testIncorrectCache() throws Exception {
+ runJsScript("testIncorrectCacheName");
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testRemove() throws Exception {
+ runJsScript("testRemove");
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testRemoveNoKey() throws Exception {
+ runJsScript("testRemoveNoKey");
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testRemoveAll() throws Exception {
+ runJsScript("testRemoveAll");
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testPutAllGetAll() throws Exception {
+ runJsScript("testPutAllGetAll");
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsIgnitionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsIgnitionSelfTest.java b/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsIgnitionSelfTest.java
new file mode 100644
index 0000000..08973d5
--- /dev/null
+++ b/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsIgnitionSelfTest.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal;
+
+/**
+ * Test node js client.
+ */
+public class NodeJsIgnitionSelfTest extends NodeJsAbstractTest {
+ /** Constructor. */
+ public NodeJsIgnitionSelfTest() {
+ super("test-ignition.js");
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void beforeTestsStarted() throws Exception {
+ startGrid(0);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTestsStopped() throws Exception {
+ stopAllGrids();
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testIgnitionStart() throws Exception {
+ runJsScript("ignitionStartSuccess");
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testIgnitionFailedStart() throws Exception {
+ runJsScript("testIgnitionFail");
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testIgnitionStartWithSeveralPorts() throws Exception {
+ runJsScript("ignitionStartSuccessWithSeveralPorts");
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testIgnitionNotStartWithSeveralPorts() throws Exception {
+ runJsScript("ignitionNotStartWithSeveralPorts");
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsSecretKeySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsSecretKeySelfTest.java b/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsSecretKeySelfTest.java
new file mode 100644
index 0000000..ab7b961
--- /dev/null
+++ b/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsSecretKeySelfTest.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal;
+
+import org.apache.ignite.configuration.*;
+
+/**
+ * Test secret key.
+ */
+public class NodeJsSecretKeySelfTest extends NodeJsAbstractTest {
+ /**
+ * Constructor.
+ */
+ public NodeJsSecretKeySelfTest() {
+ super("test-key.js");
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ cfg.getConnectorConfiguration().setSecretKey("secret-key");
+
+ return cfg;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void beforeTestsStarted() throws Exception {
+ startGrid(0);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTestsStopped() throws Exception {
+ stopAllGrids();
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testStartWithoutKey() throws Exception {
+ runJsScript("testStartWithoutKey");
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testStartWithKey() throws Exception {
+ runJsScript("testStartWithKey");
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testStartWithIncorrectKey() throws Exception {
+ runJsScript("testStartWithIncorrectKey");
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/nodejs/src/test/java/org/apache/ignite/testsuites/IgniteNodeJsTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/java/org/apache/ignite/testsuites/IgniteNodeJsTestSuite.java b/modules/nodejs/src/test/java/org/apache/ignite/testsuites/IgniteNodeJsTestSuite.java
new file mode 100644
index 0000000..9d5daee
--- /dev/null
+++ b/modules/nodejs/src/test/java/org/apache/ignite/testsuites/IgniteNodeJsTestSuite.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.testsuites;
+
+import junit.framework.*;
+import org.apache.ignite.internal.*;
+
+/**
+ * Node JS test suite.
+ */
+public class IgniteNodeJsTestSuite extends TestSuite {
+ /**
+ * @return Suite.
+ * @throws Exception If failed.
+ */
+ public static TestSuite suite() throws Exception {
+ TestSuite suite = new TestSuite("Ignite Node JS Test Suite");
+
+ suite.addTest(new TestSuite(NodeJsIgnitionSelfTest.class));
+ suite.addTest(new TestSuite(NodeJsCacheApiSelfTest.class));
+ suite.addTest(new TestSuite(NodeJsSecretKeySelfTest.class));
+
+ return suite;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/nodejs/src/test/js/rest-jetty.xml
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/js/rest-jetty.xml b/modules/nodejs/src/test/js/rest-jetty.xml
new file mode 100644
index 0000000..abc146b
--- /dev/null
+++ b/modules/nodejs/src/test/js/rest-jetty.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
+<Configure id="Server" class="org.eclipse.jetty.server.Server">
+ <Arg name="threadPool">
+ <!-- Default queued blocking thread pool -->
+ <New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
+ <Set name="minThreads">20</Set>
+ <Set name="maxThreads">200</Set>
+ </New>
+ </Arg>
+ <New id="httpCfg" class="org.eclipse.jetty.server.HttpConfiguration">
+ <Set name="secureScheme">https</Set>
+ <Set name="securePort">8443</Set>
+ <Set name="sendServerVersion">true</Set>
+ <Set name="sendDateHeader">true</Set>
+ </New>
+ <Call name="addConnector">
+ <Arg>
+ <New class="org.eclipse.jetty.server.ServerConnector">
+ <Arg name="server"><Ref refid="Server"/></Arg>
+ <Arg name="factories">
+ <Array type="org.eclipse.jetty.server.ConnectionFactory">
+ <Item>
+ <New class="org.eclipse.jetty.server.HttpConnectionFactory">
+ <Ref refid="httpCfg"/>
+ </New>
+ </Item>
+ </Array>
+ </Arg>
+ <Set name="host">
+ <SystemProperty name="IGNITE_JETTY_HOST" default="localhost"/>
+ </Set>
+ <Set name="port">
+ <SystemProperty name="IGNITE_JETTY_PORT" default="9095"/>
+ </Set>
+ <Set name="idleTimeout">30000</Set>
+ <Set name="reuseAddress">true</Set>
+ </New>
+ </Arg>
+ </Call>
+ <Set name="handler">
+ <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
+ <Set name="handlers">
+ <Array type="org.eclipse.jetty.server.Handler">
+ <Item>
+ <New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
+ </Item>
+ </Array>
+ </Set>
+ </New>
+ </Set>
+ <Set name="stopAtShutdown">false</Set>
+</Configure>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/nodejs/src/test/js/test-cache-api.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/js/test-cache-api.js b/modules/nodejs/src/test/js/test-cache-api.js
new file mode 100644
index 0000000..48ff011
--- /dev/null
+++ b/modules/nodejs/src/test/js/test-cache-api.js
@@ -0,0 +1,146 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var TestUtils = require("./test-utils").TestUtils;
+
+var Apache = require(TestUtils.scriptPath());
+var Cache = Apache.Cache;
+var Server = Apache.Server;
+
+var assert = require("assert");
+
+testPutGet = function() {
+ startTest("mycache", {trace: [put, getExist], entry: "6"});
+}
+
+testRemove = function() {
+ startTest("mycache", {trace: [put, getExist, remove, getNonExist], entry: "6"});
+}
+
+testRemoveNoKey = function() {
+ startTest("mycache", {trace: [remove, getNonExist], entry: "6"});
+}
+
+testPutAllGetAll = function() {
+ startTest("mycache", {trace: [putAll, getAll], entry: {"key1": "val1", "key2" : "val2"}});
+}
+
+testRemoveAll = function() {
+ startTest("mycache", {trace: [putAll, getAll, removeAll, getNone], entry: {"key1": "val1", "key2" : "val2"}});
+}
+
+testIncorrectCacheName = function() {
+ startTest("mycache1", {trace: [incorrectPut], entry: "6"});
+}
+
+function startTest(cacheName, testDescription) {
+ TestUtils.startIgniteNode(onStart.bind(null, cacheName, testDescription));
+}
+
+function onStart(cacheName, testDescription, error, ignite) {
+ var cache = ignite.cache(cacheName);
+ callNext();
+
+ function callNext(error) {
+ assert(!error);
+ var next = testDescription.trace.shift();
+ if (next)
+ next.call(null, cache, testDescription.entry, callNext);
+ else
+ TestUtils.testDone();
+ }
+}
+
+function put(cache, entry, next) {
+ cache.put("key", entry, next);
+}
+
+function getExist(cache, entry, next) {
+ cache.get("key", onGet);
+
+ function onGet(error, value) {
+ assert(!error);
+ assert(value === entry);
+ next();
+ }
+}
+
+function remove(cache, entry, next) {
+ cache.remove("key", next);
+}
+
+function getNonExist(cache, entry, next) {
+ cache.get("key", onGet);
+
+ function onGet(error, value) {
+ assert(!error);
+ assert(!value);
+ next();
+ }
+}
+
+function putAll(cache, entries, next) {
+ cache.putAll(entries, next);
+}
+
+function getAll(cache, entries, next) {
+ cache.getAll(Object.keys(entries), onGetAll);
+ var expected = entries;
+
+ function onGetAll(error, values) {
+ assert(!error, error);
+
+ var keys = Object.keys(expected);
+
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+
+ assert(!!values[key], "Cannot find key. [key=" + key + "].");
+
+ assert(values[key] === expected[key], "Incorrect value. [key=" + key +
+ ", expected=" + expected[key] + ", val= " + values[key] + "].");
+ }
+ next();
+ }
+}
+
+function removeAll(cache, entries, next) {
+ cache.removeAll(Object.keys(entries), next)
+}
+
+function getNone(cache, entries, next) {
+ cache.getAll(Object.keys(entries), onGetAll);
+
+ function onGetAll(error, values) {
+ assert(!error, error);
+ assert(!values || !Object.keys(values).length);
+
+ next();
+ }
+}
+
+function incorrectPut(cache, entry, next) {
+ cache.put("key", entry, callback);
+
+ function callback(error) {
+ assert(!!error, "Do not get error for not exist cache");
+ assert(error.indexOf("Failed to find cache for given cache name") !== -1,
+ "Incorrect message on not exist cache. " + error);
+
+ next();
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/nodejs/src/test/js/test-ignition.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/js/test-ignition.js b/modules/nodejs/src/test/js/test-ignition.js
new file mode 100644
index 0000000..c43e856
--- /dev/null
+++ b/modules/nodejs/src/test/js/test-ignition.js
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var TestUtils = require("./test-utils").TestUtils;
+var Apache = require(TestUtils.scriptPath());
+var Ignition = Apache.Ignition;
+
+testIgnitionFail = function () {
+ Ignition.start(['127.0.0.3:9091', '127.0.0.1:9092'], null, onConnect);
+
+ function onConnect(error, server) {
+ if (error) {
+ if (error.indexOf("Cannot connect to servers.") == -1)
+ TestUtils.testFails("Incorrect error message: " + error);
+ else
+ TestUtils.testDone();
+
+ return;
+ }
+
+ TestUtils.testFails("Test should fail.");
+ }
+}
+
+ignitionStartSuccess = function() {
+ Ignition.start(['127.0.0.0:9095', '127.0.0.1:9095'], null, onConnect);
+
+ function onConnect(error, server) {
+ if (error) {
+ TestUtils.testFails(error);
+
+ return;
+ }
+
+ TestUtils.testDone();
+ }
+}
+
+ignitionStartSuccessWithSeveralPorts = function() {
+ Ignition.start(['127.0.0.1:9090..9100'], null, onConnect);
+
+ function onConnect(error, ignite) {
+ if (error) {
+ TestUtils.testFails(error);
+
+ return;
+ }
+
+ var assert = require("assert");
+
+ var server = ignite.server();
+
+ var host = server.host();
+
+ assert.ok(host.indexOf('127.0.0.1') !== -1, "Incorrect host.");
+
+ TestUtils.testDone();
+ }
+}
+
+ignitionNotStartWithSeveralPorts = function() {
+ Ignition.start(['127.0.0.1:9090...9100'], null, onConnect);
+
+ function onConnect(error, ignite) {
+ if (error) {
+ var assert = require("assert");
+
+ assert.ok(error.indexOf("Incorrect address format") !== -1, "Incorrect message.")
+
+ TestUtils.testDone();
+
+ return;
+ }
+
+ TestUtils.testFails("Exception should be thrown.");
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/nodejs/src/test/js/test-key.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/js/test-key.js b/modules/nodejs/src/test/js/test-key.js
new file mode 100644
index 0000000..b39aa51
--- /dev/null
+++ b/modules/nodejs/src/test/js/test-key.js
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var TestUtils = require("./test-utils").TestUtils;
+
+var Apache = require(TestUtils.scriptPath());
+var Cache = Apache.Cache;
+var Server = Apache.Server;
+
+var assert = require("assert");
+
+testStartWithoutKey = function() {
+ TestUtils.startIgniteNode(onIncorrectStart);
+}
+
+testStartWithKey = function() {
+ TestUtils.startIgniteNodeWithKey("secret-key", onStart);
+}
+
+testStartWithIncorrectKey = function() {
+ TestUtils.startIgniteNodeWithKey("secret-key1", onIncorrectStart);
+}
+
+function onIncorrectStart(error, ignite) {
+ assert(error != null, "Do not get authentication error");
+
+ assert(error.indexOf("Authentication failed. Status code 401.") !== -1, "Incorrect error message: " + error);
+
+ TestUtils.testDone();
+}
+
+function onStart(error, ignite) {
+ assert(error === null, "Get error: " + error);
+
+ assert(ignite !== null, "Cannot connect. Get null ignite.");
+
+ var cache = ignite.cache("mycache");
+
+ assert(cache !== null, "Cache is null.")
+
+ cache.put("key", "6", onPut);
+}
+
+function onPut(error) {
+ assert(error === null, "Error on put:" + error);
+
+ TestUtils.testDone();
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/nodejs/src/test/js/test-node.xml
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/js/test-node.xml b/modules/nodejs/src/test/js/test-node.xml
new file mode 100644
index 0000000..a1a17e4
--- /dev/null
+++ b/modules/nodejs/src/test/js/test-node.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!--
+ Ignite configuration with all defaults and enabled p2p deployment and enabled events.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/util
+ http://www.springframework.org/schema/util/spring-util.xsd">
+ <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
+ <!-- Set to true to enable distributed class loading for examples, default is false. -->
+ <property name="peerClassLoadingEnabled" value="true"/>
+
+ <property name="cacheConfiguration">
+ <list>
+ <!-- Partitioned cache example configuration (Atomic mode). -->
+ <bean class="org.apache.ignite.configuration.CacheConfiguration">
+ <property name="name" value="mycache"/>
+ <property name="atomicityMode" value="ATOMIC"/>
+ <property name="backups" value="1"/>
+ </bean>
+ </list>
+ </property>
+
+ <property name="marshaller">
+ <bean class="org.apache.ignite.marshaller.optimized.OptimizedMarshaller">
+ <!-- Set to false to allow non-serializable objects in examples, default is true. -->
+ <property name="requireSerializable" value="false"/>
+ </bean>
+ </property>
+
+ <property name="connectorConfiguration">
+ <bean class="org.apache.ignite.configuration.ConnectorConfiguration">
+ <property name="jettyPath" value="rest-jetty.xml"/>
+ </bean>
+ </property>
+
+ <!-- Enable task execution events for examples. -->
+ <property name="includeEventTypes">
+ <list>
+ <!--Task execution events-->
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_STARTED"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_FINISHED"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_FAILED"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_TIMEDOUT"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_SESSION_ATTR_SET"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_REDUCED"/>
+
+ <!--Cache events-->
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_READ"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_REMOVED"/>
+ </list>
+ </property>
+
+ <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
+ <property name="discoverySpi">
+ <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
+ <property name="ipFinder">
+ <!--
+ Ignite provides several options for automatic discovery that can be used
+ instead os static IP based discovery. For information on all options refer
+ to our documentation: http://apacheignite.readme.io/docs/cluster-config
+ -->
+ <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->
+ <!--<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">-->
+ <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
+ <constructor-arg>
+ <value>true</value>
+ </constructor-arg>
+ </bean>
+ </property>
+ </bean>
+ </property>
+ </bean>
+</beans>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/nodejs/src/test/js/test-runner.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/js/test-runner.js b/modules/nodejs/src/test/js/test-runner.js
new file mode 100644
index 0000000..471df11
--- /dev/null
+++ b/modules/nodejs/src/test/js/test-runner.js
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Create instance of TestRunner
+ *
+ * @constructor
+ */
+function TestRunner() {
+}
+
+/**
+ * Test routine
+ */
+TestRunner.runTest = function() {
+ var fileName = process.argv[2].toString().trim();
+
+ console.log("FileName " + fileName);
+
+ require("./" + fileName);
+
+ var functionName = process.argv[3].toString().trim();
+
+ if (!global[functionName]) {
+ console.log("node js test failed: function with name " + functionName + " not found");
+ return;
+ }
+ global[functionName]();
+}
+
+TestRunner.runTest();
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/nodejs/src/test/js/test-utils.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/js/test-utils.js b/modules/nodejs/src/test/js/test-utils.js
new file mode 100644
index 0000000..135da8c
--- /dev/null
+++ b/modules/nodejs/src/test/js/test-utils.js
@@ -0,0 +1,149 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Create instance of TestUtils
+ *
+ * @constructor
+ */
+function TestUtils() {
+}
+
+/**
+ * @returns {string} Path to script dir
+ */
+TestUtils.scriptPath = function() {
+ return TestUtils.igniteHome() +
+ TestUtils.sep() + "modules" +
+ TestUtils.sep() + "nodejs" +
+ TestUtils.sep() + "src" +
+ TestUtils.sep() + "main" +
+ TestUtils.sep() + "js" + TestUtils.sep();
+}
+
+/**
+ * @returns {string} Ignite home path
+ */
+TestUtils.igniteHome = function() {
+ return process.env.IGNITE_HOME;
+}
+
+/**
+ * @returns {string} Path separator
+ */
+TestUtils.sep = function() {
+ return require('path').sep;
+}
+
+/**
+ * @param {string} dir Directory with all ignite libs
+ * @returns {string} Classpath for ignite node start
+ */
+TestUtils.classpath = function(dir) {
+ var fs = require('fs');
+ var path = require('path');
+ function walk(dir, done) {
+ var results = [];
+ var list = fs.readdirSync(dir)
+ for (var i = 0; i < list.length; ++i) {
+ file = path.resolve(dir, list[i]);
+ var stat = fs.statSync(file);
+ if (stat && stat.isDirectory()) {
+ if (list[i] != "optional" && file.indexOf("optional") !== -1 && file.indexOf("rest") == -1 )
+ continue;
+
+ var sublist = walk(file);
+ results = results.concat(sublist);
+ } else {
+ if (file.indexOf(".jar") !== -1) {
+ results.push(file);
+ }
+ }
+ }
+ return results;
+ };
+
+ return walk(dir);
+};
+
+/**
+ * @returns Process that starts ignite node
+ */
+TestUtils.startIgniteNode = function() {
+ var libs = classpath(igniteHome() + TestUtils.sep() + "target" +
+ TestUtils.sep() + "bin" +
+ TestUtils.sep() + "apache-ignite-fabric-1.1.1-SNAPSHOT-bin" +
+ TestUtils.sep() + "libs");
+
+ var cp = libs.join(require('path').delimiter);
+
+ var spawn = require('child_process').spawn;
+
+ var child = spawn('java',['-classpath', cp, 'org.apache.ignite.startup.cmdline.CommandLineStartup',
+ "test-node.xml"]);
+
+ child.stdout.on('data', function (data) {
+ console.log("" + data);
+ });
+
+ child.stderr.on('data', function (data) {
+ console.log("" + data);
+ });
+
+ return child;
+}
+
+/**
+ * Print error to console
+ *
+ * @param {string} error Error
+ */
+TestUtils.testFails = function(error) {
+ console.log("Node JS test failed: " + error);
+}
+
+/**
+ * Print ok message to console
+ */
+TestUtils.testDone = function() {
+ console.log("Node JS test finished.")
+}
+
+/**
+ * Starts ignite node with default config
+ *
+ * @param {Ignition~onStart} callback Called on connect
+ */
+TestUtils.startIgniteNode = function(callback) {
+ var Apache = require(TestUtils.scriptPath());
+ var Ignition = Apache.Ignition;
+ Ignition.start(['127.0.0.1:9095'], null, callback);
+}
+
+/**
+ * Starts ignite node with default config
+ *
+ * @param {string} secretKey Secret key
+ * @param {Ignition~onStart} callback Called on connect
+ */
+TestUtils.startIgniteNodeWithKey = function(secretKey, callback) {
+ var Apache = require(TestUtils.scriptPath());
+ var Ignition = Apache.Ignition;
+ Ignition.start(['127.0.0.1:9095'], secretKey, callback);
+}
+
+exports.TestUtils = TestUtils;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/modules/nodejs/src/test/js/test.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/js/test.js b/modules/nodejs/src/test/js/test.js
new file mode 100644
index 0000000..7485072
--- /dev/null
+++ b/modules/nodejs/src/test/js/test.js
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+module.exports = {
+ 'Test put/get' : function(test) {
+ test.expect(1);
+
+ var TestUtils = require("./test_utils").TestUtils;
+ var Cache = require(TestUtils.scriptPath() + "cache").Cache;
+ var Server = require(TestUtils.scriptPath() + "server").Server;
+
+ var assert = require('assert');
+
+ var node = startIgniteNode();
+
+ setTimeout(initCache, 10000);
+
+ function initCache() {
+ var server = new Server('127.0.0.1', 9090);
+ var cache = new Cache(server, "mycache");
+ cache.put("mykey", "6", onPut.bind(null, cache));
+ }
+
+ function onPut(cache, error) {
+ if (error) {
+ console.error("Failed to put " + error);
+ finishTest(test, node);
+ return;
+ }
+
+ console.log("Put finished");
+ cache.get("mykey", onGet);
+ }
+
+ function onGet(error, value) {
+ if (error) {
+ console.error("Failed to get " + error);
+ finishTest(test, node);
+ return;
+ }
+
+ console.log("Get finished");
+ test.ok(value === "6", "This shouldn't fail " + value + "<>6");
+ finishTest(test, node);
+ }
+ },
+ 'Test connection' : function(test) {
+ test.expect(0);
+
+ var node = startIgniteNode();
+ var TestUtils = require("./test_utils").TestUtils;
+ var Server = require(TestUtils.scriptPath() + "server").Server;
+
+ setTimeout(initServer, 10000);
+
+ function initServer() {
+ var server = new Server('127.0.0.1', 9090);
+
+ console.log("Try to check connection");
+
+ server.checkConnection(onConnect);
+ }
+
+ function onConnect(error) {
+ if (error) {
+ finishWithError(test/*, node*/, error);
+ return;
+ }
+ console.log("Successfully connected");
+ finishTest(test, node);
+ }
+ },
+ 'Test ignition' : function(test) {
+ test.expect(1);
+
+ var node = startIgniteNode('127.0.0.1', 9090);
+ var TestUtils = require("./test_utils").TestUtils;
+ var Ignition = require(TestUtils.scriptPath() + "ignition").Ignition;
+
+ setTimeout(Ignition.start.bind(null, 9090, ['127.0.0.0', '127.0.0.1'], onConnect), 5000);
+
+ function onConnect(error, server) {
+ if (error) {
+ finishWithError(test, node, error);
+ return;
+ }
+ test.ok(server.host() === '127.0.0.1')
+ finishTest(test, node);
+ }
+ }
+ };
+
+function finishWithError(test, node, error) {
+ console.log("Error: " + error);
+ test.ok(false);
+ finishTest(test, node);
+}
+
+function finishTest(test, node) {
+ node.kill();
+ test.done();
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index b167932..28ffbca 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -646,6 +646,7 @@
<exclude>dev-tools/.gradle/**/*</exclude>
<exclude>dev-tools/gradle/wrapper/**/*</exclude>
<exclude>dev-tools/gradlew</exclude>
+ <exclude>src/main/js/package.json</exclude>
<!--shmem-->
<exclude>ipc/shmem/**/Makefile.in</exclude><!--auto generated files-->
<exclude>ipc/shmem/**/Makefile</exclude><!--auto generated files-->
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c37bfc18/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 44cb0ce..5f0adda 100644
--- a/pom.xml
+++ b/pom.xml
@@ -70,6 +70,7 @@
<module>modules/gce</module>
<module>modules/cloud</module>
<module>modules/mesos</module>
+ <module>modules/nodejs</module>
</modules>
<profiles>
[2/2] incubator-ignite git commit: #ignite-961: change ignite-version.
Posted by sb...@apache.org.
#ignite-961: change ignite-version.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/cd063b61
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/cd063b61
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/cd063b61
Branch: refs/heads/ignite-965
Commit: cd063b6111c7fabc8c2262554023b829b721a3cc
Parents: c37bfc1
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri Jun 19 13:23:22 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri Jun 19 13:23:22 2015 +0300
----------------------------------------------------------------------
modules/nodejs/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd063b61/modules/nodejs/pom.xml
----------------------------------------------------------------------
diff --git a/modules/nodejs/pom.xml b/modules/nodejs/pom.xml
index 5dbfc89..dcd3471 100644
--- a/modules/nodejs/pom.xml
+++ b/modules/nodejs/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-nodejs</artifactId>
- <version>1.1.1-SNAPSHOT</version>
+ <version>1.1.6-SNAPSHOT</version>
<dependencies>
<dependency>