ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [6/7] incubator-ignite git commit: # IGNITE-191: Restoring TODOs.
Date Thu, 12 Feb 2015 09:39:02 GMT
# IGNITE-191: Restoring TODOs.


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

Branch: refs/heads/ignite-191
Commit: 3805c688b57dc8d6b260eba2cc61bf0cc67eea95
Parents: 20639a2
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Thu Feb 12 12:36:16 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Thu Feb 12 12:36:16 2015 +0300

----------------------------------------------------------------------
 .../visor/misc/VisorLatestVersionTask.java      |  5 +-
 .../ignite/internal/GridVersionSelfTest.java    | 70 ++++++++++----------
 .../marshaller/GridMarshallerAbstractTest.java  | 25 -------
 3 files changed, 36 insertions(+), 64 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3805c688/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorLatestVersionTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorLatestVersionTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorLatestVersionTask.java
index 7e835b5..6b873ce 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorLatestVersionTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorLatestVersionTask.java
@@ -50,10 +50,9 @@ public class VisorLatestVersionTask extends VisorOneNodeTask<Void, String>
{
         }
 
         /** {@inheritDoc} */
-        // TODO: IGNITE-191: Move to ENT visor.
         @Override protected String run(Void arg) {
-            //return g.product().latestVersion();
-            return null;
+            return g.latestVersion();
+
         }
 
         /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3805c688/modules/core/src/test/java/org/apache/ignite/internal/GridVersionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridVersionSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/GridVersionSelfTest.java
index 25de0cf..2071b6e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridVersionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridVersionSelfTest.java
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.internal;
 
-import org.apache.ignite.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.testframework.junits.common.*;
@@ -31,40 +30,39 @@ public class GridVersionSelfTest extends GridCommonAbstractTest {
     /**
      * @throws Exception If failed.
      */
-    // TODO: IGNITE-191: Move to ENT.
-    public void _testVersions() throws Exception {
-//        String propVal = System.getProperty(IGNITE_UPDATE_NOTIFIER);
-//
-//        System.setProperty(IGNITE_UPDATE_NOTIFIER, "true");
-//
-//        try {
-//            Ignite ignite = startGrid();
-//
-//            IgniteProductVersion currVer = ignite.product().version();
-//
-//            String newVer = null;
-//
-//            for (int i = 0; i < 30; i++) {
-//                newVer = ignite.product().latestVersion();
-//
-//                if (newVer != null)
-//                    break;
-//
-//                U.sleep(100);
-//            }
-//
-//            info("Versions [cur=" + currVer + ", latest=" + newVer + ']');
-//
-//            assertNotNull(newVer);
-//            assertNotSame(currVer.toString(), newVer);
-//        }
-//        finally {
-//            stopGrid();
-//
-//            if (propVal != null)
-//                System.setProperty(IGNITE_UPDATE_NOTIFIER, propVal);
-//            else
-//                System.clearProperty(IGNITE_UPDATE_NOTIFIER);
-//        }
+    public void testVersions() throws Exception {
+        String propVal = System.getProperty(IGNITE_UPDATE_NOTIFIER);
+
+        System.setProperty(IGNITE_UPDATE_NOTIFIER, "true");
+
+        try {
+            IgniteEx ignite = (IgniteEx)startGrid();
+
+            IgniteProductVersion currVer = ignite.version();
+
+            String newVer = null;
+
+            for (int i = 0; i < 30; i++) {
+                newVer = ignite.latestVersion();
+
+                if (newVer != null)
+                    break;
+
+                U.sleep(100);
+            }
+
+            info("Versions [cur=" + currVer + ", latest=" + newVer + ']');
+
+            assertNotNull(newVer);
+            assertNotSame(currVer.toString(), newVer);
+        }
+        finally {
+            stopGrid();
+
+            if (propVal != null)
+                System.setProperty(IGNITE_UPDATE_NOTIFIER, propVal);
+            else
+                System.clearProperty(IGNITE_UPDATE_NOTIFIER);
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3805c688/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java
index 7174fd9..112ae21 100644
--- a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java
@@ -856,31 +856,6 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
     }
 
     /**
-     * @throws Exception If failed.
-     */
-    // TOGO: IGNITE-191: Move to ENT.
-    public void _testProduct() throws Exception {
-//        IgniteProduct product = grid().product();
-//
-//        GridMarshallerTestBean inBean = newTestBean(product);
-//
-//        byte[] buf = marshal(inBean);
-//
-//        GridMarshallerTestBean outBean = unmarshal(buf);
-//
-//        assert inBean.getObjectField() != null;
-//        assert outBean.getObjectField() != null;
-//
-//        assert inBean.getObjectField().getClass().equals(GridProductImpl.class);
-//        assert outBean.getObjectField().getClass().equals(GridProductImpl.class);
-//
-//        assert inBean != outBean;
-//        assert inBean.equals(outBean);
-//
-//        outBean.checkNullResources();
-    }
-
-    /**
      * @param obj Object field to use.
      * @return New test bean.
      */


Mime
View raw message