[Rename] server/test/o.e.monitor,persistent,plugins,recovery (#388)
This commit refactors the following test packages from the server/test module: * o.e.monitor * o.e.persistent * o.e.plugins * o.e.recovery to the o.opensearch namespace. All references throughout the codebase have also been refactored. Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
This commit is contained in:
parent
f75803e1aa
commit
d99bbfe2f2
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.monitor.fs;
|
||||
package org.opensearch.monitor.fs;
|
||||
|
||||
import org.opensearch.test.OpenSearchTestCase;
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.monitor.fs;
|
||||
package org.opensearch.monitor.fs;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.monitor.fs;
|
||||
package org.opensearch.monitor.fs;
|
||||
|
||||
import org.apache.lucene.util.Constants;
|
||||
import org.opensearch.common.collect.Tuple;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.monitor.jvm;
|
||||
package org.opensearch.monitor.jvm;
|
||||
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.monitor.jvm;
|
||||
package org.opensearch.monitor.jvm;
|
||||
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.opensearch.common.unit.ByteSizeValue;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.monitor.jvm;
|
||||
package org.opensearch.monitor.jvm;
|
||||
|
||||
import org.apache.lucene.util.Constants;
|
||||
import org.opensearch.bootstrap.JavaVersion;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.monitor.jvm;
|
||||
package org.opensearch.monitor.jvm;
|
||||
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.test.OpenSearchTestCase;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.monitor.jvm;
|
||||
package org.opensearch.monitor.jvm;
|
||||
|
||||
import org.opensearch.common.Strings;
|
||||
import org.opensearch.common.unit.ByteSizeValue;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.monitor.os;
|
||||
package org.opensearch.monitor.os;
|
||||
|
||||
import static org.hamcrest.Matchers.allOf;
|
||||
import static org.hamcrest.Matchers.anyOf;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.monitor.os;
|
||||
package org.opensearch.monitor.os;
|
||||
|
||||
import org.opensearch.common.io.stream.BytesStreamOutput;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.monitor.process;
|
||||
package org.opensearch.monitor.process;
|
||||
|
||||
import org.apache.lucene.util.Constants;
|
||||
import org.opensearch.bootstrap.BootstrapInfo;
|
|
@ -33,12 +33,12 @@ import org.opensearch.common.unit.ByteSizeValue;
|
|||
import org.opensearch.common.xcontent.ToXContent;
|
||||
import org.opensearch.common.xcontent.XContentBuilder;
|
||||
import org.opensearch.http.HttpInfo;
|
||||
import org.elasticsearch.ingest.IngestInfo;
|
||||
import org.elasticsearch.ingest.ProcessorInfo;
|
||||
import org.elasticsearch.monitor.jvm.JvmInfo;
|
||||
import org.elasticsearch.monitor.os.OsInfo;
|
||||
import org.elasticsearch.monitor.process.ProcessInfo;
|
||||
import org.elasticsearch.plugins.PluginInfo;
|
||||
import org.opensearch.ingest.IngestInfo;
|
||||
import org.opensearch.ingest.ProcessorInfo;
|
||||
import org.opensearch.monitor.jvm.JvmInfo;
|
||||
import org.opensearch.monitor.os.OsInfo;
|
||||
import org.opensearch.monitor.process.ProcessInfo;
|
||||
import org.opensearch.plugins.PluginInfo;
|
||||
import org.opensearch.search.aggregations.support.AggregationInfo;
|
||||
import org.opensearch.search.aggregations.support.AggregationUsageService;
|
||||
import org.opensearch.test.OpenSearchTestCase;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.persistent;
|
||||
package org.opensearch.persistent;
|
||||
|
||||
import org.opensearch.common.io.stream.Writeable;
|
||||
import org.elasticsearch.persistent.RemovePersistentTaskAction.Request;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.persistent;
|
||||
package org.opensearch.persistent;
|
||||
|
||||
import com.carrotsearch.hppc.cursors.ObjectCursor;
|
||||
import org.opensearch.ResourceNotFoundException;
|
||||
|
@ -37,11 +37,11 @@ import org.opensearch.cluster.service.ClusterService;
|
|||
import org.opensearch.common.UUIDs;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.persistent.PersistentTasksCustomMetadata.Assignment;
|
||||
import org.elasticsearch.persistent.PersistentTasksCustomMetadata.PersistentTask;
|
||||
import org.elasticsearch.persistent.TestPersistentTasksPlugin.TestParams;
|
||||
import org.elasticsearch.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor;
|
||||
import org.elasticsearch.persistent.decider.EnableAssignmentDecider;
|
||||
import org.opensearch.persistent.PersistentTasksCustomMetadata.Assignment;
|
||||
import org.opensearch.persistent.PersistentTasksCustomMetadata.PersistentTask;
|
||||
import org.opensearch.persistent.TestPersistentTasksPlugin.TestParams;
|
||||
import org.opensearch.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor;
|
||||
import org.opensearch.persistent.decider.EnableAssignmentDecider;
|
||||
import org.opensearch.test.OpenSearchTestCase;
|
||||
import org.opensearch.test.VersionUtils;
|
||||
import org.opensearch.threadpool.TestThreadPool;
|
||||
|
@ -63,9 +63,9 @@ import java.util.function.BiFunction;
|
|||
|
||||
import static java.util.Collections.emptyMap;
|
||||
import static java.util.Collections.singleton;
|
||||
import static org.elasticsearch.persistent.PersistentTasksClusterService.needsReassignment;
|
||||
import static org.elasticsearch.persistent.PersistentTasksClusterService.persistentTasksChanged;
|
||||
import static org.elasticsearch.persistent.PersistentTasksExecutor.NO_NODE_FOUND;
|
||||
import static org.opensearch.persistent.PersistentTasksClusterService.needsReassignment;
|
||||
import static org.opensearch.persistent.PersistentTasksClusterService.persistentTasksChanged;
|
||||
import static org.opensearch.persistent.PersistentTasksExecutor.NO_NODE_FOUND;
|
||||
import static org.opensearch.test.ClusterServiceUtils.createClusterService;
|
||||
import static org.opensearch.test.ClusterServiceUtils.setState;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.persistent;
|
||||
package org.opensearch.persistent;
|
||||
|
||||
import org.opensearch.ResourceNotFoundException;
|
||||
import org.opensearch.Version;
|
||||
|
@ -45,12 +45,12 @@ import org.opensearch.common.xcontent.XContentBuilder;
|
|||
import org.opensearch.common.xcontent.XContentFactory;
|
||||
import org.opensearch.common.xcontent.XContentParser;
|
||||
import org.opensearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.persistent.PersistentTasksCustomMetadata.Assignment;
|
||||
import org.elasticsearch.persistent.PersistentTasksCustomMetadata.Builder;
|
||||
import org.elasticsearch.persistent.PersistentTasksCustomMetadata.PersistentTask;
|
||||
import org.elasticsearch.persistent.TestPersistentTasksPlugin.State;
|
||||
import org.elasticsearch.persistent.TestPersistentTasksPlugin.TestParams;
|
||||
import org.elasticsearch.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor;
|
||||
import org.opensearch.persistent.PersistentTasksCustomMetadata.Assignment;
|
||||
import org.opensearch.persistent.PersistentTasksCustomMetadata.Builder;
|
||||
import org.opensearch.persistent.PersistentTasksCustomMetadata.PersistentTask;
|
||||
import org.opensearch.persistent.TestPersistentTasksPlugin.State;
|
||||
import org.opensearch.persistent.TestPersistentTasksPlugin.TestParams;
|
||||
import org.opensearch.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor;
|
||||
import org.opensearch.test.AbstractDiffableSerializationTestCase;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -64,7 +64,7 @@ import java.util.Set;
|
|||
|
||||
import static org.opensearch.cluster.metadata.Metadata.CONTEXT_MODE_GATEWAY;
|
||||
import static org.opensearch.cluster.metadata.Metadata.CONTEXT_MODE_SNAPSHOT;
|
||||
import static org.elasticsearch.persistent.PersistentTasksExecutor.NO_NODE_FOUND;
|
||||
import static org.opensearch.persistent.PersistentTasksExecutor.NO_NODE_FOUND;
|
||||
import static org.opensearch.test.VersionUtils.allReleasedVersions;
|
||||
import static org.opensearch.test.VersionUtils.compatibleFutureVersion;
|
||||
import static org.opensearch.test.VersionUtils.getFirstVersion;
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.persistent;
|
||||
package org.opensearch.persistent;
|
||||
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.cluster.ClusterName;
|
|
@ -16,13 +16,13 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.persistent;
|
||||
package org.opensearch.persistent;
|
||||
|
||||
import org.opensearch.common.UUIDs;
|
||||
import org.opensearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.opensearch.common.io.stream.Writeable;
|
||||
import org.elasticsearch.persistent.PersistentTasksCustomMetadata.PersistentTask;
|
||||
import org.elasticsearch.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor;
|
||||
import org.opensearch.persistent.PersistentTasksCustomMetadata.PersistentTask;
|
||||
import org.opensearch.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor;
|
||||
import org.opensearch.test.AbstractWireSerializingTestCase;
|
||||
|
||||
import java.util.Collections;
|
|
@ -16,11 +16,11 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.persistent;
|
||||
package org.opensearch.persistent;
|
||||
|
||||
import org.opensearch.common.io.stream.Writeable;
|
||||
import org.opensearch.test.AbstractWireSerializingTestCase;
|
||||
import org.elasticsearch.persistent.PersistentTasksNodeService.Status;
|
||||
import org.opensearch.persistent.PersistentTasksNodeService.Status;
|
||||
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.persistent;
|
||||
package org.opensearch.persistent;
|
||||
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.action.ActionListener;
|
||||
|
@ -36,8 +36,8 @@ import org.opensearch.common.util.concurrent.OpenSearchExecutors;
|
|||
import org.opensearch.common.util.concurrent.ThreadContext;
|
||||
import org.opensearch.persistent.PersistentTasksCustomMetadata.Assignment;
|
||||
import org.opensearch.persistent.PersistentTasksCustomMetadata.PersistentTask;
|
||||
import org.elasticsearch.persistent.TestPersistentTasksPlugin.TestParams;
|
||||
import org.elasticsearch.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor;
|
||||
import org.opensearch.persistent.TestPersistentTasksPlugin.TestParams;
|
||||
import org.opensearch.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor;
|
||||
import org.opensearch.tasks.Task;
|
||||
import org.opensearch.tasks.TaskId;
|
||||
import org.opensearch.tasks.TaskManager;
|
|
@ -16,10 +16,10 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.persistent;
|
||||
package org.opensearch.persistent;
|
||||
|
||||
import org.opensearch.common.io.stream.Writeable;
|
||||
import org.elasticsearch.persistent.CompletionPersistentTaskAction.Request;
|
||||
import org.opensearch.persistent.CompletionPersistentTaskAction.Request;
|
||||
import org.opensearch.test.AbstractWireSerializingTestCase;
|
||||
|
||||
public class RestartPersistentTaskRequestTests extends AbstractWireSerializingTestCase<Request> {
|
|
@ -16,15 +16,15 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.persistent;
|
||||
package org.opensearch.persistent;
|
||||
|
||||
import org.opensearch.common.UUIDs;
|
||||
import org.opensearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.opensearch.common.io.stream.NamedWriteableRegistry.Entry;
|
||||
import org.opensearch.common.io.stream.Writeable;
|
||||
import org.elasticsearch.persistent.StartPersistentTaskAction.Request;
|
||||
import org.elasticsearch.persistent.TestPersistentTasksPlugin.TestParams;
|
||||
import org.elasticsearch.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor;
|
||||
import org.opensearch.persistent.StartPersistentTaskAction.Request;
|
||||
import org.opensearch.persistent.TestPersistentTasksPlugin.TestParams;
|
||||
import org.opensearch.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor;
|
||||
import org.opensearch.test.AbstractWireSerializingTestCase;
|
||||
|
||||
import java.util.Collections;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.persistent;
|
||||
package org.opensearch.persistent;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
|
@ -16,14 +16,14 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.persistent;
|
||||
package org.opensearch.persistent;
|
||||
|
||||
import org.opensearch.common.UUIDs;
|
||||
import org.opensearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.opensearch.common.io.stream.Writeable;
|
||||
import org.elasticsearch.persistent.TestPersistentTasksPlugin.State;
|
||||
import org.elasticsearch.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor;
|
||||
import org.elasticsearch.persistent.UpdatePersistentTaskStatusAction.Request;
|
||||
import org.opensearch.persistent.TestPersistentTasksPlugin.State;
|
||||
import org.opensearch.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor;
|
||||
import org.opensearch.persistent.UpdatePersistentTaskStatusAction.Request;
|
||||
import org.opensearch.test.AbstractWireSerializingTestCase;
|
||||
|
||||
import java.util.Collections;
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.persistent.decider;
|
||||
package org.opensearch.persistent.decider;
|
||||
|
||||
import org.opensearch.test.OpenSearchTestCase;
|
||||
|
|
@ -16,11 +16,11 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.persistent.decider;
|
||||
package org.opensearch.persistent.decider;
|
||||
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.elasticsearch.persistent.PersistentTasksDecidersTestCase;
|
||||
import org.opensearch.persistent.PersistentTasksDecidersTestCase;
|
||||
|
||||
public class EnableAssignmentDeciderTests extends PersistentTasksDecidersTestCase {
|
||||
|
|
@ -17,15 +17,15 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.plugins;
|
||||
package org.opensearch.plugins;
|
||||
|
||||
import org.opensearch.bootstrap.JavaVersion;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.cluster.routing.ShardRouting;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.elasticsearch.index.IndexModule;
|
||||
import org.elasticsearch.index.store.FsDirectoryFactory;
|
||||
import org.elasticsearch.indices.recovery.RecoveryState;
|
||||
import org.opensearch.index.IndexModule;
|
||||
import org.opensearch.index.store.FsDirectoryFactory;
|
||||
import org.opensearch.indices.recovery.RecoveryState;
|
||||
import org.opensearch.node.MockNode;
|
||||
import org.opensearch.test.OpenSearchTestCase;
|
||||
|
||||
|
@ -137,7 +137,7 @@ public class IndexStorePluginTests extends OpenSearchTestCase {
|
|||
} else {
|
||||
assertThat(e, hasToString(matches(
|
||||
"java.lang.IllegalStateException: Duplicate key " +
|
||||
"org.elasticsearch.plugins.IndexStorePluginTests\\$RecoveryFactory@[\\w\\d]+")));
|
||||
"org.opensearch.plugins.IndexStorePluginTests\\$RecoveryFactory@[\\w\\d]+")));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.plugins;
|
||||
package org.opensearch.plugins;
|
||||
|
||||
import org.apache.lucene.util.Constants;
|
||||
import org.opensearch.test.OpenSearchTestCase;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.plugins;
|
||||
package org.opensearch.plugins;
|
||||
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.action.admin.cluster.node.info.PluginsAndModules;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.plugins;
|
||||
package org.opensearch.plugins;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.apache.lucene.util.Constants;
|
||||
|
@ -27,9 +27,9 @@ import org.opensearch.bootstrap.JarHell;
|
|||
import org.opensearch.common.collect.Tuple;
|
||||
import org.opensearch.common.io.PathUtils;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.opensearch.env.Environment;
|
||||
import org.opensearch.env.TestEnvironment;
|
||||
import org.elasticsearch.index.IndexModule;
|
||||
import org.opensearch.index.IndexModule;
|
||||
import org.opensearch.test.OpenSearchTestCase;
|
||||
import org.hamcrest.Matchers;
|
||||
import org.opensearch.plugins.PluginTestUtil;
|
||||
|
@ -654,7 +654,7 @@ public class PluginsServiceTests extends OpenSearchTestCase {
|
|||
final Settings settings =
|
||||
Settings.builder()
|
||||
.put("path.home", createTempDir())
|
||||
.put("plugin.mandatory", "org.elasticsearch.plugins.PluginsServiceTests$FakePlugin")
|
||||
.put("plugin.mandatory", "org.opensearch.plugins.PluginsServiceTests$FakePlugin")
|
||||
.build();
|
||||
newPluginsService(settings, FakePlugin.class);
|
||||
}
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.plugins;
|
||||
package org.opensearch.plugins;
|
||||
|
||||
import org.apache.lucene.util.Constants;
|
||||
import org.opensearch.test.OpenSearchTestCase;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.plugins.spi;
|
||||
package org.opensearch.plugins.spi;
|
||||
|
||||
import org.opensearch.common.ParseField;
|
||||
import org.opensearch.common.io.Streams;
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.recovery;
|
||||
package org.opensearch.recovery;
|
||||
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
Loading…
Reference in New Issue