You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2016/02/04 15:45:19 UTC
[10/50] [abbrv] ignite git commit: IGNITE-2191 - Support classes with
the same simple name for Binary marshaller - Fixes #398.
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/core/src/test/java/org/apache/ignite/internal/binary/GridDefaultBinaryMappersBinaryMetaDataSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridDefaultBinaryMappersBinaryMetaDataSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridDefaultBinaryMappersBinaryMetaDataSelfTest.java
new file mode 100644
index 0000000..041238f
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridDefaultBinaryMappersBinaryMetaDataSelfTest.java
@@ -0,0 +1,389 @@
+/*
+ * 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.internal.binary;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import org.apache.ignite.IgniteBinary;
+import org.apache.ignite.binary.BinaryBasicIdMapper;
+import org.apache.ignite.binary.BinaryNameMapper;
+import org.apache.ignite.binary.BinaryBasicNameMapper;
+import org.apache.ignite.configuration.BinaryConfiguration;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.binary.BinaryObjectException;
+import org.apache.ignite.binary.Binarylizable;
+import org.apache.ignite.binary.BinaryType;
+import org.apache.ignite.binary.BinaryObject;
+import org.apache.ignite.binary.BinaryRawWriter;
+import org.apache.ignite.binary.BinaryReader;
+import org.apache.ignite.binary.BinaryWriter;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+
+/**
+ * Binary meta data test.
+ */
+public class GridDefaultBinaryMappersBinaryMetaDataSelfTest extends GridCommonAbstractTest {
+ /** */
+ private static IgniteConfiguration cfg;
+
+ /** */
+ private static int idx;
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ BinaryConfiguration bCfg = new BinaryConfiguration();
+
+ bCfg.setNameMapper(new BinaryBasicNameMapper(false));
+ bCfg.setIdMapper(new BinaryBasicIdMapper(false));
+
+ bCfg.setClassNames(Arrays.asList(TestObject1.class.getName(), TestObject2.class.getName()));
+
+ cfg.setBinaryConfiguration(bCfg);
+
+ cfg.setMarshaller(new BinaryMarshaller());
+
+ CacheConfiguration ccfg = new CacheConfiguration();
+
+ cfg.setCacheConfiguration(ccfg);
+
+ GridDefaultBinaryMappersBinaryMetaDataSelfTest.cfg = cfg;
+
+ return cfg;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void beforeTest() throws Exception {
+ idx = 0;
+
+ startGrid();
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTest() throws Exception {
+ stopGrid();
+ }
+
+ /**
+ * @return Binaries API.
+ */
+ protected IgniteBinary binaries() {
+ return grid().binary();
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testGetAll() throws Exception {
+ binaries().toBinary(new TestObject2());
+
+ Collection<BinaryType> metas = binaries().types();
+
+ assertEquals(2, metas.size());
+
+ for (BinaryType meta : metas) {
+ Collection<String> fields;
+
+ if (expectedTypeName(TestObject1.class.getName()).equals(meta.typeName())) {
+ fields = meta.fieldNames();
+
+ assertEquals(7, fields.size());
+
+ assertTrue(fields.contains("intVal"));
+ assertTrue(fields.contains("strVal"));
+ assertTrue(fields.contains("arrVal"));
+ assertTrue(fields.contains("obj1Val"));
+ assertTrue(fields.contains("obj2Val"));
+ assertTrue(fields.contains("decVal"));
+ assertTrue(fields.contains("decArrVal"));
+
+ assertEquals("int", meta.fieldTypeName("intVal"));
+ assertEquals("String", meta.fieldTypeName("strVal"));
+ assertEquals("byte[]", meta.fieldTypeName("arrVal"));
+ assertEquals("Object", meta.fieldTypeName("obj1Val"));
+ assertEquals("Object", meta.fieldTypeName("obj2Val"));
+ assertEquals("decimal", meta.fieldTypeName("decVal"));
+ assertEquals("decimal[]", meta.fieldTypeName("decArrVal"));
+ }
+ else if (expectedTypeName(TestObject2.class.getName()).equals(meta.typeName())) {
+ fields = meta.fieldNames();
+
+ assertEquals(7, fields.size());
+
+ assertTrue(fields.contains("boolVal"));
+ assertTrue(fields.contains("dateVal"));
+ assertTrue(fields.contains("uuidArrVal"));
+ assertTrue(fields.contains("objVal"));
+ assertTrue(fields.contains("mapVal"));
+ assertTrue(fields.contains("decVal"));
+ assertTrue(fields.contains("decArrVal"));
+
+ assertEquals("boolean", meta.fieldTypeName("boolVal"));
+ assertEquals("Date", meta.fieldTypeName("dateVal"));
+ assertEquals("UUID[]", meta.fieldTypeName("uuidArrVal"));
+ assertEquals("Object", meta.fieldTypeName("objVal"));
+ assertEquals("Map", meta.fieldTypeName("mapVal"));
+ assertEquals("decimal", meta.fieldTypeName("decVal"));
+ assertEquals("decimal[]", meta.fieldTypeName("decArrVal"));
+ }
+ else
+ assert false : meta.typeName();
+ }
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testNoConfiguration() throws Exception {
+ binaries().toBinary(new TestObject3());
+
+ assertNotNull(binaries().type(TestObject3.class));
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testReflection() throws Exception {
+ BinaryType meta = binaries().type(TestObject1.class);
+
+ assertNotNull(meta);
+
+ assertEquals(expectedTypeName(TestObject1.class.getName()), meta.typeName());
+
+ Collection<String> fields = meta.fieldNames();
+
+ assertEquals(7, fields.size());
+
+ assertTrue(fields.contains("intVal"));
+ assertTrue(fields.contains("strVal"));
+ assertTrue(fields.contains("arrVal"));
+ assertTrue(fields.contains("obj1Val"));
+ assertTrue(fields.contains("obj2Val"));
+ assertTrue(fields.contains("decVal"));
+ assertTrue(fields.contains("decArrVal"));
+
+ assertEquals("int", meta.fieldTypeName("intVal"));
+ assertEquals("String", meta.fieldTypeName("strVal"));
+ assertEquals("byte[]", meta.fieldTypeName("arrVal"));
+ assertEquals("Object", meta.fieldTypeName("obj1Val"));
+ assertEquals("Object", meta.fieldTypeName("obj2Val"));
+ assertEquals("decimal", meta.fieldTypeName("decVal"));
+ assertEquals("decimal[]", meta.fieldTypeName("decArrVal"));
+ }
+
+ /**
+ * @param clsName Class name.
+ * @return Type name.
+ */
+ private String expectedTypeName(String clsName) {
+ BinaryNameMapper mapper = cfg.getBinaryConfiguration().getNameMapper();
+
+ if (mapper == null)
+ mapper = BinaryContext.defaultNameMapper();
+
+ return mapper.typeName(clsName);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testBinaryMarshalAware() throws Exception {
+ binaries().toBinary(new TestObject2());
+
+ BinaryType meta = binaries().type(TestObject2.class);
+
+ assertNotNull(meta);
+
+ assertEquals(expectedTypeName(TestObject2.class.getName()), meta.typeName());
+
+ Collection<String> fields = meta.fieldNames();
+
+ assertEquals(7, fields.size());
+
+ assertTrue(fields.contains("boolVal"));
+ assertTrue(fields.contains("dateVal"));
+ assertTrue(fields.contains("uuidArrVal"));
+ assertTrue(fields.contains("objVal"));
+ assertTrue(fields.contains("mapVal"));
+ assertTrue(fields.contains("decVal"));
+ assertTrue(fields.contains("decArrVal"));
+
+ assertEquals("boolean", meta.fieldTypeName("boolVal"));
+ assertEquals("Date", meta.fieldTypeName("dateVal"));
+ assertEquals("UUID[]", meta.fieldTypeName("uuidArrVal"));
+ assertEquals("Object", meta.fieldTypeName("objVal"));
+ assertEquals("Map", meta.fieldTypeName("mapVal"));
+ assertEquals("decimal", meta.fieldTypeName("decVal"));
+ assertEquals("decimal[]", meta.fieldTypeName("decArrVal"));
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testMerge() throws Exception {
+ binaries().toBinary(new TestObject2());
+
+ idx = 1;
+
+ binaries().toBinary(new TestObject2());
+
+ BinaryType meta = binaries().type(TestObject2.class);
+
+ assertNotNull(meta);
+
+ assertEquals(expectedTypeName(TestObject2.class.getName()), meta.typeName());
+
+ Collection<String> fields = meta.fieldNames();
+
+ assertEquals(9, fields.size());
+
+ assertTrue(fields.contains("boolVal"));
+ assertTrue(fields.contains("dateVal"));
+ assertTrue(fields.contains("uuidArrVal"));
+ assertTrue(fields.contains("objVal"));
+ assertTrue(fields.contains("mapVal"));
+ assertTrue(fields.contains("charVal"));
+ assertTrue(fields.contains("colVal"));
+ assertTrue(fields.contains("decVal"));
+ assertTrue(fields.contains("decArrVal"));
+
+ assertEquals("boolean", meta.fieldTypeName("boolVal"));
+ assertEquals("Date", meta.fieldTypeName("dateVal"));
+ assertEquals("UUID[]", meta.fieldTypeName("uuidArrVal"));
+ assertEquals("Object", meta.fieldTypeName("objVal"));
+ assertEquals("Map", meta.fieldTypeName("mapVal"));
+ assertEquals("char", meta.fieldTypeName("charVal"));
+ assertEquals("Collection", meta.fieldTypeName("colVal"));
+ assertEquals("decimal", meta.fieldTypeName("decVal"));
+ assertEquals("decimal[]", meta.fieldTypeName("decArrVal"));
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testSerializedObject() throws Exception {
+ TestObject1 obj = new TestObject1();
+
+ obj.intVal = 10;
+ obj.strVal = "str";
+ obj.arrVal = new byte[] {2, 4, 6};
+ obj.obj1Val = null;
+ obj.obj2Val = new TestObject2();
+ obj.decVal = BigDecimal.ZERO;
+ obj.decArrVal = new BigDecimal[] { BigDecimal.ONE };
+
+ BinaryObject po = binaries().toBinary(obj);
+
+ info(po.toString());
+
+ BinaryType meta = po.type();
+
+ assertNotNull(meta);
+
+ assertEquals(expectedTypeName(TestObject1.class.getName()), meta.typeName());
+
+ Collection<String> fields = meta.fieldNames();
+
+ assertEquals(7, fields.size());
+
+ assertTrue(fields.contains("intVal"));
+ assertTrue(fields.contains("strVal"));
+ assertTrue(fields.contains("arrVal"));
+ assertTrue(fields.contains("obj1Val"));
+ assertTrue(fields.contains("obj2Val"));
+ assertTrue(fields.contains("decVal"));
+ assertTrue(fields.contains("decArrVal"));
+
+ assertEquals("int", meta.fieldTypeName("intVal"));
+ assertEquals("String", meta.fieldTypeName("strVal"));
+ assertEquals("byte[]", meta.fieldTypeName("arrVal"));
+ assertEquals("Object", meta.fieldTypeName("obj1Val"));
+ assertEquals("Object", meta.fieldTypeName("obj2Val"));
+ assertEquals("decimal", meta.fieldTypeName("decVal"));
+ assertEquals("decimal[]", meta.fieldTypeName("decArrVal"));
+ }
+
+ /**
+ */
+ @SuppressWarnings("UnusedDeclaration")
+ private static class TestObject1 {
+ /** */
+ private int intVal;
+
+ /** */
+ private String strVal;
+
+ /** */
+ private byte[] arrVal;
+
+ /** */
+ private TestObject1 obj1Val;
+
+ /** */
+ private TestObject2 obj2Val;
+
+ /** */
+ private BigDecimal decVal;
+
+ /** */
+ private BigDecimal[] decArrVal;
+ }
+
+ /**
+ */
+ private static class TestObject2 implements Binarylizable {
+ /** {@inheritDoc} */
+ @Override public void writeBinary(BinaryWriter writer) throws BinaryObjectException {
+ writer.writeBoolean("boolVal", false);
+ writer.writeDate("dateVal", new Date());
+ writer.writeUuidArray("uuidArrVal", null);
+ writer.writeObject("objVal", null);
+ writer.writeMap("mapVal", new HashMap<>());
+ writer.writeDecimal("decVal", BigDecimal.ZERO);
+ writer.writeDecimalArray("decArrVal", new BigDecimal[] { BigDecimal.ONE });
+
+ if (idx == 1) {
+ writer.writeChar("charVal", (char)0);
+ writer.writeCollection("colVal", null);
+ }
+
+ BinaryRawWriter raw = writer.rawWriter();
+
+ raw.writeChar((char)0);
+ raw.writeCollection(null);
+ }
+
+ /** {@inheritDoc} */
+ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException {
+ // No-op.
+ }
+ }
+
+ /**
+ */
+ @SuppressWarnings("UnusedDeclaration")
+ private static class TestObject3 {
+ /** */
+ private int intVal;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/core/src/test/java/org/apache/ignite/internal/binary/GridSimpleLowerCaseBinaryMappersBinaryMetaDataSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridSimpleLowerCaseBinaryMappersBinaryMetaDataSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridSimpleLowerCaseBinaryMappersBinaryMetaDataSelfTest.java
new file mode 100644
index 0000000..74c13ce
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridSimpleLowerCaseBinaryMappersBinaryMetaDataSelfTest.java
@@ -0,0 +1,41 @@
+/*
+ * 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.internal.binary;
+
+import org.apache.ignite.binary.BinaryBasicIdMapper;
+import org.apache.ignite.binary.BinaryBasicNameMapper;
+import org.apache.ignite.configuration.BinaryConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+
+/**
+ * Binary meta data test.
+ */
+public class GridSimpleLowerCaseBinaryMappersBinaryMetaDataSelfTest
+ extends GridDefaultBinaryMappersBinaryMetaDataSelfTest {
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ BinaryConfiguration bCfg = cfg.getBinaryConfiguration();
+
+ bCfg.setNameMapper(new BinaryBasicNameMapper());
+ bCfg.setIdMapper(new BinaryBasicIdMapper(true));
+
+ return cfg;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/core/src/test/java/org/apache/ignite/internal/binary/TestMappedObject.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/TestMappedObject.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/TestMappedObject.java
new file mode 100644
index 0000000..8705f6a
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/TestMappedObject.java
@@ -0,0 +1,25 @@
+/*
+ * 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.internal.binary;
+
+/**
+ *
+ */
+public class TestMappedObject {
+
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/core/src/test/java/org/apache/ignite/internal/binary/noncompact/BinaryObjectBuilderNonCompactDefaultMappersSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/noncompact/BinaryObjectBuilderNonCompactDefaultMappersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/noncompact/BinaryObjectBuilderNonCompactDefaultMappersSelfTest.java
new file mode 100644
index 0000000..88a1296
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/noncompact/BinaryObjectBuilderNonCompactDefaultMappersSelfTest.java
@@ -0,0 +1,30 @@
+/*
+ * 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.internal.binary.noncompact;
+
+import org.apache.ignite.internal.binary.BinaryObjectBuilderDefaultMappersSelfTest;
+
+/**
+ * Binary builder test for objects with non-compact footer.
+ */
+public class BinaryObjectBuilderNonCompactDefaultMappersSelfTest extends BinaryObjectBuilderDefaultMappersSelfTest {
+ /** {@inheritDoc} */
+ @Override protected boolean compactFooter() {
+ return false;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/core/src/test/java/org/apache/ignite/internal/binary/noncompact/BinaryObjectBuilderNonCompactSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/noncompact/BinaryObjectBuilderNonCompactSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/noncompact/BinaryObjectBuilderNonCompactSelfTest.java
deleted file mode 100644
index c698783..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/binary/noncompact/BinaryObjectBuilderNonCompactSelfTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.internal.binary.noncompact;
-
-import org.apache.ignite.internal.binary.BinaryObjectBuilderSelfTest;
-
-/**
- * Binary builder test for objects with non-compact footer.
- */
-public class BinaryObjectBuilderNonCompactSelfTest extends BinaryObjectBuilderSelfTest {
- /** {@inheritDoc} */
- @Override protected boolean compactFooter() {
- return false;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/core/src/test/java/org/apache/ignite/internal/binary/noncompact/BinaryObjectBuilderNonCompactSimpleNameLowerCaseMappersSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/noncompact/BinaryObjectBuilderNonCompactSimpleNameLowerCaseMappersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/noncompact/BinaryObjectBuilderNonCompactSimpleNameLowerCaseMappersSelfTest.java
new file mode 100644
index 0000000..821c41b
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/noncompact/BinaryObjectBuilderNonCompactSimpleNameLowerCaseMappersSelfTest.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.internal.binary.noncompact;
+
+import org.apache.ignite.internal.binary.BinaryObjectBuilderSimpleNameLowerCaseMappersSelfTest;
+
+/**
+ * Binary builder test for objects with non-compact footer.
+ */
+public class BinaryObjectBuilderNonCompactSimpleNameLowerCaseMappersSelfTest
+ extends BinaryObjectBuilderSimpleNameLowerCaseMappersSelfTest {
+ /** {@inheritDoc} */
+ @Override protected boolean compactFooter() {
+ return false;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConditionalDeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConditionalDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConditionalDeploymentSelfTest.java
index ea16c1f..3e96cf7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConditionalDeploymentSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConditionalDeploymentSelfTest.java
@@ -21,8 +21,8 @@ import org.apache.ignite.Ignite;
import org.apache.ignite.Ignition;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.managers.communication.GridIoMessageFactory;
import org.apache.ignite.internal.binary.BinaryMarshaller;
+import org.apache.ignite.internal.managers.communication.GridIoMessageFactory;
import org.apache.ignite.internal.util.IgniteUtils;
import org.apache.ignite.internal.util.typedef.CO;
import org.apache.ignite.plugin.extensions.communication.Message;
@@ -91,6 +91,8 @@ public class GridCacheConditionalDeploymentSelfTest extends GridCommonAbstractTe
startGrid(1);
+ awaitPartitionMapExchange();
+
ignite0.cache(null).put(1, new TestValue());
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java
index 2da781b..271e3b5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java
@@ -30,6 +30,7 @@ import javax.cache.processor.MutableEntry;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteBinary;
+import org.apache.ignite.binary.BinaryNameMapper;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.CachePeekMode;
@@ -38,6 +39,7 @@ import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.configuration.NearCacheConfiguration;
import org.apache.ignite.internal.IgniteKernal;
+import org.apache.ignite.internal.binary.BinaryContext;
import org.apache.ignite.internal.binary.BinaryObjectImpl;
import org.apache.ignite.internal.processors.cache.GridCacheAdapter;
import org.apache.ignite.internal.processors.cache.GridCacheEntryEx;
@@ -77,6 +79,9 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA
/** */
private static final int ENTRY_CNT = 100;
+ /** */
+ private static IgniteConfiguration cfg;
+
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
@@ -109,6 +114,8 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA
cfg.setMarshaller(new BinaryMarshaller());
+ this.cfg = cfg;
+
return cfg;
}
@@ -200,8 +207,14 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA
assertNotNull(str);
- assertTrue("Unexpected toString: " + str,
- str.startsWith("TestReferenceObject") && str.contains("obj=TestReferenceObject ["));
+ BinaryNameMapper nameMapper = BinaryContext.defaultNameMapper();
+
+ if (cfg.getBinaryConfiguration() != null && cfg.getBinaryConfiguration().getNameMapper() != null)
+ nameMapper = cfg.getBinaryConfiguration().getNameMapper();
+
+ String typeName = nameMapper.typeName(TestReferenceObject.class.getName());
+
+ assertTrue("Unexpected toString: " + str, str.startsWith(typeName) && str.contains("obj=" + typeName + " ["));
TestReferenceObject obj1_r = po.deserialize();
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java
index 0cfa88b..63ed30e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java
@@ -24,6 +24,8 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import javax.cache.Cache;
+import org.apache.ignite.binary.BinaryBasicIdMapper;
+import org.apache.ignite.binary.BinaryBasicNameMapper;
import org.apache.ignite.cache.store.CacheStoreAdapter;
import org.apache.ignite.configuration.BinaryConfiguration;
import org.apache.ignite.configuration.CacheConfiguration;
@@ -46,6 +48,9 @@ public abstract class GridCacheBinaryStoreAbstractSelfTest extends GridCommonAbs
/** */
private static final TestStore STORE = new TestStore();
+ /** */
+ protected static IgniteConfiguration cfg;
+
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
@@ -53,6 +58,9 @@ public abstract class GridCacheBinaryStoreAbstractSelfTest extends GridCommonAbs
BinaryConfiguration bCfg = new BinaryConfiguration();
+ bCfg.setNameMapper(new BinaryBasicNameMapper(false));
+ bCfg.setIdMapper(new BinaryBasicIdMapper(false));
+
bCfg.setClassNames(Arrays.asList(Key.class.getName(), Value.class.getName()));
cfg.setBinaryConfiguration(bCfg);
@@ -75,6 +83,8 @@ public abstract class GridCacheBinaryStoreAbstractSelfTest extends GridCommonAbs
cfg.setDiscoverySpi(disco);
+ GridCacheBinaryStoreAbstractSelfTest.cfg = cfg;
+
return cfg;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreBinariesDefaultMappersSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreBinariesDefaultMappersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreBinariesDefaultMappersSelfTest.java
new file mode 100644
index 0000000..47fc53b
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreBinariesDefaultMappersSelfTest.java
@@ -0,0 +1,81 @@
+/*
+ * 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.internal.processors.cache.binary;
+
+import java.util.Map;
+import org.apache.ignite.binary.BinaryNameMapper;
+import org.apache.ignite.binary.BinaryObject;
+import org.apache.ignite.internal.binary.BinaryContext;
+
+/**
+ * Tests for cache store with binary.
+ */
+public class GridCacheBinaryStoreBinariesDefaultMappersSelfTest extends GridCacheBinaryStoreAbstractSelfTest {
+ /** {@inheritDoc} */
+ @Override protected boolean keepBinaryInStore() {
+ return true;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void populateMap(Map<Object, Object> map, int... idxs) {
+ assert map != null;
+ assert idxs != null;
+
+ for (int idx : idxs)
+ map.put(binary(new Key(idx)), binary(new Value(idx)));
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void checkMap(Map<Object, Object> map, int... idxs) {
+ assert map != null;
+ assert idxs != null;
+
+ assertEquals(idxs.length, map.size());
+
+ for (int idx : idxs) {
+ Object val = map.get(binary(new Key(idx)));
+
+ assertTrue(String.valueOf(val), val instanceof BinaryObject);
+
+ BinaryObject po = (BinaryObject)val;
+
+ assertEquals(expectedTypeName(Value.class.getName()), po.type().typeName());
+ assertEquals(new Integer(idx), po.field("idx"));
+ }
+ }
+
+ /**
+ * @param clsName Class name.
+ * @return Type name.
+ */
+ private String expectedTypeName(String clsName) {
+ BinaryNameMapper nameMapper = cfg.getBinaryConfiguration().getNameMapper();
+
+ if (nameMapper == null)
+ nameMapper = BinaryContext.defaultNameMapper();
+
+ return nameMapper.typeName(clsName);
+ }
+
+ /**
+ * @param obj Object.
+ * @return Binary object.
+ */
+ private Object binary(Object obj) {
+ return grid().binary().toBinary(obj);
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreBinariesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreBinariesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreBinariesSelfTest.java
deleted file mode 100644
index 4d163b3..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreBinariesSelfTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.internal.processors.cache.binary;
-
-import java.util.Map;
-import org.apache.ignite.binary.BinaryObject;
-
-/**
- * Tests for cache store with binary.
- */
-public class GridCacheBinaryStoreBinariesSelfTest extends GridCacheBinaryStoreAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected boolean keepBinaryInStore() {
- return true;
- }
-
- /** {@inheritDoc} */
- @Override protected void populateMap(Map<Object, Object> map, int... idxs) {
- assert map != null;
- assert idxs != null;
-
- for (int idx : idxs)
- map.put(binary(new Key(idx)), binary(new Value(idx)));
- }
-
- /** {@inheritDoc} */
- @Override protected void checkMap(Map<Object, Object> map, int... idxs) {
- assert map != null;
- assert idxs != null;
-
- assertEquals(idxs.length, map.size());
-
- for (int idx : idxs) {
- Object val = map.get(binary(new Key(idx)));
-
- assertTrue(String.valueOf(val), val instanceof BinaryObject);
-
- BinaryObject po = (BinaryObject)val;
-
- assertEquals("Value", po.type().typeName());
- assertEquals(new Integer(idx), po.field("idx"));
- }
- }
-
- /**
- * @param obj Object.
- * @return Binary object.
- */
- private Object binary(Object obj) {
- return grid().binary().toBinary(obj);
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreBinariesSimpleNameMappersSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreBinariesSimpleNameMappersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreBinariesSimpleNameMappersSelfTest.java
new file mode 100644
index 0000000..0aee2f2
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreBinariesSimpleNameMappersSelfTest.java
@@ -0,0 +1,40 @@
+/*
+ * 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.internal.processors.cache.binary;
+
+import org.apache.ignite.binary.BinaryBasicIdMapper;
+import org.apache.ignite.binary.BinaryBasicNameMapper;
+import org.apache.ignite.configuration.BinaryConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+
+/**
+ * Tests for cache store with binary.
+ */
+public class GridCacheBinaryStoreBinariesSimpleNameMappersSelfTest
+ extends GridCacheBinaryStoreBinariesDefaultMappersSelfTest {
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ BinaryConfiguration bCfg = cfg.getBinaryConfiguration();
+
+ bCfg.setNameMapper(new BinaryBasicNameMapper());
+ bCfg.setIdMapper(new BinaryBasicIdMapper(true));
+
+ return cfg;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/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 491f38f..d13f117 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
@@ -79,6 +79,9 @@ public final class GridTestProperties {
public static final String BINARY_COMPACT_FOOTERS = "binary.marshaller.compact.footers";
/** */
+ public static final String BINARY_MARSHALLER_USE_SIMPLE_NAME_MAPPER = "binary.marshaller.use.simple.name.mapper";
+
+ /** */
static {
// Initialize IGNITE_HOME system property.
String igniteHome = System.getProperty("IGNITE_HOME");
@@ -321,4 +324,4 @@ public final class GridTestProperties {
return props;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
index 8bf877a..27511ff 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
@@ -50,6 +50,7 @@ import org.apache.ignite.IgniteException;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.IgniteSystemProperties;
import org.apache.ignite.Ignition;
+import org.apache.ignite.binary.BinaryBasicNameMapper;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.configuration.BinaryConfiguration;
import org.apache.ignite.configuration.CacheConfiguration;
@@ -104,6 +105,7 @@ import org.springframework.context.support.FileSystemXmlApplicationContext;
import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
+import static org.apache.ignite.testframework.config.GridTestProperties.BINARY_MARSHALLER_USE_SIMPLE_NAME_MAPPER;
/**
* Common abstract test for Ignite tests.
@@ -732,7 +734,14 @@ public abstract class GridAbstractTest extends TestCase {
startingGrid.set(gridName);
try {
- return IgnitionEx.start(optimize(getConfiguration(gridName)), ctx);
+ Ignite node = IgnitionEx.start(optimize(getConfiguration(gridName)), ctx);
+
+ IgniteConfiguration cfg = node.configuration();
+
+ log.info("Node started with the following configuration [id=" + node.cluster().localNode().id()
+ + ", marshaller=" + cfg.getMarshaller() + ", binaryCfg=" + cfg.getBinaryConfiguration() + "]");
+
+ return node;
}
finally {
startingGrid.set(null);
@@ -1143,6 +1152,18 @@ public abstract class GridAbstractTest extends TestCase {
}
}
+ if (Boolean.valueOf(GridTestProperties.getProperty(BINARY_MARSHALLER_USE_SIMPLE_NAME_MAPPER))) {
+ BinaryConfiguration bCfg = cfg.getBinaryConfiguration();
+
+ if (bCfg == null) {
+ bCfg = new BinaryConfiguration();
+
+ cfg.setBinaryConfiguration(bCfg);
+ }
+
+ bCfg.setNameMapper(new BinaryBasicNameMapper(true));
+ }
+
if (gridName != null && gridName.matches(".*\\d")) {
String idStr = UUID.randomUUID().toString();
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
index bcd1ede..dece258 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
@@ -111,7 +111,7 @@ public class IgniteBasicTestSuite extends TestSuite {
suite.addTestSuite(GridFailFastNodeFailureDetectionSelfTest.class);
suite.addTestSuite(OffHeapTieredTransactionSelfTest.class);
suite.addTestSuite(IgniteSlowClientDetectionSelfTest.class);
- suite.addTestSuite(IgniteDaemonNodeMarshallerCacheTest.class);
+ GridTestUtils.addTestIfNeeded(suite, IgniteDaemonNodeMarshallerCacheTest.class, ignoredTests);
suite.addTestSuite(IgniteMarshallerCacheConcurrentReadWriteTest.class);
suite.addTestSuite(IgniteExceptionInNioWorkerSelfTest.class);
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryBasicTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryBasicTestSuite.java
new file mode 100644
index 0000000..cbb87fa
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryBasicTestSuite.java
@@ -0,0 +1,95 @@
+/*
+ * 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.testsuites;
+
+import java.util.HashSet;
+import java.util.Set;
+import junit.framework.TestSuite;
+import org.apache.ignite.internal.ClusterGroupSelfTest;
+import org.apache.ignite.internal.GridReleaseTypeSelfTest;
+import org.apache.ignite.internal.GridVersionSelfTest;
+import org.apache.ignite.internal.binary.BinaryMarshaller;
+import org.apache.ignite.internal.managers.deployment.GridDeploymentMessageCountSelfTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheP2pUnmarshallingErrorTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheP2pUnmarshallingNearErrorTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheP2pUnmarshallingRebalanceErrorTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheP2pUnmarshallingTxErrorTest;
+import org.apache.ignite.internal.processors.cache.IgniteDaemonNodeMarshallerCacheTest;
+import org.apache.ignite.internal.util.GridStartupWithSpecifiedWorkDirectorySelfTest;
+import org.apache.ignite.internal.util.IgniteUtilsSelfTest;
+import org.apache.ignite.internal.util.io.GridUnsafeDataOutputArraySizingSelfTest;
+import org.apache.ignite.internal.util.nio.GridNioSelfTest;
+import org.apache.ignite.internal.util.nio.GridNioSslSelfTest;
+import org.apache.ignite.marshaller.jdk.GridJdkMarshallerSelfTest;
+import org.apache.ignite.marshaller.optimized.OptimizedMarshallerEnumSelfTest;
+import org.apache.ignite.marshaller.optimized.OptimizedMarshallerNodeFailoverTest;
+import org.apache.ignite.marshaller.optimized.OptimizedMarshallerSelfTest;
+import org.apache.ignite.marshaller.optimized.OptimizedMarshallerSerialPersistentFieldsSelfTest;
+import org.apache.ignite.marshaller.optimized.OptimizedMarshallerTest;
+import org.apache.ignite.marshaller.optimized.OptimizedObjectStreamSelfTest;
+import org.apache.ignite.messaging.GridMessagingNoPeerClassLoadingSelfTest;
+import org.apache.ignite.messaging.GridMessagingSelfTest;
+import org.apache.ignite.testframework.config.GridTestProperties;
+
+/**
+ * Basic test suite.
+ */
+public class IgniteBinaryBasicTestSuite extends TestSuite {
+ /**
+ * @return Test suite.
+ * @throws Exception Thrown in case of the failure.
+ */
+ public static TestSuite suite() throws Exception {
+ GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, BinaryMarshaller.class.getName());
+
+ TestSuite suite = new TestSuite("GridGain Binary Basic Test Suite");
+
+ Set<Class> ignoredTests = new HashSet<>();
+
+ // Tests that are not ready to be used with PortableMarshaller
+ ignoredTests.add(GridJdkMarshallerSelfTest.class);
+ ignoredTests.add(OptimizedMarshallerEnumSelfTest.class);
+ ignoredTests.add(OptimizedMarshallerSelfTest.class);
+ ignoredTests.add(OptimizedMarshallerTest.class);
+ ignoredTests.add(OptimizedObjectStreamSelfTest.class);
+ ignoredTests.add(GridUnsafeDataOutputArraySizingSelfTest.class);
+ ignoredTests.add(OptimizedMarshallerNodeFailoverTest.class);
+ ignoredTests.add(OptimizedMarshallerSerialPersistentFieldsSelfTest.class);
+ ignoredTests.add(GridNioSslSelfTest.class);
+ ignoredTests.add(GridNioSelfTest.class);
+ ignoredTests.add(IgniteCacheP2pUnmarshallingErrorTest.class);
+ ignoredTests.add(IgniteCacheP2pUnmarshallingTxErrorTest.class);
+ ignoredTests.add(IgniteCacheP2pUnmarshallingNearErrorTest.class);
+ ignoredTests.add(IgniteCacheP2pUnmarshallingRebalanceErrorTest.class);
+ ignoredTests.add(GridReleaseTypeSelfTest.class);
+ ignoredTests.add(GridStartupWithSpecifiedWorkDirectorySelfTest.class);
+ ignoredTests.add(IgniteUtilsSelfTest.class);
+ ignoredTests.add(ClusterGroupSelfTest.class);
+ ignoredTests.add(GridMessagingNoPeerClassLoadingSelfTest.class);
+ ignoredTests.add(GridMessagingSelfTest.class);
+ ignoredTests.add(GridVersionSelfTest.class);
+ ignoredTests.add(GridDeploymentMessageCountSelfTest.class);
+
+ // TODO: check and delete if pass.
+ ignoredTests.add(IgniteDaemonNodeMarshallerCacheTest.class);
+
+ suite.addTest(IgniteBasicTestSuite.suite(ignoredTests));
+
+ return suite;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsSimpleNameMapperComputeGridTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsSimpleNameMapperComputeGridTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsSimpleNameMapperComputeGridTestSuite.java
new file mode 100644
index 0000000..d3ea755
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsSimpleNameMapperComputeGridTestSuite.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.testsuites;
+
+import junit.framework.TestSuite;
+import org.apache.ignite.internal.binary.BinaryMarshaller;
+import org.apache.ignite.testframework.config.GridTestProperties;
+
+/**
+ *
+ */
+public class IgniteBinaryObjectsSimpleNameMapperComputeGridTestSuite {
+ /**
+ * @return Test suite.
+ * @throws Exception If failed.
+ */
+ public static TestSuite suite() throws Exception {
+ GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, BinaryMarshaller.class.getName());
+ GridTestProperties.setProperty(GridTestProperties.BINARY_MARSHALLER_USE_SIMPLE_NAME_MAPPER, "true");
+
+ return IgniteComputeGridTestSuite.suite();
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java
index 9651f6d..5eb7b66 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java
@@ -18,6 +18,9 @@
package org.apache.ignite.testsuites;
import junit.framework.TestSuite;
+import org.apache.ignite.internal.binary.BinaryBasicIdMapperSelfTest;
+import org.apache.ignite.internal.binary.BinaryBasicNameMapperSelfTest;
+import org.apache.ignite.internal.binary.BinaryConfigurationConsistencySelfTest;
import org.apache.ignite.internal.binary.BinaryEnumsSelfTest;
import org.apache.ignite.internal.binary.BinaryFieldsHeapSelfTest;
import org.apache.ignite.internal.binary.BinaryFieldsOffheapSelfTest;
@@ -25,19 +28,24 @@ import org.apache.ignite.internal.binary.BinaryFooterOffsetsHeapSelfTest;
import org.apache.ignite.internal.binary.BinaryFooterOffsetsOffheapSelfTest;
import org.apache.ignite.internal.binary.BinaryMarshallerSelfTest;
import org.apache.ignite.internal.binary.BinaryObjectBuilderAdditionalSelfTest;
-import org.apache.ignite.internal.binary.BinaryObjectBuilderSelfTest;
+import org.apache.ignite.internal.binary.BinaryObjectBuilderDefaultMappersSelfTest;
+import org.apache.ignite.internal.binary.BinaryObjectBuilderSimpleNameLowerCaseMappersSelfTest;
+import org.apache.ignite.internal.binary.BinarySimpleNameTestPropertySelfTest;
import org.apache.ignite.internal.binary.GridBinaryAffinityKeySelfTest;
import org.apache.ignite.internal.binary.GridBinaryMarshallerCtxDisabledSelfTest;
-import org.apache.ignite.internal.binary.GridBinaryMetaDataSelfTest;
import org.apache.ignite.internal.binary.GridBinaryWildcardsSelfTest;
+import org.apache.ignite.internal.binary.GridDefaultBinaryMappersBinaryMetaDataSelfTest;
+import org.apache.ignite.internal.binary.GridSimpleLowerCaseBinaryMappersBinaryMetaDataSelfTest;
import org.apache.ignite.internal.binary.noncompact.BinaryFieldsHeapNonCompactSelfTest;
import org.apache.ignite.internal.binary.noncompact.BinaryFieldsOffheapNonCompactSelfTest;
import org.apache.ignite.internal.binary.noncompact.BinaryFooterOffsetsHeapNonCompactSelfTest;
import org.apache.ignite.internal.binary.noncompact.BinaryFooterOffsetsOffheapNonCompactSelfTest;
import org.apache.ignite.internal.binary.noncompact.BinaryMarshallerNonCompactSelfTest;
import org.apache.ignite.internal.binary.noncompact.BinaryObjectBuilderAdditionalNonCompactSelfTest;
-import org.apache.ignite.internal.binary.noncompact.BinaryObjectBuilderNonCompactSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.GridCacheBinaryStoreBinariesSelfTest;
+import org.apache.ignite.internal.binary.noncompact.BinaryObjectBuilderNonCompactDefaultMappersSelfTest;
+import org.apache.ignite.internal.binary.noncompact.BinaryObjectBuilderNonCompactSimpleNameLowerCaseMappersSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.GridCacheBinaryStoreBinariesDefaultMappersSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.GridCacheBinaryStoreBinariesSimpleNameMappersSelfTest;
import org.apache.ignite.internal.processors.cache.binary.GridCacheBinaryStoreObjectsSelfTest;
import org.apache.ignite.internal.processors.cache.binary.GridCacheClientNodeBinaryObjectMetadataMultinodeTest;
import org.apache.ignite.internal.processors.cache.binary.GridCacheClientNodeBinaryObjectMetadataTest;
@@ -68,22 +76,31 @@ public class IgniteBinaryObjectsTestSuite extends TestSuite {
public static TestSuite suite() throws Exception {
TestSuite suite = new TestSuite("Ignite Binary Objects Test Suite");
+ suite.addTestSuite(BinarySimpleNameTestPropertySelfTest.class);
+
+ suite.addTestSuite(BinaryBasicIdMapperSelfTest.class);
+ suite.addTestSuite(BinaryBasicNameMapperSelfTest.class);
+
suite.addTestSuite(BinaryMarshallerSelfTest.class);
+ suite.addTestSuite(BinaryConfigurationConsistencySelfTest.class);
suite.addTestSuite(GridBinaryMarshallerCtxDisabledSelfTest.class);
- suite.addTestSuite(BinaryObjectBuilderSelfTest.class);
+ suite.addTestSuite(BinaryObjectBuilderDefaultMappersSelfTest.class);
+ suite.addTestSuite(BinaryObjectBuilderSimpleNameLowerCaseMappersSelfTest.class);
suite.addTestSuite(BinaryObjectBuilderAdditionalSelfTest.class);
suite.addTestSuite(BinaryFieldsHeapSelfTest.class);
suite.addTestSuite(BinaryFieldsOffheapSelfTest.class);
suite.addTestSuite(BinaryFooterOffsetsHeapSelfTest.class);
suite.addTestSuite(BinaryFooterOffsetsOffheapSelfTest.class);
suite.addTestSuite(BinaryEnumsSelfTest.class);
- suite.addTestSuite(GridBinaryMetaDataSelfTest.class);
+ suite.addTestSuite(GridDefaultBinaryMappersBinaryMetaDataSelfTest.class);
+ suite.addTestSuite(GridSimpleLowerCaseBinaryMappersBinaryMetaDataSelfTest.class);
suite.addTestSuite(GridBinaryAffinityKeySelfTest.class);
suite.addTestSuite(GridBinaryWildcardsSelfTest.class);
// Tests for objects with non-compact footers.
suite.addTestSuite(BinaryMarshallerNonCompactSelfTest.class);
- suite.addTestSuite(BinaryObjectBuilderNonCompactSelfTest.class);
+ suite.addTestSuite(BinaryObjectBuilderNonCompactDefaultMappersSelfTest.class);
+ suite.addTestSuite(BinaryObjectBuilderNonCompactSimpleNameLowerCaseMappersSelfTest.class);
suite.addTestSuite(BinaryObjectBuilderAdditionalNonCompactSelfTest.class);
suite.addTestSuite(BinaryFieldsHeapNonCompactSelfTest.class);
suite.addTestSuite(BinaryFieldsOffheapNonCompactSelfTest.class);
@@ -105,7 +122,8 @@ public class IgniteBinaryObjectsTestSuite extends TestSuite {
suite.addTestSuite(GridCacheBinaryObjectsPartitionedNearDisabledOffheapTieredSelfTest.class);
suite.addTestSuite(GridCacheBinaryStoreObjectsSelfTest.class);
- suite.addTestSuite(GridCacheBinaryStoreBinariesSelfTest.class);
+ suite.addTestSuite(GridCacheBinaryStoreBinariesDefaultMappersSelfTest.class);
+ suite.addTestSuite(GridCacheBinaryStoreBinariesSimpleNameMappersSelfTest.class);
suite.addTestSuite(GridCacheClientNodeBinaryObjectMetadataTest.class);
suite.addTestSuite(GridCacheClientNodeBinaryObjectMetadataMultinodeTest.class);
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperBasicTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperBasicTestSuite.java
new file mode 100644
index 0000000..77020bd
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperBasicTestSuite.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.testsuites;
+
+import junit.framework.TestSuite;
+import org.apache.ignite.internal.binary.BinaryMarshaller;
+import org.apache.ignite.testframework.config.GridTestProperties;
+
+/**
+ * Basic test suite.
+ */
+public class IgniteBinarySimpleNameMapperBasicTestSuite extends TestSuite {
+ /**
+ * @return Test suite.
+ * @throws Exception Thrown in case of the failure.
+ */
+ public static TestSuite suite() throws Exception {
+ GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, BinaryMarshaller.class.getName());
+ GridTestProperties.setProperty(GridTestProperties.BINARY_MARSHALLER_USE_SIMPLE_NAME_MAPPER, "true");
+
+ return IgniteBinaryBasicTestSuite.suite();
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperCacheFullApiTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperCacheFullApiTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperCacheFullApiTestSuite.java
new file mode 100644
index 0000000..bbf4297
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperCacheFullApiTestSuite.java
@@ -0,0 +1,39 @@
+/*
+ * 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.testsuites;
+
+import junit.framework.TestSuite;
+import org.apache.ignite.internal.binary.BinaryMarshaller;
+import org.apache.ignite.testframework.config.GridTestProperties;
+
+/**
+ * Cache full API suite with binary marshaller and simple name mapper.
+ */
+public class IgniteBinarySimpleNameMapperCacheFullApiTestSuite extends TestSuite {
+ /**
+ * @return Suite.
+ * @throws Exception In case of error.
+ */
+ public static TestSuite suite() throws Exception {
+ GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, BinaryMarshaller.class.getName());
+ GridTestProperties.setProperty(GridTestProperties.BINARY_MARSHALLER_USE_SIMPLE_NAME_MAPPER, "true");
+
+ return IgniteCacheFullApiSelfTestSuite.suite();
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java
index 3bab1f9..89ead35 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java
@@ -21,90 +21,10 @@ import junit.framework.TestSuite;
import org.apache.ignite.internal.binary.BinaryMarshaller;
import org.apache.ignite.internal.processors.cache.BinarySerializationQuerySelfTest;
import org.apache.ignite.internal.processors.cache.BinarySerializationQueryWithReflectiveSerializerSelfTest;
-import org.apache.ignite.internal.processors.cache.CacheLocalQueryMetricsSelfTest;
-import org.apache.ignite.internal.processors.cache.CachePartitionedQueryMetricsDistributedSelfTest;
-import org.apache.ignite.internal.processors.cache.CachePartitionedQueryMetricsLocalSelfTest;
-import org.apache.ignite.internal.processors.cache.CacheReplicatedQueryMetricsDistributedSelfTest;
-import org.apache.ignite.internal.processors.cache.CacheReplicatedQueryMetricsLocalSelfTest;
-import org.apache.ignite.internal.processors.cache.CacheScanPartitionQueryFallbackSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheCrossCacheQuerySelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheQueryIndexDisabledSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheQueryIndexingDisabledSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheQueryInternalKeysSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheQuerySerializationSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheReduceQueryMultithreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteBinaryObjectFieldsQuerySelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteBinaryWrappedObjectFieldsQuerySelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheBinaryObjectsScanSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheCollocatedQuerySelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheDuplicateEntityConfigurationSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheFieldsQueryNoDataSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheLargeResultSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheNoClassQuerySelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheOffheapEvictQueryTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheOffheapTieredMultithreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheP2pUnmarshallingQueryErrorTest;
-import org.apache.ignite.internal.processors.cache.IgniteCachePartitionedQueryMultiThreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheQueryEvictsMultiThreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheQueryIndexSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheQueryLoadSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheQueryMultiThreadedOffHeapTieredSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheQueryMultiThreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheQueryOffheapMultiThreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheSqlQueryMultiThreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.SqlFieldsQuerySelfTest;
import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryDuplicateIndexObjectPartitionedAtomicSelfTest;
import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryDuplicateIndexObjectPartitionedTransactionalSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheAtomicFieldsQuerySelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheAtomicNearEnabledFieldsQuerySelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheAtomicNearEnabledQuerySelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheAtomicQuerySelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheClientQueryReplicatedNodeRestartSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCachePartitionedFieldsQueryP2PEnabledSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCachePartitionedFieldsQuerySelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCachePartitionedQueryP2PDisabledSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCachePartitionedQuerySelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCachePartitionedSnapshotEnabledQuerySelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheQueryNodeRestartSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheQueryNodeRestartSelfTest2;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.IgniteCacheReplicatedFieldsQueryP2PEnabledSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.IgniteCacheReplicatedFieldsQuerySelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.IgniteCacheReplicatedQueryP2PDisabledSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.IgniteCacheReplicatedQuerySelfTest;
-import org.apache.ignite.internal.processors.cache.local.IgniteCacheLocalAtomicQuerySelfTest;
-import org.apache.ignite.internal.processors.cache.local.IgniteCacheLocalFieldsQuerySelfTest;
-import org.apache.ignite.internal.processors.cache.local.IgniteCacheLocalQuerySelfTest;
import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryLostPartitionTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFailoverAtomicPrimaryWriteOrderSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFailoverAtomicReplicatedSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFailoverTxReplicatedSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFailoverTxSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicNearEnabledSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicP2PDisabledSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryLocalAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryLocalSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryPartitionedOnlySelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryPartitionedP2PDisabledSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryPartitionedSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryReplicatedAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryReplicatedOneNodeSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryReplicatedP2PDisabledSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryReplicatedSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryTxSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.IgniteCacheContinuousQueryClientReconnectTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.IgniteCacheContinuousQueryClientTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.IgniteCacheContinuousQueryClientTxReconnectTest;
-import org.apache.ignite.internal.processors.cache.reducefields.GridCacheReduceFieldsQueryAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.reducefields.GridCacheReduceFieldsQueryLocalSelfTest;
-import org.apache.ignite.internal.processors.cache.reducefields.GridCacheReduceFieldsQueryPartitionedSelfTest;
-import org.apache.ignite.internal.processors.cache.reducefields.GridCacheReduceFieldsQueryReplicatedSelfTest;
-import org.apache.ignite.internal.processors.query.IgniteSqlSplitterSelfTest;
-import org.apache.ignite.internal.processors.query.h2.sql.BaseH2CompareQueryTest;
-import org.apache.ignite.internal.processors.query.h2.sql.GridQueryParsingTest;
-import org.apache.ignite.internal.processors.query.h2.sql.H2CompareBigQueryTest;
-import org.apache.ignite.spi.communication.tcp.GridOrderedMessageCancelSelfTest;
import org.apache.ignite.testframework.config.GridTestProperties;
/**
@@ -118,122 +38,24 @@ public class IgniteBinaryCacheQueryTestSuite extends TestSuite {
public static TestSuite suite() throws Exception {
GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, BinaryMarshaller.class.getName());
- TestSuite suite = new TestSuite("Grid Cache Query Test Suite using BinaryMarshaller");
+ TestSuite suite = IgniteCacheQuerySelfTestSuite.suite();
// Serialization.
suite.addTestSuite(BinarySerializationQuerySelfTest.class);
suite.addTestSuite(BinarySerializationQueryWithReflectiveSerializerSelfTest.class);
- // Parsing.
- suite.addTestSuite(GridQueryParsingTest.class);
-
- // Config.
- suite.addTestSuite(IgniteCacheDuplicateEntityConfigurationSelfTest.class);
-
- // Queries tests.
- suite.addTestSuite(IgniteSqlSplitterSelfTest.class);
- suite.addTestSuite(GridCacheQueryIndexDisabledSelfTest.class);
- suite.addTestSuite(IgniteCacheQueryLoadSelfTest.class);
- suite.addTestSuite(IgniteCacheLocalQuerySelfTest.class);
- suite.addTestSuite(IgniteCacheLocalAtomicQuerySelfTest.class);
- suite.addTestSuite(IgniteCacheReplicatedQuerySelfTest.class);
- suite.addTestSuite(IgniteCacheReplicatedQueryP2PDisabledSelfTest.class);
- suite.addTestSuite(IgniteCachePartitionedQuerySelfTest.class);
- suite.addTestSuite(IgniteCachePartitionedSnapshotEnabledQuerySelfTest.class);
- suite.addTestSuite(IgniteCacheAtomicQuerySelfTest.class);
- suite.addTestSuite(IgniteCacheAtomicNearEnabledQuerySelfTest.class);
- suite.addTestSuite(IgniteCachePartitionedQueryP2PDisabledSelfTest.class);
- suite.addTestSuite(IgniteCachePartitionedQueryMultiThreadedSelfTest.class);
- suite.addTestSuite(IgniteCacheQueryIndexSelfTest.class);
- suite.addTestSuite(IgniteCacheCollocatedQuerySelfTest.class);
- suite.addTestSuite(IgniteCacheLargeResultSelfTest.class);
- suite.addTestSuite(GridCacheQueryInternalKeysSelfTest.class);
- suite.addTestSuite(IgniteCacheQueryMultiThreadedSelfTest.class);
- suite.addTestSuite(IgniteCacheQueryMultiThreadedOffHeapTieredSelfTest.class);
- suite.addTestSuite(IgniteCacheQueryEvictsMultiThreadedSelfTest.class);
- suite.addTestSuite(IgniteCacheQueryOffheapMultiThreadedSelfTest.class);
- suite.addTestSuite(IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest.class);
- suite.addTestSuite(IgniteCacheOffheapEvictQueryTest.class);
- suite.addTestSuite(IgniteCacheSqlQueryMultiThreadedSelfTest.class);
- suite.addTestSuite(IgniteCacheOffheapTieredMultithreadedSelfTest.class);
- suite.addTestSuite(IgniteCacheQueryNodeRestartSelfTest.class);
- suite.addTestSuite(IgniteCacheQueryNodeRestartSelfTest2.class);
- suite.addTestSuite(IgniteCacheClientQueryReplicatedNodeRestartSelfTest.class);
- suite.addTestSuite(GridCacheReduceQueryMultithreadedSelfTest.class);
- suite.addTestSuite(GridCacheCrossCacheQuerySelfTest.class);
- suite.addTestSuite(GridCacheQuerySerializationSelfTest.class);
suite.addTestSuite(IgniteCacheBinaryObjectsScanSelfTest.class);
- suite.addTestSuite(IgniteBinaryObjectFieldsQuerySelfTest.class);
- suite.addTestSuite(IgniteBinaryWrappedObjectFieldsQuerySelfTest.class);
-
- // Scan queries.
- suite.addTestSuite(CacheScanPartitionQueryFallbackSelfTest.class);
-
- // Fields queries.
- suite.addTestSuite(SqlFieldsQuerySelfTest.class);
- suite.addTestSuite(IgniteCacheLocalFieldsQuerySelfTest.class);
- suite.addTestSuite(IgniteCacheReplicatedFieldsQuerySelfTest.class);
- suite.addTestSuite(IgniteCacheReplicatedFieldsQueryP2PEnabledSelfTest.class);
- suite.addTestSuite(IgniteCachePartitionedFieldsQuerySelfTest.class);
- suite.addTestSuite(IgniteCacheAtomicFieldsQuerySelfTest.class);
- suite.addTestSuite(IgniteCacheAtomicNearEnabledFieldsQuerySelfTest.class);
- suite.addTestSuite(IgniteCachePartitionedFieldsQueryP2PEnabledSelfTest.class);
- suite.addTestSuite(IgniteCacheFieldsQueryNoDataSelfTest.class);
-
- // Continuous queries.
- suite.addTestSuite(GridCacheContinuousQueryLocalSelfTest.class);
- suite.addTestSuite(GridCacheContinuousQueryLocalAtomicSelfTest.class);
- suite.addTestSuite(GridCacheContinuousQueryReplicatedSelfTest.class);
- suite.addTestSuite(GridCacheContinuousQueryReplicatedAtomicSelfTest.class);
- suite.addTestSuite(GridCacheContinuousQueryReplicatedP2PDisabledSelfTest.class);
- suite.addTestSuite(GridCacheContinuousQueryPartitionedSelfTest.class);
- suite.addTestSuite(GridCacheContinuousQueryPartitionedOnlySelfTest.class);
- suite.addTestSuite(GridCacheContinuousQueryPartitionedP2PDisabledSelfTest.class);
- suite.addTestSuite(GridCacheContinuousQueryTxSelfTest.class);
- suite.addTestSuite(GridCacheContinuousQueryAtomicSelfTest.class);
- suite.addTestSuite(GridCacheContinuousQueryAtomicNearEnabledSelfTest.class);
- suite.addTestSuite(GridCacheContinuousQueryAtomicP2PDisabledSelfTest.class);
- suite.addTestSuite(GridCacheContinuousQueryReplicatedOneNodeSelfTest.class);
- suite.addTestSuite(IgniteCacheContinuousQueryClientTest.class);
- suite.addTestSuite(IgniteCacheContinuousQueryClientReconnectTest.class);
- suite.addTestSuite(IgniteCacheContinuousQueryClientTxReconnectTest.class);
- suite.addTestSuite(CacheContinuousQueryFailoverAtomicPrimaryWriteOrderSelfTest.class);
- suite.addTestSuite(CacheContinuousQueryFailoverAtomicReplicatedSelfTest.class);
- suite.addTestSuite(CacheContinuousQueryFailoverTxSelfTest.class);
- suite.addTestSuite(CacheContinuousQueryFailoverTxReplicatedSelfTest.class);
suite.addTestSuite(CacheContinuousQueryLostPartitionTest.class);
- // Reduce fields queries.
- suite.addTestSuite(GridCacheReduceFieldsQueryLocalSelfTest.class);
- suite.addTestSuite(GridCacheReduceFieldsQueryPartitionedSelfTest.class);
- suite.addTestSuite(GridCacheReduceFieldsQueryAtomicSelfTest.class);
- suite.addTestSuite(GridCacheReduceFieldsQueryReplicatedSelfTest.class);
-
- suite.addTestSuite(GridCacheQueryIndexingDisabledSelfTest.class);
-
//Should be adjusted. Not ready to be used with BinaryMarshaller.
//suite.addTestSuite(GridCacheBinarySwapScanQuerySelfTest.class);
- suite.addTestSuite(GridOrderedMessageCancelSelfTest.class);
-
- // Ignite cache and H2 comparison.
- suite.addTestSuite(BaseH2CompareQueryTest.class);
- suite.addTestSuite(H2CompareBigQueryTest.class);
-
- // Metrics tests
- suite.addTestSuite(CacheLocalQueryMetricsSelfTest.class);
- suite.addTestSuite(CachePartitionedQueryMetricsDistributedSelfTest.class);
- suite.addTestSuite(CachePartitionedQueryMetricsLocalSelfTest.class);
- suite.addTestSuite(CacheReplicatedQueryMetricsDistributedSelfTest.class);
- suite.addTestSuite(CacheReplicatedQueryMetricsLocalSelfTest.class);
-
- //Unmarshallig query test.
- suite.addTestSuite(IgniteCacheP2pUnmarshallingQueryErrorTest.class);
- suite.addTestSuite(IgniteCacheNoClassQuerySelfTest.class);
-
suite.addTestSuite(GridCacheBinaryDuplicateIndexObjectPartitionedAtomicSelfTest.class);
suite.addTestSuite(GridCacheBinaryDuplicateIndexObjectPartitionedTransactionalSelfTest.class);
+ //TODO: the following tests= was never tested with binary. Exclude or pass?
+// suite.addTestSuite(IgniteSqlSchemaIndexingTest.class);
+
return suite;
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperCacheQueryTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperCacheQueryTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperCacheQueryTestSuite.java
new file mode 100644
index 0000000..3eed980
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperCacheQueryTestSuite.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.testsuites;
+
+import junit.framework.TestSuite;
+import org.apache.ignite.internal.binary.BinaryMarshaller;
+import org.apache.ignite.testframework.config.GridTestProperties;
+
+/**
+ * Cache query suite with binary marshaller.
+ */
+public class IgniteBinarySimpleNameMapperCacheQueryTestSuite extends TestSuite {
+ /**
+ * @return Suite.
+ * @throws Exception In case of error.
+ */
+ public static TestSuite suite() throws Exception {
+ GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, BinaryMarshaller.class.getName());
+ GridTestProperties.setProperty(GridTestProperties.BINARY_MARSHALLER_USE_SIMPLE_NAME_MAPPER, "true");
+
+ return IgniteBinaryCacheQueryTestSuite.suite();
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid2.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid2.xml b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid2.xml
index 434f468..ef29a89 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid2.xml
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid2.xml
@@ -45,6 +45,27 @@
</list>
</property>
+ <property name="binaryConfiguration">
+ <bean class="org.apache.ignite.configuration.BinaryConfiguration">
+ <property name="compactFooter" value="false"/>
+ <property name="typeConfigurations">
+ <list>
+ <bean class="org.apache.ignite.binary.BinaryTypeConfiguration">
+ <property name="typeName" value="org.apache.ignite.platform.PlatformComputeBinarizable"/>
+ </bean>
+ <bean class="org.apache.ignite.binary.BinaryTypeConfiguration">
+ <property name="typeName" value="org.apache.ignite.platform.PlatformComputeJavaBinarizable"/>
+ </bean>
+ <bean class="org.apache.ignite.binary.BinaryTypeConfiguration">
+ <property name="typeName" value="org.apache.ignite.platform.PlatformComputeEnum" />
+ <property name="enum" value="true" />
+ </bean>
+ </list>
+ </property>
+
+ </bean>
+ </property>
+
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
http://git-wip-us.apache.org/repos/asf/ignite/blob/62502b2c/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid3.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid3.xml b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid3.xml
index 31ccdf0..d1c96b6 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid3.xml
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid3.xml
@@ -25,14 +25,35 @@
<property name="localHost" value="127.0.0.1"/>
<property name="connectorConfiguration"><null/></property>
- <property name="clientMode" value="true"/>
+ <property name="clientMode" value="true"/>
- <property name="gridName" value="grid3"/>
+ <property name="gridName" value="grid3"/>
- <property name="metricsUpdateFrequency" value="1000"/>
- <property name="metricsLogFrequency" value="0"/>
+ <property name="metricsUpdateFrequency" value="1000"/>
+ <property name="metricsLogFrequency" value="0"/>
- <property name="discoverySpi">
+ <property name="binaryConfiguration">
+ <bean class="org.apache.ignite.configuration.BinaryConfiguration">
+ <property name="compactFooter" value="false"/>
+ <property name="typeConfigurations">
+ <list>
+ <bean class="org.apache.ignite.binary.BinaryTypeConfiguration">
+ <property name="typeName" value="org.apache.ignite.platform.PlatformComputeBinarizable"/>
+ </bean>
+ <bean class="org.apache.ignite.binary.BinaryTypeConfiguration">
+ <property name="typeName" value="org.apache.ignite.platform.PlatformComputeJavaBinarizable"/>
+ </bean>
+ <bean class="org.apache.ignite.binary.BinaryTypeConfiguration">
+ <property name="typeName" value="org.apache.ignite.platform.PlatformComputeEnum" />
+ <property name="enum" value="true" />
+ </bean>
+ </list>
+ </property>
+
+ </bean>
+ </property>
+
+ <property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="forceServerMode" value="true"/>