Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8067D18AC4 for ; Thu, 26 Nov 2015 10:01:23 +0000 (UTC) Received: (qmail 69293 invoked by uid 500); 26 Nov 2015 10:01:23 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 69075 invoked by uid 500); 26 Nov 2015 10:01:22 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 68859 invoked by uid 99); 26 Nov 2015 10:01:22 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Nov 2015 10:01:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7E7AAE193C; Thu, 26 Nov 2015 10:01:22 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vozerov@apache.org To: commits@ignite.apache.org Date: Thu, 26 Nov 2015 10:01:29 -0000 Message-Id: In-Reply-To: <0f7f22d7030344699cd246d977eac64e@git.apache.org> References: <0f7f22d7030344699cd246d977eac64e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [08/34] ignite git commit: Fixing tests. Fixing tests. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9922d83b Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9922d83b Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9922d83b Branch: refs/heads/ignite-1956 Commit: 9922d83b8de24f70a89913bdf0c9739cc6dd9d35 Parents: a129439 Author: Alexey Goncharuk Authored: Tue Nov 24 11:06:26 2015 +0300 Committer: Alexey Goncharuk Committed: Tue Nov 24 11:06:26 2015 +0300 ---------------------------------------------------------------------- .../store/jdbc/CacheAbstractJdbcStore.java | 2 +- .../configuration/CacheConfiguration.java | 5 +- .../processors/cache/GridCacheMessage.java | 2 +- .../processors/cache/GridCacheProcessor.java | 9 ++- ...heJdbcPojoStoreBinaryMarshallerSelfTest.java | 85 ++++++++++++++++++++ ...JdbcPojoStorePortableMarshallerSelfTest.java | 85 -------------------- .../ignite/testsuites/IgniteCacheTestSuite.java | 4 +- 7 files changed, 99 insertions(+), 93 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/9922d83b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java index 6dc413b..7617e48 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java @@ -68,7 +68,7 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteBiInClosure; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.lifecycle.LifecycleAware; -import org.apache.ignite.marshaller.portable.BinaryMarshaller; +import org.apache.ignite.internal.portable.BinaryMarshaller; import org.apache.ignite.resources.CacheStoreSessionResource; import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.resources.LoggerResource; http://git-wip-us.apache.org/repos/asf/ignite/blob/9922d83b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java index 8c3ea19..26bfdbe 100644 --- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java @@ -209,7 +209,7 @@ public class CacheConfiguration extends MutableConfiguration { /** Default value for keep binary in store behavior .*/ @SuppressWarnings({"UnnecessaryBoxing", "BooleanConstructorCall"}) - public static final Boolean DFLT_KEEP_BINARY_IN_STORE = new Boolean(true); + public static final Boolean DFLT_KEEP_BINARY_IN_STORE = new Boolean(false); /** Default threshold for concurrent loading of keys from {@link CacheStore}. */ public static final int DFLT_CONCURRENT_LOAD_ALL_THRESHOLD = 5; @@ -888,8 +888,7 @@ public class CacheConfiguration extends MutableConfiguration { /** * Flag indicating that {@link CacheStore} implementation * is working with binary objects instead of Java objects. - * Default value of this flag is {@link #DFLT_KEEP_BINARY_IN_STORE}, - * because this is recommended behavior from performance standpoint. + * Default value of this flag is {@link #DFLT_KEEP_BINARY_IN_STORE}. *

