diff options
author | Ryan Ernst <ryan@iernst.net> | 2015-10-29 23:25:24 -0700 |
---|---|---|
committer | Ryan Ernst <ryan@iernst.net> | 2015-10-29 23:25:24 -0700 |
commit | 63f6c6db8596adc71b12e6ec1961b1dc30e000ff (patch) | |
tree | 2f7ee11f9146030c9697a7eb18b23ab3469b1231 /core/src/test/java/org/elasticsearch/node | |
parent | c7897a7524e0bee94b5bdc54f8eb72bc2e3b4f77 (diff) |
Build: Move test framework files to their new location
The test jar was previously built in maven by copying class files. With
gradle we now have a proper test framework artifact. This change moves
the classes used by the test framework into the test-framework module.
See #13930
Diffstat (limited to 'core/src/test/java/org/elasticsearch/node')
-rw-r--r-- | core/src/test/java/org/elasticsearch/node/MockNode.java | 54 | ||||
-rw-r--r-- | core/src/test/java/org/elasticsearch/node/NodeMocksPlugin.java | 41 |
2 files changed, 0 insertions, 95 deletions
diff --git a/core/src/test/java/org/elasticsearch/node/MockNode.java b/core/src/test/java/org/elasticsearch/node/MockNode.java deleted file mode 100644 index c5592fef48..0000000000 --- a/core/src/test/java/org/elasticsearch/node/MockNode.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch 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.elasticsearch.node; - -import org.elasticsearch.Version; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.plugins.Plugin; - -import java.util.Collection; - -/** - * A node for testing which allows: - * <ul> - * <li>Overriding Version.CURRENT</li> - * <li>Adding test plugins that exist on the classpath</li> - * </ul> - */ -public class MockNode extends Node { - - // these are kept here so a copy of this MockNode can be created, since Node does not store them - private Version version; - private Collection<Class<? extends Plugin>> plugins; - - public MockNode(Settings settings, Version version, Collection<Class<? extends Plugin>> classpathPlugins) { - super(settings, version, classpathPlugins); - this.version = version; - this.plugins = classpathPlugins; - } - - public Collection<Class<? extends Plugin>> getPlugins() { - return plugins; - } - - public Version getVersion() { - return version; - } -} diff --git a/core/src/test/java/org/elasticsearch/node/NodeMocksPlugin.java b/core/src/test/java/org/elasticsearch/node/NodeMocksPlugin.java deleted file mode 100644 index f958b2b752..0000000000 --- a/core/src/test/java/org/elasticsearch/node/NodeMocksPlugin.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch 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.elasticsearch.node; - -import org.elasticsearch.cache.recycler.MockPageCacheRecycler; -import org.elasticsearch.common.util.MockBigArrays; -import org.elasticsearch.plugins.Plugin; - -public class NodeMocksPlugin extends Plugin { - - @Override - public String name() { - return "node-mocks"; - } - - @Override - public String description() { - return "a plugin to setup mocks for node level classes"; - } - - public void onModule(NodeModule module) { - module.pageCacheRecyclerImpl = MockPageCacheRecycler.class; - module.bigArraysImpl = MockBigArrays.class; - } -} |