ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [21/50] [abbrv] ignite git commit: Fixing binary objects tests.
Date Tue, 01 Dec 2015 09:02:33 GMT
Fixing binary objects tests.


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

Branch: refs/heads/ignite-843-rc2
Commit: 87cbc1945343b2d0e4667362dba0514c831ca2b5
Parents: 8a822d8
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Sat Nov 28 14:07:29 2015 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Sat Nov 28 14:07:29 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/examples/model/Organization.java   | 7 +++++++
 .../main/java/org/apache/ignite/examples/model/Person.java    | 7 +++++++
 .../main/java/org/apache/ignite/internal/IgniteKernal.java    | 5 ++---
 .../org/apache/ignite/internal/portable/BinaryMarshaller.java | 2 --
 .../cache/IgniteCacheAbstractFieldsQuerySelfTest.java         | 4 ++--
 .../cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java      | 5 -----
 6 files changed, 18 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/87cbc194/examples/src/main/java/org/apache/ignite/examples/model/Organization.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/model/Organization.java b/examples/src/main/java/org/apache/ignite/examples/model/Organization.java
index 3881719..3dcaa44 100644
--- a/examples/src/main/java/org/apache/ignite/examples/model/Organization.java
+++ b/examples/src/main/java/org/apache/ignite/examples/model/Organization.java
@@ -38,6 +38,13 @@ public class Organization implements Serializable {
     public String name;
 
     /**
+     * Default empty constructor.
+     */
+    public Organization() {
+        // No-op.
+    }
+
+    /**
      * Create organization.
      *
      * @param name Organization name.

http://git-wip-us.apache.org/repos/asf/ignite/blob/87cbc194/examples/src/main/java/org/apache/ignite/examples/model/Person.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/model/Person.java b/examples/src/main/java/org/apache/ignite/examples/model/Person.java
index 616cf6a..5ccda51 100644
--- a/examples/src/main/java/org/apache/ignite/examples/model/Person.java
+++ b/examples/src/main/java/org/apache/ignite/examples/model/Person.java
@@ -59,6 +59,13 @@ public class Person implements Serializable {
     private transient AffinityKey<Long> key;
 
     /**
+     * Default empty constructor.
+     */
+    public Person() {
+        // No-op.
+    }
+
+    /**
      * Constructs person record.
      *
      * @param org       Organization.

http://git-wip-us.apache.org/repos/asf/ignite/blob/87cbc194/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 68d48c9..05b1997 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -1192,9 +1192,8 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
         if (cfg.getIncludeEventTypes() != null && cfg.getIncludeEventTypes().length
!= 0)
             perf.add("Disable grid events (remove 'includeEventTypes' from configuration)");
 
-        if (BinaryMarshaller.available() && !(cfg.getMarshaller() instanceof BinaryMarshaller))
-            perf.add("Enable binary marshaller (set 'marshaller' to " +
-                BinaryMarshaller.class.getSimpleName() + ')');
+        if (BinaryMarshaller.available() && (cfg.getMarshaller() != null || !(cfg.getMarshaller()
instanceof BinaryMarshaller)))
+            perf.add("Use default binary marshaller (do not set 'marshaller' explicitly)");
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/87cbc194/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryMarshaller.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryMarshaller.java
b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryMarshaller.java
index 759d802..bfaae74 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryMarshaller.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryMarshaller.java
@@ -33,8 +33,6 @@ import sun.misc.Unsafe;
 /**
  * Implementation of {@link org.apache.ignite.marshaller.Marshaller} that lets to serialize
and deserialize all objects
  * in the binary format.
- * <p>
- * {@code PortableMarshaller} is tested only on Java HotSpot VM on other VMs it could yield
unexpected results.
  */
 public class BinaryMarshaller extends AbstractMarshaller {
     /** */

http://git-wip-us.apache.org/repos/asf/ignite/blob/87cbc194/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java
index 1d21bdd..832f076 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java
@@ -270,7 +270,7 @@ public abstract class IgniteCacheAbstractFieldsQuerySelfTest extends GridCommonA
                     fields = meta.fields("Organization");
 
                     assert fields != null;
-                    assert fields.size() == 4;
+                    assertEquals("Fields: " + fields, 5, fields.size());
                     assert String.class.getName().equals(fields.get("_KEY"));
                     assert Organization.class.getName().equals(fields.get("_VAL"));
                     assert int.class.getName().equals(fields.get("ID"));
@@ -545,7 +545,7 @@ public abstract class IgniteCacheAbstractFieldsQuerySelfTest extends GridCommonA
         int cnt = 0;
 
         for (List<?> row : res) {
-            assert row.size() == 9;
+            assertEquals(10, row.size());
 
             if (cnt == 0) {
                 assert new AffinityKey<>("p1", "o1").equals(row.get(0));

http://git-wip-us.apache.org/repos/asf/ignite/blob/87cbc194/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java
index 6f8ca2d..411e363 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache;
 
 import java.io.IOException;
 import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
 import javax.cache.CacheException;
 import org.apache.ignite.cache.query.ScanQuery;
 import org.apache.ignite.cache.query.SqlQuery;
@@ -76,10 +75,6 @@ public class IgniteCacheP2pUnmarshallingQueryErrorTest extends IgniteCacheP2pUnm
                 private void readObject(ObjectInputStream is) throws IOException {
                     throw new IOException();
                 }
-
-                private void writeObject(ObjectOutputStream os) throws IOException {
-                    throw new IOException();
-                }
             })).getAll();
 
             assertTrue("Request unmarshalling failed, but error response was not sent.",
portableMarshaller());


Mime
View raw message