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/08 12:12:21 UTC
[3/9] incubator-ignite git commit: #nodejs: add licenses.
#nodejs: add licenses.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d26d59b2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d26d59b2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d26d59b2
Branch: refs/heads/ignite-nodejs
Commit: d26d59b228b1f99812cc2bc413ad4a7231974919
Parents: fa50dea
Author: ivasilinets <iv...@gridgain.com>
Authored: Mon Jun 8 12:33:02 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Mon Jun 8 12:33:02 2015 +0300
----------------------------------------------------------------------
modules/nodejs/src/main/nodejs/cache.js | 17 ++++++++
modules/nodejs/src/main/nodejs/ignition.js | 17 ++++++++
modules/nodejs/src/main/nodejs/server.js | 17 ++++++++
modules/nodejs/src/test/nodejs/rest-jetty.xml | 20 ++++++++-
modules/nodejs/src/test/nodejs/test.js | 45 ++++++++++++++------
modules/nodejs/src/test/nodejs/test_ignition.js | 17 ++++++++
modules/nodejs/src/test/nodejs/test_put_get.js | 17 ++++++++
modules/nodejs/src/test/nodejs/test_utils.js | 17 ++++++++
8 files changed, 152 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d26d59b2/modules/nodejs/src/main/nodejs/cache.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/main/nodejs/cache.js b/modules/nodejs/src/main/nodejs/cache.js
index 59c8ece..9ee6f9c 100644
--- a/modules/nodejs/src/main/nodejs/cache.js
+++ b/modules/nodejs/src/main/nodejs/cache.js
@@ -1,3 +1,20 @@
+/*
+ * 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 Cache
*
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d26d59b2/modules/nodejs/src/main/nodejs/ignition.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/main/nodejs/ignition.js b/modules/nodejs/src/main/nodejs/ignition.js
index 5d5652d..6cb6e72 100644
--- a/modules/nodejs/src/main/nodejs/ignition.js
+++ b/modules/nodejs/src/main/nodejs/ignition.js
@@ -1,3 +1,20 @@
+/*
+ * 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
*
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d26d59b2/modules/nodejs/src/main/nodejs/server.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/main/nodejs/server.js b/modules/nodejs/src/main/nodejs/server.js
index ec770da..7bdb360 100644
--- a/modules/nodejs/src/main/nodejs/server.js
+++ b/modules/nodejs/src/main/nodejs/server.js
@@ -1,3 +1,20 @@
+/*
+ * 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
*
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d26d59b2/modules/nodejs/src/test/nodejs/rest-jetty.xml
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/nodejs/rest-jetty.xml b/modules/nodejs/src/test/nodejs/rest-jetty.xml
index e31304f..d292d06 100644
--- a/modules/nodejs/src/test/nodejs/rest-jetty.xml
+++ b/modules/nodejs/src/test/nodejs/rest-jetty.xml
@@ -1,4 +1,22 @@
-<?xml version="1.0"?>
+<?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">
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d26d59b2/modules/nodejs/src/test/nodejs/test.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/nodejs/test.js b/modules/nodejs/src/test/nodejs/test.js
index bdce21d..7485072 100644
--- a/modules/nodejs/src/test/nodejs/test.js
+++ b/modules/nodejs/src/test/nodejs/test.js
@@ -1,3 +1,20 @@
+/*
+ * 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);
@@ -8,9 +25,9 @@ module.exports = {
var assert = require('assert');
- //var node = startIgniteNode();
+ var node = startIgniteNode();
- setTimeout(initCache, 10000); //If start node from javascrip set timeout 10000);
+ setTimeout(initCache, 10000);
function initCache() {
var server = new Server('127.0.0.1', 9090);
@@ -21,7 +38,7 @@ module.exports = {
function onPut(cache, error) {
if (error) {
console.error("Failed to put " + error);
- finishTest(test/*, node*/);
+ finishTest(test, node);
return;
}
@@ -32,19 +49,19 @@ module.exports = {
function onGet(error, value) {
if (error) {
console.error("Failed to get " + error);
- finishTest(test/*, node*/);
+ finishTest(test, node);
return;
}
console.log("Get finished");
test.ok(value === "6", "This shouldn't fail " + value + "<>6");
- finishTest(test/*, node*/);
+ finishTest(test, node);
}
},
'Test connection' : function(test) {
test.expect(0);
- //var node = startIgniteNode();
+ var node = startIgniteNode();
var TestUtils = require("./test_utils").TestUtils;
var Server = require(TestUtils.scriptPath() + "server").Server;
@@ -64,13 +81,13 @@ module.exports = {
return;
}
console.log("Successfully connected");
- finishTest(test/*, node*/);
+ finishTest(test, node);
}
},
'Test ignition' : function(test) {
test.expect(1);
- //var node = startIgniteNode('127.0.0.1', 9090);
+ var node = startIgniteNode('127.0.0.1', 9090);
var TestUtils = require("./test_utils").TestUtils;
var Ignition = require(TestUtils.scriptPath() + "ignition").Ignition;
@@ -78,22 +95,22 @@ module.exports = {
function onConnect(error, server) {
if (error) {
- finishWithError(test/*, node*/, error);
+ finishWithError(test, node, error);
return;
}
test.ok(server.host() === '127.0.0.1')
- finishTest(test/*, node*/);
+ finishTest(test, node);
}
}
};
-function finishWithError(test/*, node*/, error) {
+function finishWithError(test, node, error) {
console.log("Error: " + error);
test.ok(false);
- finishTest(test/*, node*/);
+ finishTest(test, node);
}
-function finishTest(test/*, node*/) {
- //node.kill();
+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/d26d59b2/modules/nodejs/src/test/nodejs/test_ignition.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/nodejs/test_ignition.js b/modules/nodejs/src/test/nodejs/test_ignition.js
index f2293d0..e1e18cc 100644
--- a/modules/nodejs/src/test/nodejs/test_ignition.js
+++ b/modules/nodejs/src/test/nodejs/test_ignition.js
@@ -1,3 +1,20 @@
+/*
+ * 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 Ignition = require(TestUtils.scriptPath() + "ignition").Ignition;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d26d59b2/modules/nodejs/src/test/nodejs/test_put_get.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/nodejs/test_put_get.js b/modules/nodejs/src/test/nodejs/test_put_get.js
index 3ac64aa..af3695b 100644
--- a/modules/nodejs/src/test/nodejs/test_put_get.js
+++ b/modules/nodejs/src/test/nodejs/test_put_get.js
@@ -1,3 +1,20 @@
+/*
+ * 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 Cache = require(TestUtils.scriptPath() + "cache").Cache;
var Server = require(TestUtils.scriptPath() + "server").Server;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d26d59b2/modules/nodejs/src/test/nodejs/test_utils.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/nodejs/test_utils.js b/modules/nodejs/src/test/nodejs/test_utils.js
index 20dc504..1383a84 100644
--- a/modules/nodejs/src/test/nodejs/test_utils.js
+++ b/modules/nodejs/src/test/nodejs/test_utils.js
@@ -1,3 +1,20 @@
+/*
+ * 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
*