Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-nodejs 7d1845008 -> fe198856a


#nodejs: debug


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/fe198856
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/fe198856
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/fe198856

Branch: refs/heads/ignite-nodejs
Commit: fe198856a2534494ec5835cbf4ca4c118030932a
Parents: 7d18450
Author: ivasilinets <ivasilin...@gridgain.com>
Authored: Mon Jun 8 00:03:52 2015 +0300
Committer: ivasilinets <ivasilin...@gridgain.com>
Committed: Mon Jun 8 00:03:52 2015 +0300

----------------------------------------------------------------------
 modules/nodejs/src/test/nodejs/test_ignition.js | 12 +++++++++---
 modules/nodejs/src/test/nodejs/test_utils.js    |  8 ++++----
 2 files changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe198856/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 805bfd7..da02039 100644
--- a/modules/nodejs/src/test/nodejs/test_ignition.js
+++ b/modules/nodejs/src/test/nodejs/test_ignition.js
@@ -1,7 +1,10 @@
+function TestIgnition () {
+}
+
 var TestUtils = require("./test_utils").TestUtils;
 var Ignition = require(TestUtils.scriptPath() + "ignition").Ignition;
 
-exports.test_ignition_fail = function ()  {
+TestIgnition.test_ignition_fail = function ()  {
     Ignition.start(['127.0.0.3:9091', '127.0.0.1:9092'], onConnect);
 
     function onConnect(error, server) {
@@ -18,7 +21,7 @@ exports.test_ignition_fail = function ()  {
     }
 }
 
-exports.ignition_start_success = function() {
+TestIgnition.ignition_start_success = function() {
     Ignition.start(['127.0.0.0:9090', '127.0.0.1:9090'], onConnect);
 
     function onConnect(error, server) {
@@ -29,4 +32,7 @@ exports.ignition_start_success = function() {
         }
         TestUtils.testDone();
     }
-}
\ No newline at end of file
+}
+
+
+exports.TestIgnition = TestIgnition;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe198856/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 a110e92..f1149ac 100644
--- a/modules/nodejs/src/test/nodejs/test_utils.js
+++ b/modules/nodejs/src/test/nodejs/test_utils.js
@@ -111,16 +111,16 @@ TestUtils.testDone = function() {
  */
 TestUtils.runTest = function() {
     var fileName = process.argv[2].toString().trim();
-    var tests = require("./" + fileName);
+    var Test = require("./" + fileName).TestIgnition;
     var functionName = process.argv[3].toString().trim();
-    for (var obj in tests) {
+    for (var obj in Test) {
         console.log("vvvvvvvvv " + obj);
     }
-    if (!tests[functionName]) {
+    if (!Test[functionName]) {
         console.log("node js test failed: function with name " + functionName 
+ " not found");
         return;
     }
-    tests[functionName]();
+    Test[functionName]();
 }
 
 exports.TestUtils = TestUtils;

Reply via email to