You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2015/07/22 04:55:20 UTC

incubator-ignite git commit: IGNITE-950 - Adding full tests coverage.

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-950 d9bceb562 -> ec2b0b5e0


IGNITE-950 - Adding full tests coverage.


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

Branch: refs/heads/ignite-950
Commit: ec2b0b5e0010ee519d29262606fcb2ba4ab0a6fc
Parents: d9bceb5
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Tue Jul 21 19:55:13 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Tue Jul 21 19:55:13 2015 -0700

----------------------------------------------------------------------
 ...gniteIndexedObjectCacheFullApiTestSuite.java | 38 ++++++++++++++++++++
 .../config/GridTestProperties.java              |  3 ++
 .../junits/IgniteTestResources.java             | 17 ++++++++-
 3 files changed, 57 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ec2b0b5e/modules/core/src/test/java/org/apache/ignite/IgniteIndexedObjectCacheFullApiTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/IgniteIndexedObjectCacheFullApiTestSuite.java b/modules/core/src/test/java/org/apache/ignite/IgniteIndexedObjectCacheFullApiTestSuite.java
new file mode 100644
index 0000000..6963be4
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/IgniteIndexedObjectCacheFullApiTestSuite.java
@@ -0,0 +1,38 @@
+/*
+ * 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;
+
+import junit.framework.*;
+import org.apache.ignite.marshaller.optimized.*;
+import org.apache.ignite.testframework.config.*;
+import org.apache.ignite.testsuites.*;
+
+/**
+ *
+ */
+public class IgniteIndexedObjectCacheFullApiTestSuite {
+    /**
+     * @return Suite.
+     * @throws Exception In case of error.
+     */
+    public static TestSuite suite() throws Exception {
+        GridTestProperties.setProperty(GridTestProperties.OPTIMIZED_MARSH_PROTOCOL, OptimizedMarshallerProtocolVersion.VER_1_1.toString());
+
+        return IgniteCacheFullApiSelfTestSuite.suite();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ec2b0b5e/modules/core/src/test/java/org/apache/ignite/testframework/config/GridTestProperties.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/config/GridTestProperties.java b/modules/core/src/test/java/org/apache/ignite/testframework/config/GridTestProperties.java
index 9345618..a7c58d9 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/config/GridTestProperties.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/config/GridTestProperties.java
@@ -67,6 +67,9 @@ public final class GridTestProperties {
     public static final String MARSH_CLASS_NAME = "marshaller.class";
 
     /** */
+    public static final String OPTIMIZED_MARSH_PROTOCOL = "optimized.marshaller.protocol";
+
+    /** */
     static {
         // Initialize IGNITE_HOME system property.
         String igniteHome = System.getProperty("IGNITE_HOME");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ec2b0b5e/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteTestResources.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteTestResources.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteTestResources.java
index 68ae64b..d91cc0f 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteTestResources.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteTestResources.java
@@ -245,9 +245,24 @@ public class IgniteTestResources {
             }
         }
 
-        if (marsh instanceof OptimizedMarshaller)
+        if (marsh instanceof OptimizedMarshaller) {
             ((OptimizedMarshaller)marsh).setRequireSerializable(false);
 
+            OptimizedMarshallerProtocolVersion ver = OptimizedMarshallerProtocolVersion.VER_1;
+
+            String property = GridTestProperties.getProperty(GridTestProperties.OPTIMIZED_MARSH_PROTOCOL);
+
+            try {
+                if (property != null)
+                    ver = OptimizedMarshallerProtocolVersion.valueOf(property);
+            }
+            catch (IllegalArgumentException ignore) {
+                log.warning("Failed to set optimized marshaller protocol version: " + property);
+            }
+
+            ((OptimizedMarshaller)marsh).setProtocolVersion(ver);
+        }
+
         marsh.setContext(new MarshallerContextTestImpl());
 
         return marsh;