You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dp...@apache.org on 2018/12/21 16:15:49 UTC

ignite git commit: IGNITE-10599 Add Compute Schedule example to LGPL suite. - Fixes #5610.

Repository: ignite
Updated Branches:
  refs/heads/master 59c542034 -> fd56faaf3


IGNITE-10599 Add Compute Schedule example to LGPL suite. - Fixes #5610.

Signed-off-by: Dmitriy Pavlov <dp...@apache.org>


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

Branch: refs/heads/master
Commit: fd56faaf3fe582a9a7984abc0176a7bed042fc52
Parents: 59c5420
Author: Ilya Kasnacheev <il...@gmail.com>
Authored: Fri Dec 21 19:15:40 2018 +0300
Committer: Dmitriy Pavlov <dp...@apache.org>
Committed: Fri Dec 21 19:15:40 2018 +0300

----------------------------------------------------------------------
 .../misc/schedule/ComputeScheduleExample.java   |  4 +--
 ...ComputeScheduleExampleMultiNodeSelfTest.java | 31 ++++++++++++++++++
 .../ComputeScheduleExampleSelfTest.java         | 33 ++++++++++++++++++++
 .../IgniteLgplExamplesSelfTestSuite.java        |  6 +++-
 4 files changed, 71 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/fd56faaf/examples/src/main/java-lgpl/org/apache/ignite/examples/misc/schedule/ComputeScheduleExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java-lgpl/org/apache/ignite/examples/misc/schedule/ComputeScheduleExample.java b/examples/src/main/java-lgpl/org/apache/ignite/examples/misc/schedule/ComputeScheduleExample.java
index f8d0660..d480309 100644
--- a/examples/src/main/java-lgpl/org/apache/ignite/examples/misc/schedule/ComputeScheduleExample.java
+++ b/examples/src/main/java-lgpl/org/apache/ignite/examples/misc/schedule/ComputeScheduleExample.java
@@ -68,7 +68,7 @@ public class ComputeScheduleExample {
                         return invocations;
                     }
                 },
-                "{5, 3} * * * * *" // Cron expression.
+                "{9, 5, 3} * * * * *" // Cron expression.
             );
 
             while (!fut.isDone())
@@ -79,4 +79,4 @@ public class ComputeScheduleExample {
             System.out.println(">>> Check all nodes for hello message output.");
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd56faaf/examples/src/test/java-lgpl/org/apache/ignite/examples/ComputeScheduleExampleMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java-lgpl/org/apache/ignite/examples/ComputeScheduleExampleMultiNodeSelfTest.java b/examples/src/test/java-lgpl/org/apache/ignite/examples/ComputeScheduleExampleMultiNodeSelfTest.java
new file mode 100644
index 0000000..24b708e
--- /dev/null
+++ b/examples/src/test/java-lgpl/org/apache/ignite/examples/ComputeScheduleExampleMultiNodeSelfTest.java
@@ -0,0 +1,31 @@
+/*
+ * 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.examples;
+
+import org.apache.ignite.examples.misc.schedule.ComputeScheduleExample;
+
+/**
+ * Multi-node test for {@link ComputeScheduleExample}.
+ */
+public class ComputeScheduleExampleMultiNodeSelfTest extends ComputeScheduleExampleSelfTest {
+    /** {@inheritDoc} */
+    @Override protected void beforeTest() throws Exception {
+        for (int i = 0; i < RMT_NODES_CNT; i++)
+            startGrid("node-" + i, "examples/config/example-ignite.xml");
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd56faaf/examples/src/test/java-lgpl/org/apache/ignite/examples/ComputeScheduleExampleSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java-lgpl/org/apache/ignite/examples/ComputeScheduleExampleSelfTest.java b/examples/src/test/java-lgpl/org/apache/ignite/examples/ComputeScheduleExampleSelfTest.java
new file mode 100644
index 0000000..90cf8f4
--- /dev/null
+++ b/examples/src/test/java-lgpl/org/apache/ignite/examples/ComputeScheduleExampleSelfTest.java
@@ -0,0 +1,33 @@
+/*
+ * 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.examples;
+
+import org.apache.ignite.examples.misc.schedule.ComputeScheduleExample;
+import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest;
+
+/**
+ * Tests {@link ComputeScheduleExample}.
+ */
+public class ComputeScheduleExampleSelfTest extends GridAbstractExamplesTest {
+    /**
+     * @throws Exception If failed.
+     */
+    public void testComputeScheduleExample() throws Exception {
+        ComputeScheduleExample.main(EMPTY_ARGS);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd56faaf/examples/src/test/java-lgpl/org/apache/ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java-lgpl/org/apache/ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java b/examples/src/test/java-lgpl/org/apache/ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java
index 3c9101a..8eca0fb 100644
--- a/examples/src/test/java-lgpl/org/apache/ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java
+++ b/examples/src/test/java-lgpl/org/apache/ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java
@@ -18,6 +18,8 @@
 package org.apache.ignite.testsuites;
 
 import junit.framework.TestSuite;
+import org.apache.ignite.examples.ComputeScheduleExampleMultiNodeSelfTest;
+import org.apache.ignite.examples.ComputeScheduleExampleSelfTest;
 import org.apache.ignite.examples.HibernateL2CacheExampleMultiNodeSelfTest;
 import org.apache.ignite.examples.HibernateL2CacheExampleSelfTest;
 import org.apache.ignite.examples.SpatialQueryExampleMultiNodeSelfTest;
@@ -42,11 +44,13 @@ public class IgniteLgplExamplesSelfTestSuite extends TestSuite {
 
         suite.addTest(new TestSuite(HibernateL2CacheExampleSelfTest.class));
         suite.addTest(new TestSuite(SpatialQueryExampleSelfTest.class));
+        suite.addTest(new TestSuite(ComputeScheduleExampleSelfTest.class));
 
         // Multi-node.
         suite.addTest(new TestSuite(HibernateL2CacheExampleMultiNodeSelfTest.class));
         suite.addTest(new TestSuite(SpatialQueryExampleMultiNodeSelfTest.class));
+        suite.addTest(new TestSuite(ComputeScheduleExampleMultiNodeSelfTest.class));
 
         return suite;
     }
-}
\ No newline at end of file
+}