From db534347e5f543621458252d5bffc2229cb239e4 Mon Sep 17 00:00:00 2001 From: Dongjoon Hyun Date: Wed, 9 Mar 2016 10:01:15 -0800 Subject: [PATCH] Fix typos in comments/strings of `test` module. --- test/build.gradle | 2 +- test/framework/build.gradle | 2 +- .../org/elasticsearch/bootstrap/BootstrapForTesting.java | 2 +- .../main/java/org/elasticsearch/test/ESIntegTestCase.java | 8 ++++---- .../java/org/elasticsearch/test/ESSingleNodeTestCase.java | 4 ++-- .../src/main/java/org/elasticsearch/test/ESTestCase.java | 2 +- .../org/elasticsearch/test/InternalSettingsPlugin.java | 2 +- .../test/disruption/BlockClusterStateProcessing.java | 2 +- .../test/hamcrest/ElasticsearchAssertions.java | 6 +++--- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/test/build.gradle b/test/build.gradle index 564f8673307..7e1b5725147 100644 --- a/test/build.gradle +++ b/test/build.gradle @@ -27,7 +27,7 @@ subprojects { apply plugin: 'elasticsearch.build' - // the main files are actually test files, so use the appopriate forbidden api sigs + // the main files are actually test files, so use the appropriate forbidden api sigs forbiddenApisMain { bundledSignatures = ['jdk-unsafe', 'jdk-deprecated'] signaturesURLs = [PrecommitTasks.getResource('/forbidden/all-signatures.txt'), diff --git a/test/framework/build.gradle b/test/framework/build.gradle index 355459f99f5..8ee5fbfe81a 100644 --- a/test/framework/build.gradle +++ b/test/framework/build.gradle @@ -36,7 +36,7 @@ dependencies { compileJava.options.compilerArgs << '-Xlint:-cast,-rawtypes,-try,-unchecked' compileTestJava.options.compilerArgs << '-Xlint:-rawtypes' -// the main files are actually test files, so use the appopriate forbidden api sigs +// the main files are actually test files, so use the appropriate forbidden api sigs forbiddenApisMain { bundledSignatures = ['jdk-unsafe', 'jdk-deprecated'] signaturesURLs = [PrecommitTasks.getResource('/forbidden/all-signatures.txt'), diff --git a/test/framework/src/main/java/org/elasticsearch/bootstrap/BootstrapForTesting.java b/test/framework/src/main/java/org/elasticsearch/bootstrap/BootstrapForTesting.java index aa77c670a42..68eb0420b39 100644 --- a/test/framework/src/main/java/org/elasticsearch/bootstrap/BootstrapForTesting.java +++ b/test/framework/src/main/java/org/elasticsearch/bootstrap/BootstrapForTesting.java @@ -166,7 +166,7 @@ public class BootstrapForTesting { } /** - * we dont know which codesources belong to which plugin, so just remove the permission from key codebases + * we don't know which codesources belong to which plugin, so just remove the permission from key codebases * like core, test-framework, etc. this way tests fail if accesscontroller blocks are missing. */ @SuppressForbidden(reason = "accesses fully qualified URLs to configure security") diff --git a/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java index a3161f4090f..5d0379af202 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java @@ -1696,7 +1696,7 @@ public abstract class ESIntegTestCase extends ESTestCase { /** Helper method to create list of plugins without specifying generic types. */ @SafeVarargs - @SuppressWarnings("varargs") // due to type erasure, the varargs type is non-reifiable, which casues this warning + @SuppressWarnings("varargs") // due to type erasure, the varargs type is non-reifiable, which causes this warning protected final Collection> pluginList(Class... plugins) { return Arrays.asList(plugins); } @@ -1704,7 +1704,7 @@ public abstract class ESIntegTestCase extends ESTestCase { /** * This method is used to obtain additional settings for clients created by the internal cluster. * These settings will be applied on the client in addition to some randomized settings defined in - * the cluster. These setttings will also override any other settings the internal cluster might + * the cluster. These settings will also override any other settings the internal cluster might * add by default. */ protected Settings transportClientSettings() { @@ -1840,7 +1840,7 @@ public abstract class ESIntegTestCase extends ESTestCase { } @Override public String description() { - return "a test plugin that registeres index.tests.seed as an index setting"; + return "a test plugin that registers index.tests.seed as an index setting"; } public void onModule(SettingsModule module) { module.registerSetting(INDEX_TEST_SEED_SETTING); @@ -1981,7 +1981,7 @@ public abstract class ESIntegTestCase extends ESTestCase { @After public final void after() throws Exception { printTestMessage("finished"); - // Deleting indices is going to clear search contexts implicitely so we + // Deleting indices is going to clear search contexts implicitly so we // need to check that there are no more in-flight search contexts before // we remove indices super.ensureAllSearchContextsReleased(); diff --git a/test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java index fc713400262..2988bf169e9 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java @@ -108,7 +108,7 @@ public abstract class ESSingleNodeTestCase extends ESTestCase { public void setUp() throws Exception { super.setUp(); // Create the node lazily, on the first test. This is ok because we do not randomize any settings, - // only the cluster name. This allows us to have overriden properties for plugins and the version to use. + // only the cluster name. This allows us to have overridden properties for plugins and the version to use. if (NODE == null) { startNode(); } @@ -153,7 +153,7 @@ public abstract class ESSingleNodeTestCase extends ESTestCase { /** Helper method to create list of plugins without specifying generic types. */ @SafeVarargs - @SuppressWarnings("varargs") // due to type erasure, the varargs type is non-reifiable, which casues this warning + @SuppressWarnings("varargs") // due to type erasure, the varargs type is non-reifiable, which causes this warning protected final Collection> pluginList(Class... plugins) { return Arrays.asList(plugins); } diff --git a/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java index 84d88733802..8afffeb5e8c 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java @@ -130,7 +130,7 @@ public abstract class ESTestCase extends LuceneTestCase { protected void afterIfFailed(List errors) { } - /** called after a test is finished, but only if succesfull */ + /** called after a test is finished, but only if successful */ protected void afterIfSuccessful() throws Exception { } diff --git a/test/framework/src/main/java/org/elasticsearch/test/InternalSettingsPlugin.java b/test/framework/src/main/java/org/elasticsearch/test/InternalSettingsPlugin.java index 64719f0f9de..d8a8a9304a1 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/InternalSettingsPlugin.java +++ b/test/framework/src/main/java/org/elasticsearch/test/InternalSettingsPlugin.java @@ -31,7 +31,7 @@ public final class InternalSettingsPlugin extends Plugin { @Override public String description() { - return "a plugin that allows to set values for internal settings which are can't be set via the ordinary API without this pluging installed"; + return "a plugin that allows to set values for internal settings which are can't be set via the ordinary API without this plugin installed"; } public static final Setting VERSION_CREATED = Setting.intSetting("index.version.created", 0, false, Setting.Scope.INDEX); diff --git a/test/framework/src/main/java/org/elasticsearch/test/disruption/BlockClusterStateProcessing.java b/test/framework/src/main/java/org/elasticsearch/test/disruption/BlockClusterStateProcessing.java index e318843e84f..881fa43ce47 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/disruption/BlockClusterStateProcessing.java +++ b/test/framework/src/main/java/org/elasticsearch/test/disruption/BlockClusterStateProcessing.java @@ -56,7 +56,7 @@ public class BlockClusterStateProcessing extends SingleNodeDisruption { } logger.info("delaying cluster state updates on node [{}]", disruptionNodeCopy); boolean success = disruptionLatch.compareAndSet(null, new CountDownLatch(1)); - assert success : "startDisrupting called without waiting on stopDistrupting to complete"; + assert success : "startDisrupting called without waiting on stopDisrupting to complete"; final CountDownLatch started = new CountDownLatch(1); clusterService.submitStateUpdateTask("service_disruption_block", new ClusterStateUpdateTask(Priority.IMMEDIATE) { diff --git a/test/framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java b/test/framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java index cb3bbc7436b..7adf6d2b4b9 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java +++ b/test/framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java @@ -144,7 +144,7 @@ public class ElasticsearchAssertions { } /** - * Checks that all shard requests of a replicated brodcast request failed due to a cluster block + * Checks that all shard requests of a replicated broadcast request failed due to a cluster block * * @param replicatedBroadcastResponse the response that should only contain failed shard responses * @@ -716,7 +716,7 @@ public class ElasticsearchAssertions { /** * Applies basic assertions on the SearchResponse. This method checks if all shards were successful, if - * any of the shards threw an exception and if the response is serializeable. + * any of the shards threw an exception and if the response is serializable. */ public static SearchResponse assertSearchResponse(SearchRequestBuilder request) { return assertSearchResponse(request.get()); @@ -724,7 +724,7 @@ public class ElasticsearchAssertions { /** * Applies basic assertions on the SearchResponse. This method checks if all shards were successful, if - * any of the shards threw an exception and if the response is serializeable. + * any of the shards threw an exception and if the response is serializable. */ public static SearchResponse assertSearchResponse(SearchResponse response) { assertNoFailures(response);