* If set to {@code false}, Ignite will deserialize keys and * values stored in binary format before they are passed http://git-wip-us.apache.org/repos/asf/ignite/blob/9922d83b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java index 61136bf..177454c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java @@ -681,6 +681,6 @@ public abstract class GridCacheMessage implements Message { /** {@inheritDoc} */ @Override public String toString() { - return S.toString(GridCacheMessage.class, this); + return S.toString(GridCacheMessage.class, this, "cacheId", cacheId); } } http://git-wip-us.apache.org/repos/asf/ignite/blob/9922d83b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java index 178c5f0..6822ded 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java @@ -1021,7 +1021,7 @@ public class GridCacheProcessor extends GridProcessorAdapter { if (cfg.isKeepBinaryInStore() && cfg.isKeepBinaryInStore() != CacheConfiguration.DFLT_KEEP_BINARY_IN_STORE && !(ctx.config().getMarshaller() instanceof BinaryMarshaller)) U.warn(log, "CacheConfiguration.isKeepBinaryInStore() configuration property will be ignored because " + - "PortableMarshaller is not used"); + "BinaryMarshaller is not used"); // Start managers. for (GridCacheManager mgr : F.view(cacheCtx.managers(), F.notContains(dhtExcludes(cacheCtx)))) @@ -1049,6 +1049,9 @@ public class GridCacheProcessor extends GridProcessorAdapter { cacheCtx.onStarted(); + U.debug(log, "Started cache [name=" + U.maskName(cfg.getName()) + ", deploymentId=" + + cacheCtx.dynamicDeploymentId() + ']'); + if (log.isInfoEnabled()) log.info("Started cache [name=" + U.maskName(cfg.getName()) + ", mode=" + cfg.getCacheMode() + ']'); } @@ -1601,6 +1604,10 @@ public class GridCacheProcessor extends GridProcessorAdapter { if (sharedCtx.cacheContext(CU.cacheId(cfg.getName())) != null) return; + U.debug(log, "prepare cache start [locNodeId=" + ctx.localNodeId() + + ", initiatingNodeId=" + initiatingNodeId + ", deploymentId=" + deploymentId + ", topVer=" + topVer + + ", name=" + cfg.getName() + ']'); + if (affNodeStart || clientNodeStart) { if (clientNodeStart && !affNodeStart) { if (nearCfg != null) http://git-wip-us.apache.org/repos/asf/ignite/blob/9922d83b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java new file mode 100644 index 0000000..659efb0 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java @@ -0,0 +1,85 @@ +/* + * 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.cache.store.jdbc; + +import org.apache.ignite.marshaller.Marshaller; +import org.apache.ignite.internal.portable.BinaryMarshaller; + +/** + * Class for {@code PojoCacheStore} tests. + */ +public class CacheJdbcPojoStoreBinaryMarshallerSelfTest extends CacheJdbcPojoStoreAbstractSelfTest { + /** {@inheritDoc} */ + @Override protected Marshaller marshaller(){ + return new BinaryMarshaller(); + } + + /** + * @throws Exception If failed. + */ + public void testLoadCacheNoKeyClasses() throws Exception { + startTestGrid(false, true, false, false); + + checkCacheContent(); + } + + /** + * @throws Exception If failed. + */ + public void testLoadCacheNoKeyClassesTx() throws Exception { + startTestGrid(false, true, false, true); + + checkCacheContent(); + } + + /** + * @throws Exception If failed. + */ + public void testLoadCacheNoValueClasses() throws Exception { + startTestGrid(false, false, true, false); + + checkCacheContent(); + } + + /** + * @throws Exception If failed. + */ + public void testLoadCacheNoValueClassesTx() throws Exception { + startTestGrid(false, false, true, true); + + checkCacheContent(); + } + + /** + * @throws Exception If failed. + */ + public void testLoadCacheNoKeyAndValueClasses() throws Exception { + startTestGrid(false, true, true, false); + + checkCacheContent(); + } + + /** + * @throws Exception If failed. + */ + public void testLoadCacheNoKeyAndValueClassesTx() throws Exception { + startTestGrid(false, true, true, true); + + checkCacheContent(); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9922d83b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStorePortableMarshallerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStorePortableMarshallerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStorePortableMarshallerSelfTest.java deleted file mode 100644 index 39504b1..0000000 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStorePortableMarshallerSelfTest.java +++ /dev/null @@ -1,85 +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.cache.store.jdbc; - -import org.apache.ignite.marshaller.Marshaller; -import org.apache.ignite.marshaller.portable.BinaryMarshaller; - -/** - * Class for {@code PojoCacheStore} tests. - */ -public class CacheJdbcPojoStorePortableMarshallerSelfTest extends CacheJdbcPojoStoreAbstractSelfTest { - /** {@inheritDoc} */ - @Override protected Marshaller marshaller(){ - return new BinaryMarshaller(); - } - - /** - * @throws Exception If failed. - */ - public void testLoadCacheNoKeyClasses() throws Exception { - startTestGrid(false, true, false, false); - - checkCacheContent(); - } - - /** - * @throws Exception If failed. - */ - public void testLoadCacheNoKeyClassesTx() throws Exception { - startTestGrid(false, true, false, true); - - checkCacheContent(); - } - - /** - * @throws Exception If failed. - */ - public void testLoadCacheNoValueClasses() throws Exception { - startTestGrid(false, false, true, false); - - checkCacheContent(); - } - - /** - * @throws Exception If failed. - */ - public void testLoadCacheNoValueClassesTx() throws Exception { - startTestGrid(false, false, true, true); - - checkCacheContent(); - } - - /** - * @throws Exception If failed. - */ - public void testLoadCacheNoKeyAndValueClasses() throws Exception { - startTestGrid(false, true, true, false); - - checkCacheContent(); - } - - /** - * @throws Exception If failed. - */ - public void testLoadCacheNoKeyAndValueClassesTx() throws Exception { - startTestGrid(false, true, true, true); - - checkCacheContent(); - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/9922d83b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java index 8af9443..de1c9c4 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java @@ -32,7 +32,7 @@ import org.apache.ignite.cache.store.StoreResourceInjectionSelfTest; import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreMultitreadedSelfTest; import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreOptimizedMarshallerSelfTest; import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreTest; -import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStorePortableMarshallerSelfTest; +import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreBinaryMarshallerSelfTest; import org.apache.ignite.cache.store.jdbc.GridCacheJdbcBlobStoreMultithreadedSelfTest; import org.apache.ignite.cache.store.jdbc.GridCacheJdbcBlobStoreSelfTest; import org.apache.ignite.internal.processors.cache.CacheAffinityCallSelfTest; @@ -214,7 +214,7 @@ public class IgniteCacheTestSuite extends TestSuite { suite.addTestSuite(GridCacheJdbcBlobStoreMultithreadedSelfTest.class); suite.addTestSuite(CacheJdbcPojoStoreTest.class); suite.addTestSuite(CacheJdbcPojoStoreOptimizedMarshallerSelfTest.class); - suite.addTestSuite(CacheJdbcPojoStorePortableMarshallerSelfTest.class); + suite.addTestSuite(CacheJdbcPojoStoreBinaryMarshallerSelfTest.class); suite.addTestSuite(CacheJdbcPojoStoreMultitreadedSelfTest.class); suite.addTestSuite(GridCacheBalancingStoreSelfTest.class); suite.addTestSuite(GridCacheAffinityApiSelfTest.class);