IGNITE-50 Fixed for p2pDisabled cfg. Added tests.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c92a044c Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c92a044c Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c92a044c Branch: refs/heads/ignite-nio Commit: c92a044c301181f05a7f5c8d78de739331b1c9ac Parents: 8d347ed Author: nikolay_tikhonov <ntikho...@gridgain.com> Authored: Sat Feb 14 14:19:43 2015 +0300 Committer: nikolay_tikhonov <ntikho...@gridgain.com> Committed: Sat Feb 14 14:19:43 2015 +0300 ---------------------------------------------------------------------- .../deployment/GridDeploymentManager.java | 2 +- ...niteCacheContinuousExecutionContextTest.java | 34 ++++++++++++++++++++ ...IgniteCacheIsolatedExecutionContextTest.java | 34 ++++++++++++++++++++ ...niteCacheP2PDisableExecutionContextTest.java | 34 ++++++++++++++++++++ .../IgniteCachePrivateExecutionContextTest.java | 34 ++++++++++++++++++++ .../IgniteCacheSharedExecutionContextTest.java | 34 ++++++++++++++++++++ .../ignite/testsuites/IgniteCacheTestSuite.java | 5 +++ 7 files changed, 176 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c92a044c/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManager.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManager.java index d8bce03..3d3bdc8 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManager.java @@ -69,7 +69,7 @@ public class GridDeploymentManager extends GridManagerAdapter<DeploymentSpi> { locDep = ann != null ? new LocalDeployment( ctx.config().getDeploymentMode(), - U.gridClassLoader(), + ctx.config().getClassLoader() != null ? ctx.config().getClassLoader() : U.gridClassLoader(), IgniteUuid.fromUuid(ctx.localNodeId()), ctx.userVersion(U.gridClassLoader()), String.class.getName()) : http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c92a044c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheContinuousExecutionContextTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheContinuousExecutionContextTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheContinuousExecutionContextTest.java new file mode 100644 index 0000000..b3ddd2b --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheContinuousExecutionContextTest.java @@ -0,0 +1,34 @@ +/* + * 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.context; + +import org.apache.ignite.configuration.*; + +/** + * + */ +public class IgniteCacheContinuousExecutionContextTest extends IgniteCacheAtomicExecutionContextTest { + /** {@inheritDoc} */ + @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { + IgniteConfiguration cfg = super.getConfiguration(gridName); + + cfg.setDeploymentMode(DeploymentMode.CONTINUOUS); + + return cfg; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c92a044c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheIsolatedExecutionContextTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheIsolatedExecutionContextTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheIsolatedExecutionContextTest.java new file mode 100644 index 0000000..20658e0 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheIsolatedExecutionContextTest.java @@ -0,0 +1,34 @@ +/* + * 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.context; + +import org.apache.ignite.configuration.*; + +/** + * + */ +public class IgniteCacheIsolatedExecutionContextTest extends IgniteCacheP2PDisableExecutionContextTest { + /** {@inheritDoc} */ + @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { + IgniteConfiguration cfg = super.getConfiguration(gridName); + + cfg.setDeploymentMode(DeploymentMode.ISOLATED); + + return cfg; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c92a044c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheP2PDisableExecutionContextTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheP2PDisableExecutionContextTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheP2PDisableExecutionContextTest.java new file mode 100644 index 0000000..76f68b4 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheP2PDisableExecutionContextTest.java @@ -0,0 +1,34 @@ +/* + * 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.context; + +import org.apache.ignite.configuration.*; + +/** + * + */ +public class IgniteCacheP2PDisableExecutionContextTest extends IgniteCacheAtomicExecutionContextTest { + /** {@inheritDoc} */ + @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { + IgniteConfiguration cfg = super.getConfiguration(gridName); + + cfg.setPeerClassLoadingEnabled(false); + + return cfg; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c92a044c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCachePrivateExecutionContextTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCachePrivateExecutionContextTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCachePrivateExecutionContextTest.java new file mode 100644 index 0000000..8857ba0 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCachePrivateExecutionContextTest.java @@ -0,0 +1,34 @@ +/* + * 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.context; + +import org.apache.ignite.configuration.*; + +/** + * + */ +public class IgniteCachePrivateExecutionContextTest extends IgniteCacheP2PDisableExecutionContextTest { + /** {@inheritDoc} */ + @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { + IgniteConfiguration cfg = super.getConfiguration(gridName); + + cfg.setDeploymentMode(DeploymentMode.PRIVATE); + + return cfg; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c92a044c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheSharedExecutionContextTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheSharedExecutionContextTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheSharedExecutionContextTest.java new file mode 100644 index 0000000..bdfceb2 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheSharedExecutionContextTest.java @@ -0,0 +1,34 @@ +/* + * 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.context; + +import org.apache.ignite.configuration.*; + +/** + * + */ +public class IgniteCacheSharedExecutionContextTest extends IgniteCacheAtomicExecutionContextTest { + /** {@inheritDoc} */ + @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { + IgniteConfiguration cfg = super.getConfiguration(gridName); + + cfg.setDeploymentMode(DeploymentMode.SHARED); + + return cfg; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c92a044c/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 d70f0f7..d3f7e3e 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 @@ -72,6 +72,11 @@ public class IgniteCacheTestSuite extends TestSuite { suite.addTestSuite(IgniteCachePartitionedExecutionContextTest.class); suite.addTestSuite(IgniteCacheReplicatedExecutionContextTest.class); suite.addTestSuite(IgniteCacheTxExecutionContextTest.class); + suite.addTestSuite(IgniteCacheContinuousExecutionContextTest.class); + suite.addTestSuite(IgniteCacheIsolatedExecutionContextTest.class); + suite.addTestSuite(IgniteCacheP2PDisableExecutionContextTest.class); + suite.addTestSuite(IgniteCachePrivateExecutionContextTest.class); + suite.addTestSuite(IgniteCacheSharedExecutionContextTest.class); // Affinity tests. suite.addTestSuite(GridCachePartitionFairAffinityNodesSelfTest.class);