You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by an...@apache.org on 2015/08/21 13:05:46 UTC
[5/7] incubator-ignite git commit: # GG-843 Minor fix.
# GG-843 Minor fix.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/494f978e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/494f978e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/494f978e
Branch: refs/heads/ignite-843
Commit: 494f978e82e25a6100be5a99b9b0768b3da18d10
Parents: d686f12
Author: Andrey <an...@gridgain.com>
Authored: Fri Aug 21 15:39:14 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Fri Aug 21 15:39:14 2015 +0700
----------------------------------------------------------------------
.../main/js/views/templates/agent-download.jade | 16 ++++++---
.../ignite/internal/NodeJsAbstractTest.java | 34 +++++++++++++++++---
.../ignite/internal/NodeJsSqlQuerySelfTest.java | 9 ++++++
3 files changed, 51 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/494f978e/modules/control-center-web/src/main/js/views/templates/agent-download.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/templates/agent-download.jade b/modules/control-center-web/src/main/js/views/templates/agent-download.jade
index c619a45..a9312d6 100644
--- a/modules/control-center-web/src/main/js/views/templates/agent-download.jade
+++ b/modules/control-center-web/src/main/js/views/templates/agent-download.jade
@@ -24,9 +24,17 @@
| in order to {{::agentGoal}}.
p For installation:
ul
- li Download and unzip ignite-web-agent.
- li For list of options, run ignite-web-agent.[sh|bat] --help.
- li To test drive, run ignite-web-agent.[sh|bat] {{::agentTestDriveOption}}.
- li Refer to README.txt for more information.
+ li Download and unzip
+ b ignite-web-agent
+ | .
+ li For list of options, run
+ b ignite-web-agent.{sh|bat} --help
+ | .
+ li To test drive, run
+ b ignite-web-agent.{sh|bat} {{::agentTestDriveOption}}
+ | .
+ li Refer to
+ b README.txt
+ | for more information.
.modal-footer
button.btn.btn-primary(ng-click='downloadAgent()') Download zip
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/494f978e/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
index 47152e9..011d727 100644
--- a/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsAbstractTest.java
+++ b/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsAbstractTest.java
@@ -58,6 +58,13 @@ public class NodeJsAbstractTest extends GridCommonAbstractTest {
this.fileName = fileName;
}
+ /**
+ * Empty constructor.
+ */
+ protected NodeJsAbstractTest() {
+ // No-op.
+ }
+
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
@@ -111,6 +118,16 @@ public class NodeJsAbstractTest extends GridCommonAbstractTest {
* @throws Exception If script failed.
*/
protected void runJsScript(String functionName) throws Exception {
+ runJsScript(functionName, getNodeJsTestDir() + fileName, null);
+ }
+
+ /**
+ * @param functionName Function name.
+ * @param fileName File name.
+ * @param scriptFinished Script finished string.
+ * @throws Exception If script failed.
+ */
+ protected void runJsScript(String functionName, String fileName, String scriptFinished) throws Exception {
final CountDownLatch readyLatch = new CountDownLatch(1);
GridJavaProcess proc = null;
@@ -120,9 +137,18 @@ public class NodeJsAbstractTest extends GridCommonAbstractTest {
List<String> cmd = new ArrayList<>();
cmd.add("node");
- cmd.add(getNodeJsTestDir() + "test-runner.js");
- cmd.add(fileName);
- cmd.add(functionName);
+
+ if (functionName != null) {
+ cmd.add(getNodeJsTestDir() + "test-runner.js");
+ cmd.add(fileName);
+ cmd.add(functionName);
+ }
+ else {
+ cmd.add(getNodeJsTestDir() + "test-script-runner.js");
+ cmd.add(fileName);
+ }
+
+ final String finishedFlag = scriptFinished != null ? scriptFinished : SCRIPT_FINISHED;
Map<String, String> env = new HashMap<>();
@@ -136,7 +162,7 @@ public class NodeJsAbstractTest extends GridCommonAbstractTest {
s = s.toLowerCase();
- if (s.contains(SCRIPT_FINISHED))
+ if (s.contains(finishedFlag))
readyLatch.countDown();
if (s.contains("assert") || s.contains(SCRIPT_FAILED)) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/494f978e/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsSqlQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsSqlQuerySelfTest.java b/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsSqlQuerySelfTest.java
index 22d7ad4..f290820 100644
--- a/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsSqlQuerySelfTest.java
+++ b/modules/nodejs/src/test/java/org/apache/ignite/internal/NodeJsSqlQuerySelfTest.java
@@ -99,6 +99,15 @@ public class NodeJsSqlQuerySelfTest extends NodeJsAbstractTest {
}
/**
+ * @throws Exception If failed.
+ */
+ public void testScanQuery() throws Exception {
+ initCache();
+
+ runJsScript("testScanQuery");
+ }
+
+ /**
* Init cache.
*/
private void initCache() {