You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ep...@apache.org on 2022/06/27 16:19:53 UTC
[solr] branch main updated: SOLR-16244: Update typos and grammar (#900)
This is an automated email from the ASF dual-hosted git repository.
epugh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 27b0067ca6b SOLR-16244: Update typos and grammar (#900)
27b0067ca6b is described below
commit 27b0067ca6bfd18d794f17b91f1600f20aceb79e
Author: Eric Pugh <ep...@opensourceconnections.com>
AuthorDate: Mon Jun 27 10:19:48 2022 -0600
SOLR-16244: Update typos and grammar (#900)
Review of comments, variable names, and method names for typos and grammer errors.
Co-authored-by: Christine Poerschke <cp...@apache.org>
---
solr/CHANGES.txt | 4 +-
...=> schema-densevector-codec-hyperparameter.xml} | 2 +-
...roperties.xml => solrconfig-coreproperties.xml} | 0
.../conf/solrconfig-suggestercomponent.xml | 18 +++---
.../org/apache/solr/BasicFunctionalityTest.java | 2 +-
.../test/org/apache/solr/ConvertedLegacyTest.java | 2 +-
.../src/test/org/apache/solr/CursorPagingTest.java | 38 ++++++------
.../test/org/apache/solr/MinimalSchemaTest.java | 2 +-
solr/core/src/test/org/apache/solr/SampleTest.java | 2 +-
.../test/org/apache/solr/SolrTestCaseJ4Test.java | 2 +-
.../test/org/apache/solr/TestCrossCoreJoin.java | 2 +-
.../apache/solr/TestHighlightDedupGrouping.java | 5 +-
.../test/org/apache/solr/TestRandomDVFaceting.java | 4 +-
.../test/org/apache/solr/TestRandomFaceting.java | 6 +-
.../org/apache/solr/TestSolrCoreProperties.java | 2 +-
.../embedded/TestEmbeddedSolrServerSchemaAPI.java | 4 +-
.../client/solrj/impl/ConnectionReuseTest.java | 4 +-
.../org/apache/solr/cloud/ActionThrottleTest.java | 12 ++--
.../test/org/apache/solr/cloud/AddReplicaTest.java | 2 +-
.../apache/solr/cloud/AliasIntegrationTest.java | 16 ++---
.../solr/cloud/ChaosMonkeyShardSplitTest.java | 2 +-
.../cloud/CloudExitableDirectoryReaderTest.java | 12 ++--
.../apache/solr/cloud/CollectionsAPISolrJTest.java | 2 +-
.../cloud/ConcurrentCreateRoutedAliasTest.java | 16 ++---
.../apache/solr/cloud/ConfigSetApiLockingTest.java | 6 +-
.../apache/solr/cloud/ConnectionManagerTest.java | 6 +-
.../apache/solr/cloud/CreateRoutedAliasTest.java | 2 +-
.../test/org/apache/solr/cloud/DeleteNodeTest.java | 11 ++--
.../org/apache/solr/cloud/DeleteReplicaTest.java | 4 +-
.../org/apache/solr/cloud/DeleteShardTest.java | 2 +-
.../apache/solr/cloud/DistribCursorPagingTest.java | 2 +-
.../DistribDocExpirationUpdateProcessorTest.java | 12 ++--
.../solr/cloud/DistributedApiAsyncTrackerTest.java | 28 ++++-----
.../solr/cloud/DistributedVersionInfoTest.java | 4 +-
.../apache/solr/cloud/DocValuesNotIndexedTest.java | 8 +--
.../org/apache/solr/cloud/ForceLeaderTest.java | 2 +-
.../solr/cloud/FullSolrCloudDistribCmdsTest.java | 26 ++++----
.../org/apache/solr/cloud/HttpPartitionTest.java | 2 +-
.../cloud/LeaderFailureAfterFreshStartTest.java | 2 +-
.../solr/cloud/LeaderVoteWaitTimeoutTest.java | 3 +-
.../apache/solr/cloud/MultiThreadedOCPTest.java | 6 +-
.../OutOfBoxZkACLAndCredentialsProvidersTest.java | 2 +-
.../OverseerCollectionConfigSetProcessorTest.java | 2 +-
...verseerSolrResponseUnsafeSerializationTest.java | 2 +-
.../org/apache/solr/cloud/OverseerStatusTest.java | 1 +
.../test/org/apache/solr/cloud/OverseerTest.java | 4 +-
.../apache/solr/cloud/PeerSyncReplicationTest.java | 6 +-
.../org/apache/solr/cloud/ReplaceNodeTest.java | 18 +++---
.../apache/solr/cloud/ReplicationFactorTest.java | 19 +++---
.../test/org/apache/solr/cloud/RouteFieldTest.java | 4 +-
.../solr/cloud/SegmentTerminateEarlyTestState.java | 2 +-
.../org/apache/solr/cloud/SolrCLIZkUtilsTest.java | 12 ++--
.../apache/solr/cloud/SolrCloudExampleTest.java | 4 +-
.../test/org/apache/solr/cloud/SplitShardTest.java | 4 +-
.../solr/cloud/SystemCollectionCompatTest.java | 2 +-
.../solr/cloud/TestAuthenticationFramework.java | 2 +-
.../apache/solr/cloud/TestBaseStatsCacheCloud.java | 2 +-
.../apache/solr/cloud/TestCloudConsistency.java | 4 +-
.../apache/solr/cloud/TestCloudDeleteByQuery.java | 2 +-
.../TestCloudPhrasesIdentificationComponent.java | 4 +-
.../org/apache/solr/cloud/TestCloudPivotFacet.java | 12 ++--
.../solr/cloud/TestCloudPseudoReturnFields.java | 9 ++-
.../solr/cloud/TestCloudSearcherWarming.java | 2 +-
.../solr/cloud/TestConfigSetsAPIZkFailure.java | 2 +-
.../solr/cloud/TestDistribDocBasedVersion.java | 8 +--
.../solr/cloud/TestMiniSolrCloudClusterSSL.java | 12 ++--
.../org/apache/solr/cloud/TestPrepRecovery.java | 4 +-
.../org/apache/solr/cloud/TestPullReplica.java | 6 +-
.../solr/cloud/TestPullReplicaErrorHandling.java | 2 +-
.../apache/solr/cloud/TestPullReplicaWithAuth.java | 2 +-
.../solr/cloud/TestQueryingOnDownCollection.java | 3 +-
.../apache/solr/cloud/TestRandomFlRTGCloud.java | 49 +++++++--------
.../apache/solr/cloud/TestRebalanceLeaders.java | 36 +++++------
.../apache/solr/cloud/TestSSLRandomization.java | 10 ++--
.../org/apache/solr/cloud/TestSegmentSorting.java | 7 ++-
.../solr/cloud/TestShortCircuitedRequests.java | 2 +-
.../solr/cloud/TestSkipOverseerOperations.java | 10 ++--
.../cloud/TestStressCloudBlindAtomicUpdates.java | 14 ++---
.../solr/cloud/TestStressInPlaceUpdates.java | 35 ++++++-----
.../org/apache/solr/cloud/TestStressLiveNodes.java | 9 +--
.../solr/cloud/TestTlogReplayVsRecovery.java | 8 +--
.../org/apache/solr/cloud/TestTlogReplica.java | 16 ++---
.../cloud/TestTolerantUpdateProcessorCloud.java | 40 ++++++-------
.../TestTolerantUpdateProcessorRandomCloud.java | 12 ++--
.../cloud/TestWaitForStateWithJettyShutdowns.java | 12 ++--
.../solr/cloud/TriLevelCompositeIdRoutingTest.java | 4 +-
.../solr/cloud/TrollingIndexReaderFactory.java | 14 ++---
.../org/apache/solr/cloud/ZkControllerTest.java | 4 +-
.../apache/solr/cloud/ZkDistributedLockTest.java | 8 +--
.../test/org/apache/solr/cloud/ZkFailoverTest.java | 2 +-
.../org/apache/solr/cloud/ZkSolrClientTest.java | 2 +-
.../api/collections/CollectionApiLockingTest.java | 2 +-
.../solr/cloud/api/collections/ShardSplitTest.java | 6 +-
.../cloud/api/collections/SplitByPrefixTest.java | 6 +-
.../TestCollectionsAPIViaSolrCloudCluster.java | 2 +-
.../collections/TestLocalFSCloudBackupRestore.java | 40 ++++++-------
.../api/collections/TestReplicaProperties.java | 8 +--
.../TestRequestStatusCollectionAPI.java | 2 +-
.../apache/solr/cluster/placement/Builders.java | 16 ++---
.../plugins/AffinityPlacementFactoryTest.java | 16 ++---
.../apache/solr/core/BlobRepositoryCloudTest.java | 2 +-
.../test/org/apache/solr/core/CoreSorterTest.java | 2 +-
.../apache/solr/core/DirectoryFactoriesTest.java | 6 +-
.../solr/core/ExitableDirectoryReaderTest.java | 4 +-
.../test/org/apache/solr/core/PluginInfoTest.java | 2 +-
.../org/apache/solr/core/QueryResultKeyTest.java | 2 +-
.../apache/solr/core/RAMDirectoryFactoryTest.java | 2 +-
.../org/apache/solr/core/ResourceLoaderTest.java | 2 +-
.../src/test/org/apache/solr/core/SOLR749Test.java | 4 +-
.../solr/core/TestBackupRepositoryFactory.java | 2 +-
.../org/apache/solr/core/TestCoreDiscovery.java | 13 ++--
.../org/apache/solr/core/TestCustomStream.java | 1 -
.../org/apache/solr/core/TestJmxIntegration.java | 6 +-
.../test/org/apache/solr/core/TestLazyCores.java | 18 +++---
.../apache/solr/core/TestQuerySenderListener.java | 2 +-
.../apache/solr/core/TestQuerySenderNoQuery.java | 2 +-
.../org/apache/solr/core/TestXIncludeConfig.java | 4 +-
.../core/snapshots/TestSolrCloudSnapshots.java | 6 +-
.../solr/core/snapshots/TestSolrCoreSnapshots.java | 8 +--
.../solr/filestore/TestDistribPackageStore.java | 2 +-
.../DocumentAnalysisRequestHandlerTest.java | 4 +-
.../handler/FieldAnalysisRequestHandlerTest.java | 30 +++++-----
.../org/apache/solr/handler/JsonLoaderTest.java | 6 +-
.../apache/solr/handler/ReplicationTestHelper.java | 2 +-
.../org/apache/solr/handler/TestCSVLoader.java | 2 +-
.../apache/solr/handler/TestContainerPlugin.java | 2 +-
.../handler/TestHealthCheckHandlerLegacyMode.java | 2 +-
.../solr/handler/TestIncrementalCoreBackup.java | 11 ++--
.../solr/handler/TestReplicationHandler.java | 2 +-
.../solr/handler/TestReplicationHandlerBackup.java | 4 +-
.../org/apache/solr/handler/TestRequestId.java | 6 +-
.../org/apache/solr/handler/TestRestoreCore.java | 6 +-
.../solr/handler/TestSnapshotCoreBackup.java | 19 +++---
.../handler/TestSolrConfigHandlerConcurrent.java | 2 +-
.../solr/handler/TestStressIncrementalBackup.java | 6 +-
.../solr/handler/TestStressThreadBackup.java | 16 ++---
.../solr/handler/admin/DaemonStreamApiTest.java | 5 +-
.../solr/handler/admin/HealthCheckHandlerTest.java | 16 ++---
.../solr/handler/admin/LoggingHandlerTest.java | 2 +-
.../solr/handler/admin/LukeRequestHandlerTest.java | 6 +-
.../solr/handler/admin/MetricsHandlerTest.java | 4 +-
.../handler/admin/ShowFileRequestHandlerTest.java | 2 +-
.../solr/handler/admin/SplitHandlerTest.java | 2 +-
.../solr/handler/admin/StatsReloadRaceTest.java | 6 +-
.../solr/handler/admin/TestCollectionAPIs.java | 2 +-
.../solr/handler/admin/V2ApiMappingTest.java | 2 +-
.../handler/admin/V2CollectionsAPIMappingTest.java | 3 +-
.../handler/admin/api/V2NodeAPIMappingTest.java | 2 +-
.../component/DistributedDebugComponentTest.java | 2 +-
.../component/DistributedExpandComponentTest.java | 2 +-
.../component/DistributedFacetExistsSmallTest.java | 4 +-
.../component/DistributedFacetPivotLargeTest.java | 6 +-
.../DistributedFacetPivotLongTailTest.java | 2 +-
.../component/DistributedMLTComponentTest.java | 6 +-
.../DistributedQueryComponentOptimizationTest.java | 4 +-
.../PhrasesIdentificationComponentTest.java | 20 +++----
.../component/ResourceSharingTestComponent.java | 2 +-
.../solr/handler/component/SearchHandlerTest.java | 2 +-
.../solr/handler/component/StatsComponentTest.java | 44 +++++++-------
.../SuggestComponentContextFilterQueryTest.java | 2 +-
.../handler/component/SuggestComponentTest.java | 4 +-
.../handler/component/TermVectorComponentTest.java | 2 +-
.../TestDistributedStatsComponentCardinality.java | 14 ++---
.../handler/component/TestExpandComponent.java | 2 +-
.../handler/component/TestPivotHelperCode.java | 2 +-
.../handler/designer/TestSchemaDesignerAPI.java | 2 +-
.../solr/handler/export/TestExportWriter.java | 2 +-
.../apache/solr/handler/tagger/Tagger2Test.java | 4 +-
.../solr/handler/tagger/TaggingAttributeTest.java | 8 +--
.../handler/tagger/WordLengthTaggingFilter.java | 4 +-
.../solr/highlight/HighlighterMaxOffsetTest.java | 8 +--
.../org/apache/solr/highlight/HighlighterTest.java | 2 +-
.../apache/solr/internal/csv/CSVParserTest.java | 6 +-
.../apache/solr/legacy/TestLegacyNumericUtils.java | 17 +++---
.../org/apache/solr/logging/TestLogWatcher.java | 4 +-
.../solr/metrics/SolrMetricsIntegrationTest.java | 2 +-
.../metrics/reporters/SolrJmxReporterTest.java | 2 +-
.../src/test/org/apache/solr/pkg/TestPackages.java | 4 +-
.../org/apache/solr/request/SimpleFacetsTest.java | 4 +-
.../org/apache/solr/request/TestFacetMethods.java | 4 +-
.../test/org/apache/solr/request/TestFaceting.java | 6 +-
.../apache/solr/request/TestIntervalFaceting.java | 18 +++---
.../apache/solr/request/TestRemoteStreaming.java | 2 +-
.../org/apache/solr/request/TestWriterPerf.java | 2 +-
.../solr/request/macro/TestMacroExpander.java | 6 +-
.../response/TestPHPSerializedResponseWriter.java | 2 +-
.../solr/response/TestRetrieveFieldsOptimizer.java | 8 +--
.../transform/TestChildDocTransformer.java | 2 +-
.../org/apache/solr/rest/TestManagedResource.java | 2 +-
.../apache/solr/rest/schema/TestBulkSchemaAPI.java | 2 +-
.../analysis/TestManagedSynonymFilterFactory.java | 12 ++--
.../TestManagedSynonymGraphFilterFactory.java | 12 ++--
.../org/apache/solr/schema/BooleanFieldTest.java | 2 +-
.../apache/solr/schema/ChangedSchemaMergeTest.java | 2 +-
.../apache/solr/schema/CurrencyFieldTypeTest.java | 27 +++++----
.../apache/solr/schema/CustomAnalyzerStrField.java | 4 +-
.../apache/solr/schema/DenseVectorFieldTest.java | 10 ++--
.../org/apache/solr/schema/DocValuesMultiTest.java | 2 +-
.../solr/schema/IndexSchemaRuntimeFieldTest.java | 2 +-
.../solr/schema/NotRequiredUniqueKeyTest.java | 2 +-
.../test/org/apache/solr/schema/PolyFieldTest.java | 12 ++--
.../org/apache/solr/schema/RequiredFieldsTest.java | 10 ++--
.../schema/SchemaVersionSpecificBehaviorTest.java | 8 +--
.../solr/schema/SpatialRPTFieldTypeTest.java | 4 +-
.../apache/solr/schema/TestCloudSchemaless.java | 2 +-
.../org/apache/solr/schema/TestCollationField.java | 2 +-
.../solr/schema/TestCollationFieldDocValues.java | 2 +-
.../org/apache/solr/schema/TestManagedSchema.java | 18 +++---
.../org/apache/solr/schema/TestPointFields.java | 25 ++++----
.../solr/schema/TestSchemalessBufferedUpdates.java | 2 +-
.../apache/solr/schema/TestSortableTextField.java | 16 ++---
.../solr/schema/TestUseDocValuesAsStored.java | 2 +-
.../solr/search/AnalyticsMergeStrategyTest.java | 2 +-
.../solr/search/CurrencyRangeFacetCloudTest.java | 31 +++++-----
.../org/apache/solr/search/CursorMarkTest.java | 4 +-
.../solr/search/DelayingSearchComponent.java | 6 +-
.../org/apache/solr/search/QueryEqualityTest.java | 12 ++--
.../org/apache/solr/search/QueryParsingTest.java | 2 +-
.../apache/solr/search/RankQParserPluginTest.java | 4 +-
.../apache/solr/search/RankQueryTestPlugin.java | 10 ++--
.../org/apache/solr/search/ReturnFieldsTest.java | 10 ++--
.../apache/solr/search/SortSpecParsingTest.java | 8 +--
.../org/apache/solr/search/SpatialFilterTest.java | 8 +--
.../org/apache/solr/search/TestBlockCollapse.java | 23 ++++----
.../solr/search/TestCollapseQParserPlugin.java | 6 +-
.../test/org/apache/solr/search/TestDocSet.java | 6 +-
.../test/org/apache/solr/search/TestFiltering.java | 2 +-
.../solr/search/TestFoldingMultitermQuery.java | 2 +-
.../solr/search/TestGraphTermsQParserPlugin.java | 2 +-
.../org/apache/solr/search/TestIndexSearcher.java | 6 +-
.../search/TestLegacyNumericRangeQueryBuilder.java | 4 +-
.../solr/search/TestPayloadScoreQParserPlugin.java | 2 +-
.../apache/solr/search/TestPseudoReturnFields.java | 2 +-
.../search/TestRandomCollapseQParserPlugin.java | 11 ++--
.../org/apache/solr/search/TestRangeQuery.java | 4 +-
.../solr/search/TestReRankQParserPlugin.java | 18 +++---
.../org/apache/solr/search/TestRealTimeGet.java | 28 +++++----
.../test/org/apache/solr/search/TestRecovery.java | 37 ++++++------
.../org/apache/solr/search/TestSearcherReuse.java | 9 ++-
.../org/apache/solr/search/TestSolr4Spatial.java | 16 ++---
.../org/apache/solr/search/TestSolr4Spatial2.java | 6 +-
.../apache/solr/search/TestSolrQueryParser.java | 10 ++--
.../org/apache/solr/search/TestStressLucene.java | 3 +-
.../org/apache/solr/search/TestStressRecovery.java | 9 +--
.../org/apache/solr/search/TestStressReorder.java | 3 +-
.../apache/solr/search/TestStressUserVersions.java | 3 +-
.../org/apache/solr/search/TestStressVersions.java | 3 +-
.../apache/solr/search/TestValueSourceCache.java | 2 +-
...stributedFacetSimpleRefinementLongTailTest.java | 4 +-
.../solr/search/facet/RangeFacetCloudTest.java | 14 ++---
.../search/facet/SpatialHeatmapFacetsTest.java | 8 +--
.../search/facet/TestCloudJSONFacetJoinDomain.java | 29 ++++-----
.../solr/search/facet/TestCloudJSONFacetSKG.java | 32 +++++-----
.../search/facet/TestCloudJSONFacetSKGEquiv.java | 69 +++++++++++-----------
.../solr/search/facet/TestJsonFacetRefinement.java | 32 +++++-----
.../apache/solr/search/facet/TestJsonFacets.java | 69 +++++++++++-----------
.../solr/search/facet/TestJsonRangeFacets.java | 2 +-
.../solr/search/function/SortByFunctionTest.java | 6 +-
.../solr/search/function/TestFunctionQuery.java | 6 +-
.../function/TestMinMaxOnMultiValuedField.java | 12 ++--
.../apache/solr/search/function/TestOrdValues.java | 10 ++--
.../org/apache/solr/search/join/BJQParserTest.java | 2 +-
.../search/join/CrossCollectionJoinQueryTest.java | 4 +-
.../solr/search/join/TestCloudNestedDocsSort.java | 6 +-
.../solr/search/join/TestNestedDocsSort.java | 4 +-
.../solr/search/join/TestScoreJoinQPNoScore.java | 2 +-
.../solr/search/join/TestScoreJoinQPScore.java | 14 ++---
.../similarities/TestPerFieldSimilarity.java | 1 -
.../TestSweetSpotSimilarityFactory.java | 2 +-
.../solr/security/AllowListUrlCheckerTest.java | 2 +-
.../solr/security/AuditLoggerIntegrationTest.java | 14 ++---
.../BaseTestRuleBasedAuthorizationPlugin.java | 10 ++--
.../solr/security/PrincipalWithUserRoles.java | 4 +-
.../org/apache/solr/servlet/CacheHeaderTest.java | 4 +-
.../solr/servlet/DirectSolrConnectionTest.java | 2 +-
.../org/apache/solr/servlet/NoCacheHeaderTest.java | 4 +-
.../apache/solr/servlet/SecurityHeadersTest.java | 2 +-
.../apache/solr/servlet/SolrRequestParserTest.java | 4 +-
.../solr/spelling/SpellCheckCollatorTest.java | 16 ++---
.../solr/spelling/SpellingQueryConverterTest.java | 2 +-
.../uninverting/TestDocTermOrdsUninvertLimit.java | 4 +-
.../apache/solr/uninverting/TestFieldCache.java | 4 +-
.../solr/uninverting/TestFieldCacheSort.java | 4 +-
.../uninverting/TestFieldCacheVsDocValues.java | 4 +-
.../solr/uninverting/TestLegacyFieldCache.java | 2 +-
.../solr/uninverting/TestNumericTerms32.java | 2 +-
.../solr/uninverting/TestNumericTerms64.java | 2 +-
.../solr/uninverting/TestUninvertingReader.java | 2 +-
.../org/apache/solr/update/AddBlockUpdateTest.java | 2 +-
.../solr/update/DeleteByIdWithRouterFieldTest.java | 4 +-
.../apache/solr/update/DocumentBuilderTest.java | 6 +-
.../apache/solr/update/MaxSizeAutoCommitTest.java | 6 +-
.../solr/update/MockStreamingSolrClients.java | 2 +-
.../apache/solr/update/MockingHttp2SolrClient.java | 2 +-
.../test/org/apache/solr/update/PeerSyncTest.java | 14 ++---
.../solr/update/PeerSyncWithBufferUpdatesTest.java | 4 +-
.../PeerSyncWithIndexFingerprintCachingTest.java | 2 +-
.../solr/update/TestInPlaceUpdatesDistrib.java | 26 ++++----
.../solr/update/TestInPlaceUpdatesStandalone.java | 37 ++++++------
.../solr/update/TestNestedUpdateProcessor.java | 34 +++++------
.../test/org/apache/solr/update/TestUpdate.java | 2 +-
.../test/org/apache/solr/update/UpdateLogTest.java | 8 +--
.../org/apache/solr/update/UpdateParamsTest.java | 8 +--
.../org/apache/solr/update/VersionInfoTest.java | 6 +-
.../update/processor/AtomicUpdateJavabinTest.java | 2 +-
.../CategoryRoutedAliasUpdateProcessorTest.java | 26 ++++----
.../CloneFieldUpdateProcessorFactoryTest.java | 2 +-
.../processor/CustomUpdateRequestProcessor.java | 2 +-
.../DimensionalRoutedAliasUpdateProcessorTest.java | 4 +-
.../processor/DistributedUpdateProcessorTest.java | 4 +-
.../DocExpirationUpdateProcessorFactoryTest.java | 6 +-
.../FieldMutatingUpdateProcessorTest.java | 2 +-
.../ParsingFieldUpdateProcessorsTest.java | 2 +-
.../processor/RoutedAliasUpdateProcessorTest.java | 6 +-
.../SignatureUpdateProcessorFactoryTest.java | 4 +-
.../processor/TestDocBasedVersionConstraints.java | 2 +-
.../TimeRoutedAliasUpdateProcessorTest.java | 28 ++++-----
.../processor/TolerantUpdateProcessorTest.java | 2 +-
.../processor/UUIDUpdateProcessorFallbackTest.java | 2 +-
.../UpdateRequestProcessorFactoryTest.java | 11 ++--
.../org/apache/solr/util/OrderedExecutorTest.java | 22 +++----
.../org/apache/solr/util/SolrPluginUtilsTest.java | 4 +-
.../apache/solr/util/TestSolrCLIRunExample.java | 2 +-
.../org/apache/solr/util/hll/ExplicitHLLTest.java | 6 +-
.../apache/solr/util/hll/HLLSerializationTest.java | 6 +-
.../solr/util/hll/IntegrationTestGenerator.java | 8 +--
326 files changed, 1302 insertions(+), 1264 deletions(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 8f74e8fdf70..5b7d350911c 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -3199,7 +3199,7 @@ Bug Fixes
Jason Gerlowski, Kesharee Nandan Vishwakarma)
* SOLR-12291: prematurely reporting not yet finished async Collections API call as completed
- when collection's replicas are collocated at least at one node (Varun Thacker, Mikhail Khludnev)
+ when collection's replicas are colocated at least at one node (Varun Thacker, Mikhail Khludnev)
* SOLR-13410: Designated overseer wasn't able to rejoin election queue upon restart (Ishan Chattopadhyaya,
Kesharee Nandan Vishwakarma)
@@ -3576,7 +3576,7 @@ Bug fixes
* SOLR-13718: SPLITSHARD (async) with failures in underlying sub-operations can result in data loss (Ishan Chattopadhyaya)
* SOLR-12291: prematurely reporting not yet finished async Collections API call as completed
- when collection's replicas are collocated at least at one node (Varun Thacker, Mikhail Khludnev)
+ when collection's replicas are colocated at least at one node (Varun Thacker, Mikhail Khludnev)
* SOLR-13828: Improve ExecutePlanAction error handling.
diff --git a/solr/core/src/test-files/solr/collection1/conf/schema-densevector-codec-hyperparamer.xml b/solr/core/src/test-files/solr/collection1/conf/schema-densevector-codec-hyperparameter.xml
similarity index 96%
rename from solr/core/src/test-files/solr/collection1/conf/schema-densevector-codec-hyperparamer.xml
rename to solr/core/src/test-files/solr/collection1/conf/schema-densevector-codec-hyperparameter.xml
index 132abefed32..8d81e431a57 100644
--- a/solr/core/src/test-files/solr/collection1/conf/schema-densevector-codec-hyperparamer.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/schema-densevector-codec-hyperparameter.xml
@@ -18,7 +18,7 @@
<!-- Test schema file for DenseVectorField -->
-<schema name="schema-densevector-codec-hyperparamer" version="1.0">
+<schema name="schema-densevector-codec-hyperparameter" version="1.0">
<fieldType name="string" class="solr.StrField" multiValued="true"/>
<fieldType name="knn_vector_default" class="solr.DenseVectorField" vectorDimension="4" similarityFunction="cosine"/>
<fieldType name="knn_vector" class="solr.DenseVectorField" vectorDimension="4" similarityFunction="cosine" codecFormat="Lucene91HnswVectorsFormat" hnswMaxConnections="10" hnswBeamWidth="40"/>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-solcoreproperties.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-coreproperties.xml
similarity index 100%
rename from solr/core/src/test-files/solr/collection1/conf/solrconfig-solcoreproperties.xml
rename to solr/core/src/test-files/solr/collection1/conf/solrconfig-coreproperties.xml
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-suggestercomponent.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-suggestercomponent.xml
index 857fb113687..c9ca5821e9d 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-suggestercomponent.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-suggestercomponent.xml
@@ -31,7 +31,7 @@
<requestHandler name="/select" class="solr.SearchHandler" />
<searchComponent class="solr.SuggestComponent" name="suggest">
-
+
<!-- Suggest component (default index based dictionary) -->
<lst name="suggester">
<str name="name">suggest_fuzzy_with_high_freq_dict</str>
@@ -43,7 +43,7 @@
<float name="threshold">0.0</float>
</lst>
-
+
<!-- Suggest component (default file based dictionary) -->
<lst name="suggester">
<str name="name">suggest_fuzzy_file_based</str>
@@ -79,7 +79,7 @@
<str name="suggestAnalyzerFieldType">text</str>
<str name="buildOnCommit">true</str>
</lst>
-
+
<!-- Suggest component (Document Dictionary) that is built on startup-->
<lst name="suggester">
<str name="name">suggest_fuzzy_doc_dict_build_startup</str>
@@ -91,10 +91,10 @@
<str name="buildOnCommit">false</str>
<str name="buildOnStartup">true</str>
</lst>
-
+
<!-- Suggest component (Document Dictionary) only builds manually-->
<lst name="suggester">
- <str name="name">suggest_fuzzy_doc_manal_build</str>
+ <str name="name">suggest_fuzzy_doc_manual_build</str>
<str name="lookupImpl">FuzzyLookupFactory</str>
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="field">cat</str>
@@ -102,9 +102,9 @@
<str name="suggestAnalyzerFieldType">text</str>
<str name="buildOnCommit">false</str>
<str name="buildOnStartup">false</str>
- <str name="storeDir">suggest_fuzzy_doc_manal_build</str>
+ <str name="storeDir">suggest_fuzzy_doc_manual_build</str>
</lst>
-
+
<!-- Suggest component (Document Dictionary) only builds manually and
has the default buildOnStartup behavior -->
<lst name="suggester">
@@ -117,7 +117,7 @@
<str name="buildOnCommit">false</str>
<str name="storeDir">suggest_doc_default_startup</str>
</lst>
-
+
<!-- Suggest component (Document Dictionary) only builds manually and
has the default buildOnStartup behavior with no storeDir -->
<lst name="suggester">
@@ -129,7 +129,7 @@
<str name="suggestAnalyzerFieldType">text</str>
<str name="buildOnCommit">false</str>
</lst>
-
+
</searchComponent>
<requestHandler name="/suggest" class="org.apache.solr.handler.component.SearchHandler">
diff --git a/solr/core/src/test/org/apache/solr/BasicFunctionalityTest.java b/solr/core/src/test/org/apache/solr/BasicFunctionalityTest.java
index 5b80656ae6d..cac8cdc99fc 100644
--- a/solr/core/src/test/org/apache/solr/BasicFunctionalityTest.java
+++ b/solr/core/src/test/org/apache/solr/BasicFunctionalityTest.java
@@ -439,7 +439,7 @@ public class BasicFunctionalityTest extends SolrTestCaseJ4 {
@Test
public void testMultipleUpdatesPerAdd() {
clearIndex();
- // big freaking kludge since the response is currently not well formed.
+ // big freaking kludge since the response is currently not well-formed.
String res =
h.update(
"<add><doc><field name=\"id\">1</field></doc><doc><field name=\"id\">2</field></doc></add>");
diff --git a/solr/core/src/test/org/apache/solr/ConvertedLegacyTest.java b/solr/core/src/test/org/apache/solr/ConvertedLegacyTest.java
index c439a7cdc5f..19e63e8bb17 100644
--- a/solr/core/src/test/org/apache/solr/ConvertedLegacyTest.java
+++ b/solr/core/src/test/org/apache/solr/ConvertedLegacyTest.java
@@ -24,7 +24,7 @@ import org.junit.BeforeClass;
import org.junit.Test;
/**
- * This tests was converted from a legacy testing system.
+ * These tests were converted from a legacy testing system.
*
* <p>it does not represent the best practices that should be used when writing Solr JUnit tests
*/
diff --git a/solr/core/src/test/org/apache/solr/CursorPagingTest.java b/solr/core/src/test/org/apache/solr/CursorPagingTest.java
index cbd55567570..67e9e58cf61 100644
--- a/solr/core/src/test/org/apache/solr/CursorPagingTest.java
+++ b/solr/core/src/test/org/apache/solr/CursorPagingTest.java
@@ -288,7 +288,7 @@ public class CursorPagingTest extends SolrTestCaseJ4 {
"/response/docs==[]",
"/facet_counts/facet_fields/str=={'a':4,'b':3,'c':0}"));
- // int sort with dups, id tie breaker ... and some faceting
+ // int sort with duplicates, id tiebreaker ... and some faceting
cursorMark = CURSOR_MARK_START;
params =
params(
@@ -330,7 +330,7 @@ public class CursorPagingTest extends SolrTestCaseJ4 {
"/response/docs==[]",
"/facet_counts/facet_fields/str=={'a':4,'b':1,'c':3}"));
- // int missing first sort with dups, id tie breaker
+ // int missing first sort with duplicates, id tiebreaker
cursorMark = CURSOR_MARK_START;
params =
params(
@@ -366,7 +366,7 @@ public class CursorPagingTest extends SolrTestCaseJ4 {
"/response/start==0",
"/response/docs==[]"));
- // int missing last sort with dups, id tie breaker
+ // int missing last sort with duplicates, id tiebreaker
cursorMark = CURSOR_MARK_START;
params =
params(
@@ -402,7 +402,7 @@ public class CursorPagingTest extends SolrTestCaseJ4 {
"/response/start==0",
"/response/docs==[]"));
- // string sort with dups, id tie breaker
+ // string sort with duplicates, id tiebreaker
cursorMark = CURSOR_MARK_START;
params =
params(
@@ -431,7 +431,7 @@ public class CursorPagingTest extends SolrTestCaseJ4 {
"/response/start==0",
"/response/docs==[]"));
- // tri-level sort with more dups of primary then fit on a page
+ // tri-level sort with more duplicates of primary then fit on a page
cursorMark = CURSOR_MARK_START;
params =
params(
@@ -479,7 +479,7 @@ public class CursorPagingTest extends SolrTestCaseJ4 {
"/response/start==0",
"/response/docs==[]"));
- // trivial base case: rows bigger then number of matches
+ // trivial base case: rows bigger than number of matches
cursorMark = CURSOR_MARK_START;
params =
params(
@@ -585,7 +585,7 @@ public class CursorPagingTest extends SolrTestCaseJ4 {
"/response/numFound==8",
"/response/start==0",
"/response/docs==[{'id':'2'},{'id':'5'}]");
- // update the next doc we expect so it's now in the past
+ // update the next doc we expect, so it's now in the past
assertU(adoc("id", "7", "str", "a"));
assertU(commit());
cursorMark =
@@ -904,9 +904,9 @@ public class CursorPagingTest extends SolrTestCaseJ4 {
/**
* Given a set of params, executes a cursor query using {@link CursorMarkParams#CURSOR_MARK_START}
* and then continuously walks the results using {@link CursorMarkParams#CURSOR_MARK_START} as
- * long as a non-0 number of docs ar returned. This method records the the set of all id's (must
- * be positive ints) encountered and throws an assertion failure if any id is encountered more
- * than once, or if an id is encountered which is not expected, or if an id is <code>[elevated]
+ * long as a non-0 number of docs ar returned. This method records the set of all id's (must be
+ * positive ints) encountered and throws an assertion failure if any id is encountered more than
+ * once, or if an id is encountered which is not expected, or if an id is <code>[elevated]
* </code> and comes "after" any ids which were not <code>[elevated]</code>
*
* @returns set of all elevated ids encountered in the walk
@@ -943,9 +943,9 @@ public class CursorPagingTest extends SolrTestCaseJ4 {
/**
* Given a set of params, executes a cursor query using {@link CursorMarkParams#CURSOR_MARK_START}
* and then continuously walks the results using {@link CursorMarkParams#CURSOR_MARK_START} as
- * long as a non-0 number of docs ar returned. This method records the the set of all id's (must
- * be positive ints) encountered and throws an assertion failure if any id is encountered more
- * than once, or if the set grows above maxSize
+ * long as a non-0 number of docs ar returned. This method records the set of all id's (must be
+ * positive ints) encountered and throws an assertion failure if any id is encountered more than
+ * once, or if the set grows above maxSize
*
* @returns set of all ids encountered in the walk
* @see #assertFullWalkNoDups(SolrParams,Consumer)
@@ -1054,9 +1054,9 @@ public class CursorPagingTest extends SolrTestCaseJ4 {
/**
* Given a set of params, executes a cursor query using {@link CursorMarkParams#CURSOR_MARK_START}
* and then continuously walks the results using {@link CursorMarkParams#CURSOR_MARK_START} as
- * long as a non-0 number of docs ar returned. This method records the the set of all id's (must
- * be positive ints) encountered and throws an assertion failure if any id is encountered more
- * than once, or if the set grows above maxSize.
+ * long as a non-0 number of docs ar returned. This method records the set of all id's (must be
+ * positive ints) encountered and throws an assertion failure if any id is encountered more than
+ * once, or if the set grows above maxSize.
*
* <p>Also checks that facets are the same with each page, and that they are correct.
*/
@@ -1251,7 +1251,7 @@ public class CursorPagingTest extends SolrTestCaseJ4 {
// simple function query across one field.
return "{!func}" + numericFields.get(0);
} else {
- // several SHOULD clauses on range queries
+ // several "SHOULD" clauses on range queries
int low = TestUtil.nextInt(random(), -2379, 2);
int high = TestUtil.nextInt(random(), 4, 5713);
return numericFields.get(0)
@@ -1296,7 +1296,7 @@ public class CursorPagingTest extends SolrTestCaseJ4 {
// wrap in a function sometimes
if (!"score".equals(field) && 0 == TestUtil.nextInt(random(), 0, 7)) {
// specific function doesn't matter, just proving that we can handle the concept.
- // but we do have to be careful with non numeric fields
+ // but we do have to be careful with non-numeric fields
if (field.contains("float")
|| field.contains("double")
|| field.contains("int")
@@ -1326,7 +1326,7 @@ public class CursorPagingTest extends SolrTestCaseJ4 {
// once we've done enough (extra) iters, break out with what we've got
break;
} else {
- // otherwise, pick a random slot to overwrite .. maybe
+ // otherwise, pick a random slot to overwrite... maybe
if (random().nextBoolean()) {
results[random().nextInt(results.length)] = key;
}
diff --git a/solr/core/src/test/org/apache/solr/MinimalSchemaTest.java b/solr/core/src/test/org/apache/solr/MinimalSchemaTest.java
index a0bbd490f5f..3366bc02fe1 100644
--- a/solr/core/src/test/org/apache/solr/MinimalSchemaTest.java
+++ b/solr/core/src/test/org/apache/solr/MinimalSchemaTest.java
@@ -21,7 +21,7 @@ import org.apache.solr.common.params.CommonParams;
import org.junit.BeforeClass;
import org.junit.Test;
-/** A test of basic features using the minial legal solr schema. */
+/** A test of basic features using the minimal viable solr schema. */
public class MinimalSchemaTest extends SolrTestCaseJ4 {
/**
* NOTE: we explicitly use the general 'solrconfig.xml' file here, in an attempt to test as many
diff --git a/solr/core/src/test/org/apache/solr/SampleTest.java b/solr/core/src/test/org/apache/solr/SampleTest.java
index e542d02868a..f643834ead7 100644
--- a/solr/core/src/test/org/apache/solr/SampleTest.java
+++ b/solr/core/src/test/org/apache/solr/SampleTest.java
@@ -36,7 +36,7 @@ public class SampleTest extends SolrTestCaseJ4 {
initCore("solr/crazy-path-to-config.xml", "solr/crazy-path-to-schema.xml");
}
- /** Demonstration of some of the simple ways to use the base class */
+ /** Demonstration of some simple ways to use the base class */
@Test
public void testSimple() {
lrf.args.put(CommonParams.VERSION, "2.2");
diff --git a/solr/core/src/test/org/apache/solr/SolrTestCaseJ4Test.java b/solr/core/src/test/org/apache/solr/SolrTestCaseJ4Test.java
index 07a375870f9..db6f32bd4ea 100644
--- a/solr/core/src/test/org/apache/solr/SolrTestCaseJ4Test.java
+++ b/solr/core/src/test/org/apache/solr/SolrTestCaseJ4Test.java
@@ -30,7 +30,7 @@ public class SolrTestCaseJ4Test extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeClass() throws Exception {
// Create a temporary directory that holds a core NOT named "collection1". Use the smallest
- // configuration sets we can so we don't copy that much junk around.
+ // configuration sets we can, so we don't copy that much junk around.
tmpSolrHome = createTempDir().toFile().getAbsolutePath();
File subHome = new File(new File(tmpSolrHome, "core0"), "conf");
diff --git a/solr/core/src/test/org/apache/solr/TestCrossCoreJoin.java b/solr/core/src/test/org/apache/solr/TestCrossCoreJoin.java
index 5db101a1a38..83f91365294 100644
--- a/solr/core/src/test/org/apache/solr/TestCrossCoreJoin.java
+++ b/solr/core/src/test/org/apache/solr/TestCrossCoreJoin.java
@@ -195,7 +195,7 @@ public class TestCrossCoreJoin extends SolrTestCaseJ4 {
assertFalse(fromCore.isClosed());
assertFalse(h.getCore().isClosed());
- // find people that develop stuff - but limit via filter query to a name of "john"
+ // find people that develop stuff - but limit via filter query to a name of "john",
// this tests filters being pushed down to queries (SOLR-3062)
assertJQ(
req(
diff --git a/solr/core/src/test/org/apache/solr/TestHighlightDedupGrouping.java b/solr/core/src/test/org/apache/solr/TestHighlightDedupGrouping.java
index 4c60ddf1d6e..fa828e51370 100644
--- a/solr/core/src/test/org/apache/solr/TestHighlightDedupGrouping.java
+++ b/solr/core/src/test/org/apache/solr/TestHighlightDedupGrouping.java
@@ -82,7 +82,7 @@ public class TestHighlightDedupGrouping extends BaseDistributedSearchTestCase {
"hl.fl",
id_s1));
- // The number of highlit documents should be the same as the de-duplicated docs
+ // The number of highlighted documents should be the same as the de-duplicated docs
assertEquals(1, rsp.getHighlighting().values().size());
}
@@ -144,7 +144,8 @@ public class TestHighlightDedupGrouping extends BaseDistributedSearchTestCase {
"*",
"hl.requireFieldMatch",
"true"));
- // The number of highlit documents should be the same as the de-duplicated docs for this group
+ // The number of highlighted documents should be the same as the de-duplicated docs for this
+ // group
assertEquals(docsInGroup[group], rsp.getHighlighting().values().size());
}
}
diff --git a/solr/core/src/test/org/apache/solr/TestRandomDVFaceting.java b/solr/core/src/test/org/apache/solr/TestRandomDVFaceting.java
index c95db2c5f2e..2b66a4488d3 100644
--- a/solr/core/src/test/org/apache/solr/TestRandomDVFaceting.java
+++ b/solr/core/src/test/org/apache/solr/TestRandomDVFaceting.java
@@ -49,7 +49,7 @@ public class TestRandomDVFaceting extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeTests() throws Exception {
- // This tests explicitly compares Trie DV with non-DV Trie with DV Points
+ // This tests explicitly compares Trie DV with non-DV Trie with DV Points,
// so we don't want randomized DocValues on all Trie fields
System.setProperty(NUMERIC_DOCVALUES_SYSPROP, "false");
@@ -288,7 +288,7 @@ public class TestRandomDVFaceting extends SolrTestCaseJ4 {
responses.add(strResponse);
}
- // If there is a PointField option for this test, also test it
+ // If there is a PointField option for this test, also test it.
// Don't check points if facet.mincount=0
if (h.getCore().getLatestSchema().getFieldOrNull(facet_field + "_p") != null
&& params.get("facet.mincount") != null
diff --git a/solr/core/src/test/org/apache/solr/TestRandomFaceting.java b/solr/core/src/test/org/apache/solr/TestRandomFaceting.java
index 778a8854de5..408f41c63ac 100644
--- a/solr/core/src/test/org/apache/solr/TestRandomFaceting.java
+++ b/solr/core/src/test/org/apache/solr/TestRandomFaceting.java
@@ -292,7 +292,7 @@ public class TestRandomFaceting extends SolrTestCaseJ4 {
final boolean trieField = trieFields.matcher(ftype.fname).matches();
if ((notEnum || trieField) && exists) {
assertQEx(
- "facet.exists only when enum or ommitted",
+ "facet.exists only when enum or omitted",
"facet.exists",
req(params),
ErrorCode.BAD_REQUEST);
@@ -336,7 +336,7 @@ public class TestRandomFaceting extends SolrTestCaseJ4 {
throws Exception {
if (params.getBool("facet.exists", false)) {
if (isSortByCount(params)) { // it's challenged with facet.sort=count
- // that requires to recalculate expactation
+ // that requires to recalculate expectation
expected = getExpectationForSortByCount(params, methods);
} else { // facet.sort=index
expected = capFacetCountsTo1(expected);
@@ -385,7 +385,7 @@ public class TestRandomFaceting extends SolrTestCaseJ4 {
Object label = iterator.next();
Long count = (Long) iterator.next();
final Integer strata;
- if (label == null) { // missing (here "stratas" seems like overengineering )
+ if (label == null) { // missing (here "stratas" seems like over engineering )
strata = null;
} else {
if (count > 0) {
diff --git a/solr/core/src/test/org/apache/solr/TestSolrCoreProperties.java b/solr/core/src/test/org/apache/solr/TestSolrCoreProperties.java
index 6c65ad293f3..c84297d8396 100644
--- a/solr/core/src/test/org/apache/solr/TestSolrCoreProperties.java
+++ b/solr/core/src/test/org/apache/solr/TestSolrCoreProperties.java
@@ -58,7 +58,7 @@ public class TestSolrCoreProperties extends SolrJettyTestBase {
String src_dir = TEST_HOME() + "/collection1/conf";
FileUtils.copyFile(new File(src_dir, "schema-tiny.xml"), new File(confDir, "schema.xml"));
FileUtils.copyFile(
- new File(src_dir, "solrconfig-solcoreproperties.xml"), new File(confDir, "solrconfig.xml"));
+ new File(src_dir, "solrconfig-coreproperties.xml"), new File(confDir, "solrconfig.xml"));
FileUtils.copyFile(
new File(src_dir, "solrconfig.snippet.randomindexconfig.xml"),
new File(confDir, "solrconfig.snippet.randomindexconfig.xml"));
diff --git a/solr/core/src/test/org/apache/solr/client/solrj/embedded/TestEmbeddedSolrServerSchemaAPI.java b/solr/core/src/test/org/apache/solr/client/solrj/embedded/TestEmbeddedSolrServerSchemaAPI.java
index 5eee81ee6c0..c07d5f58602 100644
--- a/solr/core/src/test/org/apache/solr/client/solrj/embedded/TestEmbeddedSolrServerSchemaAPI.java
+++ b/solr/core/src/test/org/apache/solr/client/solrj/embedded/TestEmbeddedSolrServerSchemaAPI.java
@@ -55,7 +55,7 @@ public class TestEmbeddedSolrServerSchemaAPI extends SolrTestCaseJ4 {
Path coreDir = tmpHome.resolve(DEFAULT_TEST_CORENAME);
copyMinConf(coreDir.toFile(), null, "solrconfig-managed-schema.xml");
initCore(
- "solrconfig.xml" /*it's renamed to to*/, "schema.xml", tmpHome.toAbsolutePath().toString());
+ "solrconfig.xml" /*it's renamed to*/, "schema.xml", tmpHome.toAbsolutePath().toString());
server = new EmbeddedSolrServer(h.getCoreContainer(), DEFAULT_TEST_CORENAME);
}
@@ -78,7 +78,7 @@ public class TestEmbeddedSolrServerSchemaAPI extends SolrTestCaseJ4 {
@Test
public void testSchemaAddFieldAndVerifyExistence() throws Exception {
- assumeTrue("it needs to ammend schema", Boolean.getBoolean("managed.schema.mutable"));
+ assumeTrue("it needs to amend schema", Boolean.getBoolean("managed.schema.mutable"));
SchemaResponse.UpdateResponse addFieldResponse =
new SchemaRequest.AddField(fieldAttributes).process(server);
diff --git a/solr/core/src/test/org/apache/solr/client/solrj/impl/ConnectionReuseTest.java b/solr/core/src/test/org/apache/solr/client/solrj/impl/ConnectionReuseTest.java
index 8431686401f..44639f522cb 100644
--- a/solr/core/src/test/org/apache/solr/client/solrj/impl/ConnectionReuseTest.java
+++ b/solr/core/src/test/org/apache/solr/client/solrj/impl/ConnectionReuseTest.java
@@ -76,7 +76,7 @@ public class ConnectionReuseTest extends SolrCloudTestCase {
private SolrClient buildClient(CloseableHttpClient httpClient, URL url) {
switch (random().nextInt(3)) {
case 0:
- // currently only testing with 1 thread
+ // currently, only testing with 1 thread
return getConcurrentUpdateSolrClient(url.toString() + "/" + COLLECTION, httpClient, 6, 1);
case 1:
return getHttpSolrClient(url.toString() + "/" + COLLECTION, httpClient);
@@ -158,7 +158,7 @@ public class ConnectionReuseTest extends SolrCloudTestCase {
+ client.getClass().getSimpleName(),
metrics);
- // we try and make sure the connection we get has handled all of the requests in this test
+ // we try and make sure the connection we get has handled all the requests in this test
if (client instanceof ConcurrentUpdateSolrClient) {
// we can't fully control queue polling breaking up requests - allow a bit of leeway
int exp = cnt1 + queueBreaks + 2;
diff --git a/solr/core/src/test/org/apache/solr/cloud/ActionThrottleTest.java b/solr/core/src/test/org/apache/solr/cloud/ActionThrottleTest.java
index 77e2dce5d08..8c5d34505fc 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ActionThrottleTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ActionThrottleTest.java
@@ -81,10 +81,10 @@ public class ActionThrottleTest extends SolrTestCaseJ4 {
at.minimumWaitBetweenActions();
- long elaspsedTime =
+ long elapsedTime =
TimeUnit.MILLISECONDS.convert(timeSource.getTimeNs() - start, TimeUnit.NANOSECONDS);
- assertTrue(elaspsedTime + "ms", elaspsedTime >= 995);
+ assertTrue(elapsedTime + "ms", elapsedTime >= 995);
start = timeSource.getTimeNs();
@@ -93,10 +93,10 @@ public class ActionThrottleTest extends SolrTestCaseJ4 {
Thread.sleep(random().nextInt(1000));
- elaspsedTime =
+ elapsedTime =
TimeUnit.MILLISECONDS.convert(timeSource.getTimeNs() - start, TimeUnit.NANOSECONDS);
- assertTrue(elaspsedTime + "ms", elaspsedTime >= 995);
+ assertTrue(elapsedTime + "ms", elapsedTime >= 995);
}
@Test
@@ -111,10 +111,10 @@ public class ActionThrottleTest extends SolrTestCaseJ4 {
at.minimumWaitBetweenActions();
- long elaspsedTime =
+ long elapsedTime =
TimeUnit.MILLISECONDS.convert(timeSource.getTimeNs() - start, TimeUnit.NANOSECONDS);
- assertTrue(elaspsedTime + "ms", elaspsedTime >= 995);
+ assertTrue(elapsedTime + "ms", elapsedTime >= 995);
}
public void testCreateNewThrottleWithLastValue() {
diff --git a/solr/core/src/test/org/apache/solr/cloud/AddReplicaTest.java b/solr/core/src/test/org/apache/solr/cloud/AddReplicaTest.java
index b6280917b06..a5ab5ec024b 100644
--- a/solr/core/src/test/org/apache/solr/cloud/AddReplicaTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/AddReplicaTest.java
@@ -104,7 +104,7 @@ public class AddReplicaTest extends SolrCloudTestCase {
.setCreateNodeSet(String.join(",", createNodeSet));
status = addReplica.processAndWait(collection + "_xyz1", cloudClient, 120);
assertEquals(COMPLETED, status);
- waitForState("Timedout wait for collection to be created", collection, clusterShape(1, 9));
+ waitForState("Timed out wait for collection to be created", collection, clusterShape(1, 9));
docCollection = cloudClient.getClusterState().getCollectionOrNull(collection);
assertNotNull(docCollection);
// sanity check that everything is as before
diff --git a/solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java b/solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java
index 68c35fc81b4..5b0e05bf635 100644
--- a/solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java
@@ -164,7 +164,7 @@ public class AliasIntegrationTest extends SolrCloudTestCase {
assertTrue(meta.containsKey("foobar"));
assertEquals("bazbam", meta.get("foobar"));
- // removal of non existent key should succeed.
+ // removal of non-existent key should succeed.
aliasesManager.applyModificationAndExportToZk(
a2 -> a2.cloneWithCollectionAliasProperties("meta1", "foo", null));
@@ -312,16 +312,16 @@ public class AliasIntegrationTest extends SolrCloudTestCase {
final SolrCloudManager cloudManager =
cluster.getRandomJetty(random()).getCoreContainer().getZkController().getSolrCloudManager();
- // allthough the purpose of this test is to verify that the ClusterStateProvider API
+ // although the purpose of this test is to verify that the ClusterStateProvider API
// works as a "black box" for inspecting alias information, we'll be doing some "grey box"
// introspection of the underlying ZKNodeVersion to first verify that alias updates have
- // propogated to our randomly selected node before making assertions against the
+ // propagated to our randomly selected node before making assertions against the
// ClusterStateProvider API...
//
// establish a baseline version for future waitForAliasesUpdate calls
int lastVersion = waitForAliasesUpdate(-1, cloudManager.getClusterStateProvider());
- // create the alias and wait for it to propogate
+ // create the alias and wait for it to propagate
createColectionsAndAlias(aliasName);
lastVersion = waitForAliasesUpdate(-1, cloudManager.getClusterStateProvider());
@@ -373,7 +373,7 @@ public class AliasIntegrationTest extends SolrCloudTestCase {
/**
* Does a "grey box" assertion that the ClusterStateProvider is a ZkClientClusterStateProvider and
- * then waits for it's underlying ZkStateReader to see the updated aliases, returning the current
+ * then waits for its underlying ZkStateReader to see the updated aliases, returning the current
* ZNodeVersion for the aliases
*/
private int waitForAliasesUpdate(int lastVersion, ClusterStateProvider stateProvider)
@@ -410,7 +410,7 @@ public class AliasIntegrationTest extends SolrCloudTestCase {
}
private void checkFooAndBarMeta(String aliasName, ZkStateReader zkStateReader) throws Exception {
- zkStateReader.aliasesManager.update(); // ensure our view is up to date
+ zkStateReader.aliasesManager.update(); // ensure our view is up-to-date
Map<String, String> meta = zkStateReader.getAliases().getCollectionAliasProperties(aliasName);
assertNotNull(meta);
assertTrue(meta.containsKey("foo"));
@@ -546,13 +546,13 @@ public class AliasIntegrationTest extends SolrCloudTestCase {
.processAndWait(cluster.getSolrClient(), 60);
assertEquals("Should have failed to delete collection: ", delResp, RequestStatusState.FAILED);
- // assure ourselves that the old colletion is, indeed, still there.
+ // assure ourselves that the old collection is, indeed, still there.
assertNotNull(
"collection_old should exist!",
cluster.getSolrClient().getClusterState().getCollectionOrNull("collection_old"));
// Now we should still succeed using the alias collection_old which points to collection_new
- // aliase: collection_old -> collection_new, collection_old_reserve -> collection_old ->
+ // alias: collection_old -> collection_new, collection_old_reserve -> collection_old ->
// collection_new
// collections: collection_old, collection_new
res = cluster.getSolrClient().query("collection_old", new SolrQuery("*:*"));
diff --git a/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyShardSplitTest.java b/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyShardSplitTest.java
index 2febbc6a0aa..063ff77f335 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyShardSplitTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyShardSplitTest.java
@@ -164,7 +164,7 @@ public class ChaosMonkeyShardSplitTest extends ShardSplitTest {
checkDocCountsAndShardStates(docCounts, numReplicas, documentIds);
// todo - can't call waitForThingsToLevelOut because it looks for
- // jettys of all shards
+ // all the jetty instances of all shards
// and the new sub-shards don't have any.
waitForRecoveriesToFinish(true);
// waitForThingsToLevelOut(15);
diff --git a/solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderTest.java b/solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderTest.java
index 86d1aab1ff7..2ec2c925b37 100644
--- a/solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderTest.java
@@ -63,9 +63,9 @@ public class CloudExitableDirectoryReaderTest extends SolrCloudTestCase {
/**
* Client used for all test requests.
*
- * <p>LBSolrClient (and by extension CloudSolrClient) has it's own enforcement of timeAllowed in
- * an attempt to prevent "retrying" failed requests far longer then the client requested. Because
- * of this client side logic, we do not want to use any LBSolrClient (derivative) in this test, in
+ * <p>LBSolrClient (and by extension CloudSolrClient) has its own enforcement of timeAllowed in an
+ * attempt to prevent "retrying" failed requests far longer then the client requested. Because of
+ * this client side logic, we do not want to use any LBSolrClient (derivative) in this test, in
* order to ensure that on a "slow" machine, the client doesn't pre-emptively abort any of our
* requests that use very low 'timeAllowed' values.
*
@@ -75,7 +75,7 @@ public class CloudExitableDirectoryReaderTest extends SolrCloudTestCase {
@BeforeClass
public static void setupCluster() throws Exception {
- // create one more node then shard, so that we also test the case of proxied requests.
+ // create one more node than shard, so that we also test the case of proxied requests.
MiniSolrCloudCluster.Builder clusterBuilder =
configureCluster(3)
.addConfig(
@@ -221,7 +221,7 @@ public class CloudExitableDirectoryReaderTest extends SolrCloudTestCase {
}
@Test
- public void testWhitebox() throws Exception {
+ public void testClearbox() throws Exception {
try (Trap catchIds = catchTrace(new CheckMethodName("doProcessSearchByIds"), () -> {})) {
assertPartialResults(
@@ -233,7 +233,7 @@ public class CloudExitableDirectoryReaderTest extends SolrCloudTestCase {
}
// the point is to catch sort_values (fsv) timeout, between search and facet
- // I haven't find a way to encourage fsv to read index
+ // I haven't found a way to encourage fsv to read index
try (Trap catchFSV = catchTrace(new CheckMethodName("doFieldSortValues"), () -> {})) {
assertPartialResults(
params("q", "{!cache=false}name:a*", "sort", "query($q,1) asc"),
diff --git a/solr/core/src/test/org/apache/solr/cloud/CollectionsAPISolrJTest.java b/solr/core/src/test/org/apache/solr/cloud/CollectionsAPISolrJTest.java
index df6fb233a31..ec43e2a6aae 100644
--- a/solr/core/src/test/org/apache/solr/cloud/CollectionsAPISolrJTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/CollectionsAPISolrJTest.java
@@ -1211,7 +1211,7 @@ public class CollectionsAPISolrJTest extends SolrCloudTestCase {
new CollectionAdminRequest.OverseerStatus().process(cluster.getSolrClient());
assertEquals(0, response.getStatus());
// When running with Distributed Collection API, no real data in Overseer status, but the
- // Collection API call above shouldn't fail
+ // Collection API calls above shouldn't fail
if (new CollectionAdminRequest.RequestApiDistributedProcessing()
.process(cluster.getSolrClient())
.getIsCollectionApiDistributed()) {
diff --git a/solr/core/src/test/org/apache/solr/cloud/ConcurrentCreateRoutedAliasTest.java b/solr/core/src/test/org/apache/solr/cloud/ConcurrentCreateRoutedAliasTest.java
index b811ea2073f..4fc74cb81bb 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ConcurrentCreateRoutedAliasTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ConcurrentCreateRoutedAliasTest.java
@@ -57,17 +57,19 @@ public class ConcurrentCreateRoutedAliasTest extends SolrTestCaseJ4 {
@Test
public void testConcurrentCreateRoutedAliasMinimal() {
- // this is the test where be blow out a bunch of create commands all out at once. other tests
+ // This is the test where we blow out a bunch of create commands all out at once. Other tests
// are more functionality based, and just use a single thread.
- // Failure of this test very occasionally due to overseer overload would not be worrisome (just
+ // Failure of this test occurs very occasionally due to overseer overload, and is not worrisome
+ // (just
// bothersome). Any use case creating large numbers of time routed aliases concurrently would be
// an EXTREMELY odd if not fundamentally broken use case. This test method is just here to guard
// against any race conditions in the code that could crop up rarely in lower volume usage.
- // That said any failures involving about NPE's or missing parameters or oddities other than
+ // That said any failures involving NullPointerException's or missing parameters or oddities
+ // other than
// overwhelming the overseer queue with retry races emanating from this test should be
- // investigated. Also if it fails frequently that needs to be investigated of course.
+ // investigated. Also, if it fails frequently that needs to be investigated of course.
final AtomicReference<Exception> failure = new AtomicReference<>();
@@ -78,16 +80,16 @@ public class ConcurrentCreateRoutedAliasTest extends SolrTestCaseJ4 {
// it seems to handle 50 threads about a dozen times without any failure (on a 32 thread
// processor) it also passed 3/3 at 150 threads and 2/3 with 250 threads on both 1 node and 4
// nodes... the failure mode seems to be overseer tasks that are not found. I suspect this
- // happens when enough threads get into retry races and the spam overwhelms the overseer. (that
+ // happens when enough threads get into retry races and the spam overwhelms the overseer. That
// this can happen might imply an issue over there, but I'm not sure, since there is an
- // intentional hard limit on the overseer queue and I haven't tried to count the retries up and
+ // intentional hard limit on the overseer queue, and I haven't tried to count the retries up and
// figure out if the requests are actually exceeding that limit or not, but the speed of retries
// might indicate an effectively hot loop, but again, a separate issue.
// The hope is that the level of concurrency supported by create routed alias and the code it
// uses is such that this test wouldn't spuriously fail more than once a year. If that's true
// users should never see an issue in the wild unless they are doing something we probably don't
- // want to support anyway
+ // want to support anyway.
final CreateRoutedAliasThread[] threads = new CreateRoutedAliasThread[4];
int numStart = num;
diff --git a/solr/core/src/test/org/apache/solr/cloud/ConfigSetApiLockingTest.java b/solr/core/src/test/org/apache/solr/cloud/ConfigSetApiLockingTest.java
index 1aaaabe8107..58dce5a1863 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ConfigSetApiLockingTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ConfigSetApiLockingTest.java
@@ -62,7 +62,7 @@ public class ConfigSetApiLockingTest extends SolrTestCaseJ4 {
apiLockingHelper.createConfigSetApiLock(CONFIG_SET_NAME_2, BASE_CONFIG_SET_NAME);
assertTrue("cs2Lock should have been acquired", cs2Lock.isAcquired());
- // This lock does has the same base config set, but that shouldn't prevent acquiring it
+ // This lock has the same base config set, but that shouldn't prevent acquiring it
DistributedMultiLock cs3Lock =
apiLockingHelper.createConfigSetApiLock(CONFIG_SET_NAME_3, BASE_CONFIG_SET_NAME);
assertTrue("cs3Lock should have been acquired", cs3Lock.isAcquired());
@@ -106,7 +106,7 @@ public class ConfigSetApiLockingTest extends SolrTestCaseJ4 {
new Thread(
() -> {
csBaseLock.waitUntilAcquired();
- // countDown() will not be called if waitUntilAcquired() threw exception of any kind
+ // countDown() will not be called if waitUntilAcquired() threw an exception
latch.countDown();
})
.start();
@@ -126,7 +126,7 @@ public class ConfigSetApiLockingTest extends SolrTestCaseJ4 {
cs2Lock.release();
assertTrue(
- "basec config set lock should have been acquired now that other lock was released",
+ "base config set lock should have been acquired now that other lock was released",
csBaseLock.isAcquired());
// Wait for the Zookeeper watch to fire + the thread to be unblocked and countdown the latch
diff --git a/solr/core/src/test/org/apache/solr/cloud/ConnectionManagerTest.java b/solr/core/src/test/org/apache/solr/cloud/ConnectionManagerTest.java
index 5125c88d4bd..6ca979d3c2e 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ConnectionManagerTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ConnectionManagerTest.java
@@ -124,8 +124,8 @@ public class ConnectionManagerTest extends SolrTestCaseJ4 {
try {
server.run();
- MockZkClientConnectionStrategy strat = new MockZkClientConnectionStrategy();
- SolrZkClient zkClient = new SolrZkClient(server.getZkAddress(), TIMEOUT, strat, null);
+ MockZkClientConnectionStrategy strategy = new MockZkClientConnectionStrategy();
+ SolrZkClient zkClient = new SolrZkClient(server.getZkAddress(), TIMEOUT, strategy, null);
ConnectionManager cm = zkClient.getConnectionManager();
try {
@@ -136,7 +136,7 @@ public class ConnectionManagerTest extends SolrTestCaseJ4 {
cm.process(new WatchedEvent(EventType.None, KeeperState.Expired, ""));
assertFalse(cm.isLikelyExpired());
assertTrue(cm.isConnectedAndNotClosed());
- assertTrue(strat.isExceptionThrow());
+ assertTrue(strategy.isExceptionThrow());
} finally {
cm.close();
zkClient.close();
diff --git a/solr/core/src/test/org/apache/solr/cloud/CreateRoutedAliasTest.java b/solr/core/src/test/org/apache/solr/cloud/CreateRoutedAliasTest.java
index 9a183919063..a7801eadb65 100644
--- a/solr/core/src/test/org/apache/solr/cloud/CreateRoutedAliasTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/CreateRoutedAliasTest.java
@@ -118,7 +118,7 @@ public class CreateRoutedAliasTest extends SolrCloudTestCase {
+ " },\n"
+
// TODO should we use "NOW=" param? Won't work with v2 and is kinda a hack any way
- // since intended for distrib
+ // since intended for distributed search
" \"create-collection\" : {\n"
+ " \"router\": {\n"
+ " \"name\":\"implicit\",\n"
diff --git a/solr/core/src/test/org/apache/solr/cloud/DeleteNodeTest.java b/solr/core/src/test/org/apache/solr/cloud/DeleteNodeTest.java
index 7b21875ba4b..e110c523af1 100644
--- a/solr/core/src/test/org/apache/solr/cloud/DeleteNodeTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/DeleteNodeTest.java
@@ -70,21 +70,22 @@ public class DeleteNodeTest extends SolrCloudTestCase {
create.setCreateNodeSet(StrUtils.join(l, ','));
cloudClient.request(create);
state = cloudClient.getClusterState();
- String node2bdecommissioned = l.get(0);
+ String nodeToBeDecommissioned = l.get(0);
// check what replicas are on the node, and whether the call should fail
boolean shouldFail = false;
DocCollection docColl = state.getCollection(coll);
log.info("#### DocCollection: {}", docColl);
- List<Replica> replicas = docColl.getReplicas(node2bdecommissioned);
+ List<Replica> replicas = docColl.getReplicas(nodeToBeDecommissioned);
if (replicas != null) {
for (Replica replica : replicas) {
String shard =
- docColl.getShardId(node2bdecommissioned, replica.getStr(ZkStateReader.CORE_NAME_PROP));
+ docColl.getShardId(
+ nodeToBeDecommissioned, replica.getStr(ZkStateReader.CORE_NAME_PROP));
Slice slice = docColl.getSlice(shard);
boolean hasOtherNonPullReplicas = false;
for (Replica r : slice.getReplicas()) {
if (!r.getName().equals(replica.getName())
- && !r.getNodeName().equals(node2bdecommissioned)
+ && !r.getNodeName().equals(nodeToBeDecommissioned)
&& r.getType() != Replica.Type.PULL) {
hasOtherNonPullReplicas = true;
break;
@@ -96,7 +97,7 @@ public class DeleteNodeTest extends SolrCloudTestCase {
}
}
}
- new CollectionAdminRequest.DeleteNode(node2bdecommissioned).processAsync("003", cloudClient);
+ new CollectionAdminRequest.DeleteNode(nodeToBeDecommissioned).processAsync("003", cloudClient);
CollectionAdminRequest.RequestStatus requestStatus =
CollectionAdminRequest.requestStatus("003");
CollectionAdminRequest.RequestStatusResponse rsp = null;
diff --git a/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java b/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java
index 44d4267393f..76e8be9329f 100644
--- a/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java
@@ -71,7 +71,7 @@ public class DeleteReplicaTest extends SolrCloudTestCase {
System.setProperty("solr.zkclienttimeout", "45000");
System.setProperty("distribUpdateSoTimeout", "15000");
- // these tests need to be isolated, so we dont share the minicluster
+ // these tests need to be isolated, so we don't share the minicluster
configureCluster(4)
.addConfig("conf", configset("cloud-minimal"))
.useOtherCollectionConfigSetExecution()
@@ -100,7 +100,7 @@ public class DeleteReplicaTest extends SolrCloudTestCase {
DocCollection state = getCollectionState(collectionName);
Slice shard = getRandomShard(state);
- // don't choose the leader to shutdown, it just complicates things unneccessarily
+ // don't choose the leader to shutdown, it just complicates things unnecessarily
Replica replica =
getRandomReplica(
shard, (r) -> (r.getState() == Replica.State.ACTIVE && !r.equals(shard.getLeader())));
diff --git a/solr/core/src/test/org/apache/solr/cloud/DeleteShardTest.java b/solr/core/src/test/org/apache/solr/cloud/DeleteShardTest.java
index 60964aa06fa..ed0129094d4 100644
--- a/solr/core/src/test/org/apache/solr/cloud/DeleteShardTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/DeleteShardTest.java
@@ -73,7 +73,7 @@ public class DeleteShardTest extends SolrCloudTestCase {
setSliceState(collection, "shard1", Slice.State.INACTIVE);
- // Can delete an INATIVE shard
+ // Can delete an INACTIVE shard
CollectionAdminRequest.deleteShard(collection, "shard1").process(cluster.getSolrClient());
waitForState(
"Expected 'shard1' to be removed",
diff --git a/solr/core/src/test/org/apache/solr/cloud/DistribCursorPagingTest.java b/solr/core/src/test/org/apache/solr/cloud/DistribCursorPagingTest.java
index 795dff05d1e..a53ca1b623b 100644
--- a/solr/core/src/test/org/apache/solr/cloud/DistribCursorPagingTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/DistribCursorPagingTest.java
@@ -268,7 +268,7 @@ public class DistribCursorPagingTest extends AbstractFullDistribZkTestBase {
// so here, in this test, we can't assert a hardcoded score ordering -- we trust
// the full walk testing (below)
- // int sort with dups, id tie breaker ... and some faceting
+ // int sort with duplicates, id tiebreaker ... and some faceting
cursorMark = CURSOR_MARK_START;
params =
params(
diff --git a/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java b/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java
index 182c668f11b..1b858be2638 100644
--- a/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java
@@ -209,20 +209,20 @@ public class DistribDocExpirationUpdateProcessorTest extends SolrCloudTestCase {
req.process(cluster.getSolrClient(), COLLECTION).getResults().getNumFound());
}
- // now that we've confrmed the basics work, let's check some fine grain stuff...
+ // now that we've confirmed the basics work, let's check some fine grain stuff...
- // first off, sanity check that this special docId doesn't some how already exist
+ // first off, check that this special docId doesn't somehow already exist
waitForNoResults(0, params("q", "id:special99", "rows", "0", "_trace", "sanity_check99"));
{
// force a hard commit on all shards (the prior auto-expire would have only done a soft
- // commit) so we can ensure our indexVersion won't change uncessisarily on the un-affected
+ // commit) so we can ensure our indexVersion won't change unnecessarily on the un-affected
// shard when we add & (hard) commit our special doc...
final UpdateRequest req = setAuthIfNeeded(new UpdateRequest());
req.commit(cluster.getSolrClient(), COLLECTION);
}
- // record important data for each replica core so we can check later that it only changes for
+ // record important data for each replica core, so we can check later that it only changes for
// the replicas of a single shard after we add/expire a single special doc
log.info("Fetching ReplicaData BEFORE special doc addition/expiration");
final Map<String, ReplicaData> initReplicaData = getTestDataForAllReplicas();
@@ -237,8 +237,8 @@ public class DistribDocExpirationUpdateProcessorTest extends SolrCloudTestCase {
waitForNoResults(
180, params("q", "id:special99", "rows", "0", "_trace", "did_special_doc_expire_yet"));
- // now check all of the replicas to verify a few things:
- // - only the replicas of one shard changed -- no unneccessary churn on other shards
+ // now check all the replicas to verify a few things:
+ // - only the replicas of one shard changed -- no unnecessary churn on other shards
// - every replica of each single shard should have the same number of docs
// - the total number of docs should match numDocsThatNeverExpire
log.info("Fetching ReplicaData AFTER special doc addition/expiration");
diff --git a/solr/core/src/test/org/apache/solr/cloud/DistributedApiAsyncTrackerTest.java b/solr/core/src/test/org/apache/solr/cloud/DistributedApiAsyncTrackerTest.java
index 63a23af304b..c46d733b4c6 100644
--- a/solr/core/src/test/org/apache/solr/cloud/DistributedApiAsyncTrackerTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/DistributedApiAsyncTrackerTest.java
@@ -100,12 +100,12 @@ public class DistributedApiAsyncTrackerTest extends SolrTestCaseJ4 {
DistributedApiAsyncTracker permanentDaat2 =
new DistributedApiAsyncTracker(zkClient, TRACKER_ROOT);
- final String asycPermanent = "permanentAsync";
+ final String asyncPermanent = "permanentAsync";
final String asyncTransient = "transientAsync";
assertTrue(
- "Could not create async task " + asycPermanent,
- permanentDaat.createNewAsyncJobTracker(asycPermanent));
+ "Could not create async task " + asyncPermanent,
+ permanentDaat.createNewAsyncJobTracker(asyncPermanent));
try (SolrZkClient transientZkClient =
new SolrZkClient(zkServer.getZkHost(), AbstractZkTestCase.TIMEOUT)) {
@@ -116,17 +116,17 @@ public class DistributedApiAsyncTrackerTest extends SolrTestCaseJ4 {
transientDaat.createNewAsyncJobTracker(asyncTransient));
assertEquals(
- "permanentDaat can't see " + asycPermanent,
+ "permanentDaat can't see " + asyncPermanent,
RequestStatusState.SUBMITTED,
- permanentDaat.getAsyncTaskRequestStatus(asycPermanent).first());
+ permanentDaat.getAsyncTaskRequestStatus(asyncPermanent).first());
assertEquals(
- "permanentDaat2 can't see " + asycPermanent,
+ "permanentDaat2 can't see " + asyncPermanent,
RequestStatusState.SUBMITTED,
- permanentDaat2.getAsyncTaskRequestStatus(asycPermanent).first());
+ permanentDaat2.getAsyncTaskRequestStatus(asyncPermanent).first());
assertEquals(
- "transientDaat can't see " + asycPermanent,
+ "transientDaat can't see " + asyncPermanent,
RequestStatusState.SUBMITTED,
- transientDaat.getAsyncTaskRequestStatus(asycPermanent).first());
+ transientDaat.getAsyncTaskRequestStatus(asyncPermanent).first());
assertEquals(
"permanentDaat can't see " + asyncTransient,
RequestStatusState.SUBMITTED,
@@ -141,15 +141,15 @@ public class DistributedApiAsyncTrackerTest extends SolrTestCaseJ4 {
transientDaat.getAsyncTaskRequestStatus(asyncTransient).first());
}
- // transientDaat connection closed, doesn't change a thing for asycPermanent...
+ // transientDaat connection closed, doesn't change a thing for asyncPermanent...
assertEquals(
- "permanentDaat can't see " + asycPermanent,
+ "permanentDaat can't see " + asyncPermanent,
RequestStatusState.SUBMITTED,
- permanentDaat.getAsyncTaskRequestStatus(asycPermanent).first());
+ permanentDaat.getAsyncTaskRequestStatus(asyncPermanent).first());
assertEquals(
- "permanentDaat2 can't see " + asycPermanent,
+ "permanentDaat2 can't see " + asyncPermanent,
RequestStatusState.SUBMITTED,
- permanentDaat2.getAsyncTaskRequestStatus(asycPermanent).first());
+ permanentDaat2.getAsyncTaskRequestStatus(asyncPermanent).first());
// ...but asyncTransient is now failed.
assertEquals(
diff --git a/solr/core/src/test/org/apache/solr/cloud/DistributedVersionInfoTest.java b/solr/core/src/test/org/apache/solr/cloud/DistributedVersionInfoTest.java
index 701b516d212..a2d6fe7395b 100644
--- a/solr/core/src/test/org/apache/solr/cloud/DistributedVersionInfoTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/DistributedVersionInfoTest.java
@@ -88,7 +88,7 @@ public class DistributedVersionInfoTest extends SolrCloudTestCase {
final Replica leader = stateReader.getLeaderRetry(COLLECTION, shardId);
- // start by reloading the empty collection so we try to calculate the max from an empty index
+ // start by reloading the empty collection, so we try to calculate the max from an empty index
reloadCollection(leader, COLLECTION);
sendDoc(1);
@@ -358,7 +358,7 @@ public class DistributedVersionInfoTest extends SolrCloudTestCase {
/**
* Query the real-time get handler for a specific doc by ID to verify it exists in the provided
- * server, using distrib=false so it doesn't route to another replica.
+ * server, using distrib=false, so it doesn't route to another replica.
*/
protected Long assertDocExists(HttpSolrClient solr, String coll, String docId, Long expVers)
throws Exception {
diff --git a/solr/core/src/test/org/apache/solr/cloud/DocValuesNotIndexedTest.java b/solr/core/src/test/org/apache/solr/cloud/DocValuesNotIndexedTest.java
index 6e6b204233e..388f052c002 100644
--- a/solr/core/src/test/org/apache/solr/cloud/DocValuesNotIndexedTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/DocValuesNotIndexedTest.java
@@ -193,7 +193,7 @@ public class DocValuesNotIndexedTest extends SolrCloudTestCase {
@Test
public void testDistribFaceting() throws IOException, SolrServerException {
- // For this test, I want to insure that there are shards that do _not_ have a doc with any of
+ // For this test, I want to ensure that there are shards that do _not_ have a doc with any of
// the DV_only fields, see SOLR-5260. So I'll add exactly 1 document to a 4 shard collection.
CloudSolrClient client = cluster.getSolrClient();
@@ -368,7 +368,7 @@ public class DocValuesNotIndexedTest extends SolrCloudTestCase {
SolrInputDocument doc = new SolrInputDocument();
doc.addField("id", idx);
- // Every 7th doc we bump a counter by some random amount
+ // Every 7th doc we bump a counter by a random amount
for (FieldProps prop : fieldProps) {
doc.addField(prop.getName(), prop.getValue((idx % 7) == 0));
}
@@ -460,7 +460,7 @@ public class DocValuesNotIndexedTest extends SolrCloudTestCase {
7,
sevenCount);
assertEquals(
- "Should be no gropus with 24 or 25 entries for field " + prop.getName(), 0, boolCount);
+ "Should be no groups with 24 or 25 entries for field " + prop.getName(), 0, boolCount);
}
}
}
@@ -555,7 +555,7 @@ class FieldProps {
long lng = random().nextLong();
base = lng == Long.MIN_VALUE ? 0 : Math.abs(lng) / 2;
} else if (name.startsWith("bool")) {
- base = true; // Must start with a known value since bools only have a two values....
+ base = true; // Must start with a known value since booleans only have two values....
} else if (name.startsWith("string") || name.startsWith("sortable")) {
base = "base_string_" + random().nextInt(1_000_000) + "_";
} else {
diff --git a/solr/core/src/test/org/apache/solr/cloud/ForceLeaderTest.java b/solr/core/src/test/org/apache/solr/cloud/ForceLeaderTest.java
index ae3e50ac6fe..f623bccbb11 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ForceLeaderTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ForceLeaderTest.java
@@ -43,7 +43,7 @@ import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-@Nightly // this test is currently too slow for non nightly
+@Nightly // this test is currently too slow for non-nightly
public class ForceLeaderTest extends HttpPartitionTest {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
diff --git a/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java b/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java
index 72dd88c3fc8..27d0cbfe639 100644
--- a/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java
@@ -234,7 +234,7 @@ public class FullSolrCloudDistribCmdsTest extends SolrCloudTestCase {
{ // Send a delete request to core hosting shard1 with NO route param for a document that is
// actually in shard2. Shouldn't delete, since deleteById requests are not broadcast to all
- // shard leaders. (This is effictively a request to delete "5" if an only if it is on
+ // shard leaders. (This is effectively a request to delete "5" if and only if it is on
// shard1)
final UpdateRequest deleteRequest = new UpdateRequest();
deleteRequest.deleteById("5");
@@ -373,7 +373,7 @@ public class FullSolrCloudDistribCmdsTest extends SolrCloudTestCase {
final String collectionName = "test_collection_" + NAME_COUNTER.getAndIncrement();
cloudClient.setDefaultCollection(collectionName);
- // get a random node for use in our collection before creating the one we'll partition..
+ // get a random node for use in our collection before creating the one we'll partition
final JettySolrRunner otherLeader = cluster.getRandomJetty(random());
// pick a (second) random node (which may be the same) for sending updates to
// (if it's the same, we're testing routing from another shard, if diff we're testing routing
@@ -441,7 +441,7 @@ public class FullSolrCloudDistribCmdsTest extends SolrCloudTestCase {
}
log.info("Closing leaderToPartition's proxy: {}", proxy);
- proxy.close(); // NOTE: can't use halfClose, won't ensure a garunteed failure
+ proxy.close(); // NOTE: can't use halfClose, won't ensure a guaranteed failure
final SolrException e =
expectThrows(
@@ -462,7 +462,7 @@ public class FullSolrCloudDistribCmdsTest extends SolrCloudTestCase {
i,
"text_t",
TestUtil.randomRealisticUnicodeString(random(), 200)));
- // if the update didn't throw an exception, it better be a success..
+ // if the update didn't throw an exception, it better be a success
assertEquals(0, rsp.getStatus());
}
});
@@ -477,7 +477,7 @@ public class FullSolrCloudDistribCmdsTest extends SolrCloudTestCase {
}
}
- /** NOTE: uses the cluster's CloudSolrClient and asumes default collection has been set */
+ /** NOTE: uses the cluster's CloudSolrClient and assumes default collection has been set */
private void addTwoDocsInOneRequest(String docIdA, String docIdB) throws Exception {
final CloudSolrClient cloudClient = cluster.getSolrClient();
@@ -494,7 +494,7 @@ public class FullSolrCloudDistribCmdsTest extends SolrCloudTestCase {
checkShardConsistency(params("q", "*:*", "rows", "99", "_trace", "two_docs"));
}
- /** NOTE: uses the cluster's CloudSolrClient and asumes default collection has been set */
+ /** NOTE: uses the cluster's CloudSolrClient and assumes default collection has been set */
private void addUpdateDelete(String docId) throws Exception {
final CloudSolrClient cloudClient = cluster.getSolrClient();
@@ -518,7 +518,7 @@ public class FullSolrCloudDistribCmdsTest extends SolrCloudTestCase {
assertEquals(0, cloudClient.add(sdoc("id", docId, "content_t", "updatedcontent")).getStatus());
assertEquals(0, cloudClient.commit().getStatus());
- // confirm we can query the doc by updated content and not original...
+ // confirm we can query the doc by updated content and not original
assertEquals(
0, cloudClient.query(params("q", "content_t:originalcontent")).getResults().getNumFound());
assertEquals(
@@ -530,7 +530,7 @@ public class FullSolrCloudDistribCmdsTest extends SolrCloudTestCase {
.getResults()
.getNumFound());
- // delete the doc, confim it no longer matches in queries...
+ // delete the doc, confirm it no longer matches in queries
assertEquals(0, cloudClient.deleteById(docId).getStatus());
assertEquals(0, cloudClient.commit().getStatus());
@@ -575,15 +575,15 @@ public class FullSolrCloudDistribCmdsTest extends SolrCloudTestCase {
assertEquals(
topDocsNum, cloudClient.query(new SolrQuery("type_s:parent")).getResults().getNumFound());
- // childs
+ // children
assertEquals(
topDocsNum * childsNum,
cloudClient.query(new SolrQuery("type_s:child")).getResults().getNumFound());
- // grandchilds
+ // grandchildren
//
- // each topDoc has t childs where each child has x = 0 + 2 + 4 + ..(t-1)*2 grands
- // x = 2 * (1 + 2 + 3 +.. (t-1)) => arithmetic summ of t-1
+ // each topDoc has t children where each child has x = 0 + 2 + 4 + ..(t-1)*2 grandchildren
+ // x = 2 * (1 + 2 + 3 +.. (t-1)) => arithmetic sum of t-1
// x = 2 * ((t-1) * t / 2) = t * (t - 1)
assertEquals(
topDocsNum * childsNum * (childsNum - 1),
@@ -728,7 +728,7 @@ public class FullSolrCloudDistribCmdsTest extends SolrCloudTestCase {
/**
* Inspects the cluster to determine all active shards/replicas for the default collection then,
* executes a <code>distrib=false</code> query using the specified params, and compares the
- * resulting {@link SolrDocumentList}, failing if any replica does not agree with it's leader.
+ * resulting {@link SolrDocumentList}, failing if any replica does not agree with its leader.
*
* @see #cluster
* @see CloudInspectUtil#showDiff
diff --git a/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java b/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java
index 1a1a8c2b1f3..e72ec90710b 100644
--- a/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java
@@ -595,7 +595,7 @@ public class HttpPartitionTest extends AbstractFullDistribZkTestBase {
/**
* Query the real-time get handler for a specific doc by ID to verify it exists in the provided
- * server, using distrib=false so it doesn't route to another replica.
+ * server, using distrib=false, so it doesn't route to another replica.
*/
protected void assertDocExists(HttpSolrClient solr, String coll, String docId) throws Exception {
NamedList<?> rsp = realTimeGetDocId(solr, docId);
diff --git a/solr/core/src/test/org/apache/solr/cloud/LeaderFailureAfterFreshStartTest.java b/solr/core/src/test/org/apache/solr/cloud/LeaderFailureAfterFreshStartTest.java
index 479e40a0102..92c49e684c7 100644
--- a/solr/core/src/test/org/apache/solr/cloud/LeaderFailureAfterFreshStartTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/LeaderFailureAfterFreshStartTest.java
@@ -110,7 +110,7 @@ public class LeaderFailureAfterFreshStartTest extends AbstractFullDistribZkTestB
initialLeaderJetty.url);
for (CloudJettyRunner cloudJettyRunner : otherJetties) {
log.info(
- "Nonleader node_name: {}, url: {}",
+ "Non-leader node_name: {}, url: {}",
cloudJettyRunner.coreNodeName,
cloudJettyRunner.url);
}
diff --git a/solr/core/src/test/org/apache/solr/cloud/LeaderVoteWaitTimeoutTest.java b/solr/core/src/test/org/apache/solr/cloud/LeaderVoteWaitTimeoutTest.java
index 1649dc29d6b..7d8445a902e 100644
--- a/solr/core/src/test/org/apache/solr/cloud/LeaderVoteWaitTimeoutTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/LeaderVoteWaitTimeoutTest.java
@@ -261,7 +261,8 @@ public class LeaderVoteWaitTimeoutTest extends SolrCloudTestCase {
cluster.waitForJettyToStop(j);
try {
- // even replica2 joined election at the end of the queue, but it is the one with highest term
+ // even replica2 joined election at the end of the queue, but it is the one with the highest
+ // term
waitForState(
"Timeout waiting for new leader",
collectionName,
diff --git a/solr/core/src/test/org/apache/solr/cloud/MultiThreadedOCPTest.java b/solr/core/src/test/org/apache/solr/cloud/MultiThreadedOCPTest.java
index 4c386c2a429..ea55fb02063 100644
--- a/solr/core/src/test/org/apache/solr/cloud/MultiThreadedOCPTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/MultiThreadedOCPTest.java
@@ -79,7 +79,7 @@ public class MultiThreadedOCPTest extends AbstractFullDistribZkTestBase {
assertNotNull(
"Queue did not process first two tasks on A_COLL, can't run test", task1CollA);
- // Make sure the long running task did not finish, otherwise no way the B_COLL task can be
+ // Make sure the long-running task did not finish, otherwise no way the B_COLL task can be
// tested to run in parallel with it
assumeTrue(
"Long running task finished too early, can't test",
@@ -93,12 +93,12 @@ public class MultiThreadedOCPTest extends AbstractFullDistribZkTestBase {
mockTask.setSleep("1");
mockTask.processAsync("200", client);
- // We now check that either the B_COLL task has completed before the third (long running)
+ // We now check that either the B_COLL task has completed before the third (long-running)
// task on A_COLL, or if both have completed (if this check got significantly delayed for
// some reason), we verify B_COLL was first.
Long taskCollB = waitForTaskToCompleted(client, 200);
- // We do not wait for the long running task to finish, that would be a waste of time.
+ // We do not wait for the long-running task to finish, that would be a waste of time.
Long task2CollA = checkTaskHasCompleted(client, 2);
// Given the wait delay (500 iterations of 100ms), the task has plenty of time to complete,
diff --git a/solr/core/src/test/org/apache/solr/cloud/OutOfBoxZkACLAndCredentialsProvidersTest.java b/solr/core/src/test/org/apache/solr/cloud/OutOfBoxZkACLAndCredentialsProvidersTest.java
index 0a4ebf0c2a3..817d33bb936 100644
--- a/solr/core/src/test/org/apache/solr/cloud/OutOfBoxZkACLAndCredentialsProvidersTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/OutOfBoxZkACLAndCredentialsProvidersTest.java
@@ -142,7 +142,7 @@ public class OutOfBoxZkACLAndCredentialsProvidersTest extends SolrTestCaseJ4 {
// Treat this node specially, from the ZK docs:
// The dynamic configuration is stored in a special znode ZooDefs.CONFIG_NODE =
// /zookeeper/config.
- // This node by default is read only for all users, except super user and
+ // This node by default is read only for all users, except superuser and
// users that's explicitly configured for write access.
assertEquals(
"Path " + path + " does not have READ_ACL_UNSAFE", ZooDefs.Ids.READ_ACL_UNSAFE, acls);
diff --git a/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionConfigSetProcessorTest.java b/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionConfigSetProcessorTest.java
index 488386a4a19..e9beee6f2ad 100644
--- a/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionConfigSetProcessorTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionConfigSetProcessorTest.java
@@ -924,7 +924,7 @@ public class OverseerCollectionConfigSetProcessorTest extends SolrTestCaseJ4 {
+ numberOfNodes,
numberOfNodes.intValue() >= numberOfNodesToCreateOn.intValue());
assertTrue(
- "Wrong usage of testTemplage. createNodeListOption has to be "
+ "Wrong usage of testTemplate. createNodeListOption has to be "
+ CreateNodeListOptions.SEND
+ " when numberOfNodes and numberOfNodesToCreateOn are unequal",
((createNodeListOption == CreateNodeListOptions.SEND)
diff --git a/solr/core/src/test/org/apache/solr/cloud/OverseerSolrResponseUnsafeSerializationTest.java b/solr/core/src/test/org/apache/solr/cloud/OverseerSolrResponseUnsafeSerializationTest.java
index 73cba282ee3..c635100b7ca 100644
--- a/solr/core/src/test/org/apache/solr/cloud/OverseerSolrResponseUnsafeSerializationTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/OverseerSolrResponseUnsafeSerializationTest.java
@@ -31,7 +31,7 @@ public class OverseerSolrResponseUnsafeSerializationTest extends OverseerSolrRes
System.clearProperty("solr.useUnsafeOverseerResponse");
}
- public void testUnsafeSerializartionToggles() {
+ public void testUnsafeSerializationToggles() {
assertToggles("true", true, true);
assertToggles("deserialization", false, true);
assertToggles(null, false, false); // By default, don't use unsafe
diff --git a/solr/core/src/test/org/apache/solr/cloud/OverseerStatusTest.java b/solr/core/src/test/org/apache/solr/cloud/OverseerStatusTest.java
index 40d57eda3ee..947dd8e6310 100644
--- a/solr/core/src/test/org/apache/solr/cloud/OverseerStatusTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/OverseerStatusTest.java
@@ -65,6 +65,7 @@ public class OverseerStatusTest extends SolrCloudTestCase {
// stats on them.
if (!cluster.getOpenOverseer().getDistributedClusterStateUpdater().isDistributedStateUpdate()) {
// Note the "create" key here is in a different map from the "create" key above. Above it's
+ // from the
// Collection creation in the Collection API, here it's the collection creation from the
// cluster state updater perspective.
createcollection =
diff --git a/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java b/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
index d06e2ae00d6..3ba7a40db5b 100644
--- a/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
@@ -189,7 +189,7 @@ public class OverseerTest extends SolrTestCaseJ4 {
* OverseerTest#createCollection(String, int)}.
*/
public void createCollection(String collection, int numShards) throws Exception {
- // Create collection znode before having ClusterStateUpdater create state.json below it or it
+ // Create collection znode before having ClusterStateUpdater create state.json below, or it
// will fail.
zkClient.makePath(ZkStateReader.COLLECTIONS_ZKNODE + "/" + collection, true);
@@ -447,7 +447,7 @@ public class OverseerTest extends SolrTestCaseJ4 {
* obtained.
*/
private void createCollection(String collection, int numShards) throws Exception {
- // Create collection znode before having ClusterStateUpdater create state.json below it or it
+ // Create collection znode before having ClusterStateUpdater create state.json below, or it
// will fail.
zkClient.makePath(ZkStateReader.COLLECTIONS_ZKNODE + "/" + collection, true);
diff --git a/solr/core/src/test/org/apache/solr/cloud/PeerSyncReplicationTest.java b/solr/core/src/test/org/apache/solr/cloud/PeerSyncReplicationTest.java
index 5ba8c729108..227b0ebf9f6 100644
--- a/solr/core/src/test/org/apache/solr/cloud/PeerSyncReplicationTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/PeerSyncReplicationTest.java
@@ -170,7 +170,7 @@ public class PeerSyncReplicationTest extends AbstractFullDistribZkTestBase {
shardToLeaderJetty.get("shard1"));
// bring up node that was down all along, and let it PeerSync from the node that was forced to
- // PeerSynce
+ // PeerSync
bringUpDeadNodeAndEnsureNoReplication(neverLeader, false);
waitTillNodesActive();
@@ -284,7 +284,7 @@ public class PeerSyncReplicationTest extends AbstractFullDistribZkTestBase {
forceNodeFailures(Arrays.asList(replicaToShutDown));
- // two docs need to be sync'd back when replica restarts
+ // two docs need to be synced back when replica restarts
indexDoc(id, docId, i1, 50, tlong, 50, t1, "document number " + docId++);
indexDoc(id, docId, i1, 50, tlong, 50, t1, "document number " + docId++);
commit();
@@ -298,7 +298,7 @@ public class PeerSyncReplicationTest extends AbstractFullDistribZkTestBase {
CloudJettyRunner nodeToBringUp, boolean disableFingerprint) throws Exception {
// disable fingerprint check if needed
System.setProperty("solr.disableFingerprint", String.valueOf(disableFingerprint));
- // we wait a little bit, so socket between leader -> replica will be timeout
+ // we wait a little while, so socket between leader -> replica will be timeout
Thread.sleep(3000);
IndexInBackGround iib = new IndexInBackGround(50, nodeToBringUp);
iib.start();
diff --git a/solr/core/src/test/org/apache/solr/cloud/ReplaceNodeTest.java b/solr/core/src/test/org/apache/solr/cloud/ReplaceNodeTest.java
index ef1a41446b7..117f2ab1d2a 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ReplaceNodeTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ReplaceNodeTest.java
@@ -84,7 +84,7 @@ public class ReplaceNodeTest extends SolrCloudTestCase {
ArrayList<String> l = new ArrayList<>(liveNodes);
Collections.shuffle(l, random());
String emptyNode = l.remove(0);
- String node2bdecommissioned = l.get(0);
+ String nodeToBeDecommissioned = l.get(0);
CollectionAdminRequest.Create create;
// NOTE: always using the createCollection that takes in 'int' for all types of replicas, so we
// never have to worry about null checking when comparing the Create command with the final
@@ -117,11 +117,11 @@ public class ReplaceNodeTest extends SolrCloudTestCase {
DocCollection collection = cloudClient.getClusterState().getCollection(coll);
log.debug("### Before decommission: {}", collection);
log.info("excluded_node : {} ", emptyNode);
- createReplaceNodeRequest(node2bdecommissioned, emptyNode, null)
+ createReplaceNodeRequest(nodeToBeDecommissioned, emptyNode, null)
.processAndWait("000", cloudClient, 15);
try (HttpSolrClient coreclient =
getHttpSolrClient(
- ZkStateReader.from(cloudClient).getBaseUrlForNodeName(node2bdecommissioned))) {
+ ZkStateReader.from(cloudClient).getBaseUrlForNodeName(nodeToBeDecommissioned))) {
CoreAdminResponse status = CoreAdminRequest.getStatus(null, coreclient);
assertEquals(0, status.getCoreStatus().size());
}
@@ -130,7 +130,7 @@ public class ReplaceNodeTest extends SolrCloudTestCase {
collection = cloudClient.getClusterState().getCollection(coll);
log.debug("### After decommission: {}", collection);
// check what are replica states on the decommissioned node
- List<Replica> replicas = collection.getReplicas(node2bdecommissioned);
+ List<Replica> replicas = collection.getReplicas(nodeToBeDecommissioned);
if (replicas == null) {
replicas = Collections.emptyList();
}
@@ -138,7 +138,7 @@ public class ReplaceNodeTest extends SolrCloudTestCase {
// let's do it back - this time wait for recoveries
CollectionAdminRequest.AsyncCollectionAdminRequest replaceNodeRequest =
- createReplaceNodeRequest(emptyNode, node2bdecommissioned, Boolean.TRUE);
+ createReplaceNodeRequest(emptyNode, nodeToBeDecommissioned, Boolean.TRUE);
replaceNodeRequest.setWaitForFinalState(true);
replaceNodeRequest.processAndWait("001", cloudClient, 10);
@@ -165,7 +165,7 @@ public class ReplaceNodeTest extends SolrCloudTestCase {
s.getReplicas(EnumSet.of(Replica.Type.PULL)).size());
}
// make sure all newly created replicas on node are active
- List<Replica> newReplicas = collection.getReplicas(node2bdecommissioned);
+ List<Replica> newReplicas = collection.getReplicas(nodeToBeDecommissioned);
replicas.forEach(r -> newReplicas.removeIf(nr -> nr.getName().equals(r.getName())));
assertFalse(newReplicas.isEmpty());
for (Replica r : newReplicas) {
@@ -235,7 +235,7 @@ public class ReplaceNodeTest extends SolrCloudTestCase {
Collections.shuffle(l, random());
List<String> emptyNodes = l.subList(0, 2);
l = l.subList(2, l.size());
- String node2bdecommissioned = l.get(0);
+ String nodeToBeDecommissioned = l.get(0);
// TODO: tlog replicas do not work correctly in tests due to fault
// TestInjection#waitForInSyncWithLeader
@@ -259,13 +259,13 @@ public class ReplaceNodeTest extends SolrCloudTestCase {
l.stream()
.map(node -> initialCollection.getReplicas(node).size())
.collect(Collectors.toList());
- createReplaceNodeRequest(node2bdecommissioned, null, true)
+ createReplaceNodeRequest(nodeToBeDecommissioned, null, true)
.processAndWait("000", cloudClient, 15);
DocCollection collection = cloudClient.getClusterState().getCollection(coll);
log.debug("### After decommission: {}", collection);
// check what are replica states on the decommissioned node
- List<Replica> replicas = collection.getReplicas(node2bdecommissioned);
+ List<Replica> replicas = collection.getReplicas(nodeToBeDecommissioned);
if (replicas == null) {
replicas = Collections.emptyList();
}
diff --git a/solr/core/src/test/org/apache/solr/cloud/ReplicationFactorTest.java b/solr/core/src/test/org/apache/solr/cloud/ReplicationFactorTest.java
index a68e58cfa4c..35e74a2da87 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ReplicationFactorTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ReplicationFactorTest.java
@@ -63,9 +63,9 @@ public class ReplicationFactorTest extends AbstractFullDistribZkTestBase {
}
/**
- * Overrides the parent implementation so that we can configure a socket proxy to sit infront of
+ * Overrides the parent implementation so that we can configure a socket proxy to sit in front of
* each Jetty server, which gives us the ability to simulate network partitions without having to
- * fuss with IPTables (which is not very cross platform friendly).
+ * fuss with IPTables (which is not very cross-platform friendly).
*/
@Override
public JettySolrRunner createJetty(
@@ -136,7 +136,8 @@ public class ReplicationFactorTest extends AbstractFullDistribZkTestBase {
sendNonDirectUpdateRequestReplicaWithRetry(leader, up, 2, testCollectionName);
sendNonDirectUpdateRequestReplicaWithRetry(replicas.get(0), up, 2, testCollectionName);
- // Insure nothing is tricky about a delete where only one shard needs to delete anything.
+ // Ensure nothing is tricky about a delete operation where only one shard needs to delete
+ // anything.
sendNonDirectDeletesRequestReplicaWithRetry(
leader, getSomeIds(1), 2, getSomeIds(1), 2, testCollectionName);
sendNonDirectDeletesRequestReplicaWithRetry(
@@ -185,7 +186,8 @@ public class ReplicationFactorTest extends AbstractFullDistribZkTestBase {
Thread.sleep(2000);
}
- // When doing a delete by id, it's tricky, very tricky. If any document we're deleting by ID goes
+ // When doing a delete by id operation, it's tricky, very tricky. If any document we're deleting
+ // by ID goes
// to shardWithOne, then the replication factor we return will be 1.
private int calcByIdRf(Set<Integer> byIDs, String testCollectionName, String shardWithOne) {
ZkController zkController = jettys.get(0).getCoreContainer().getZkController();
@@ -204,7 +206,8 @@ public class ReplicationFactorTest extends AbstractFullDistribZkTestBase {
// Get the delete tests to use disjoint documents although
int idFloor = random().nextInt(100) + 1000;
- // Randomize documents so we exercise requests landing on replicas that have (or don't) particular
+ // Randomize documents, so we exercise requests landing on replicas that have (or don't)
+ // particular
// documents. Yeah, this will go on forever if you ask for more than 100, but it suffices.
private Set<Integer> getSomeIds(int count) {
Set<Integer> ids = new HashSet<>();
@@ -330,7 +333,7 @@ public class ReplicationFactorTest extends AbstractFullDistribZkTestBase {
}
log.info("Indexing batch of documents (30-45)");
int batchRf = sendDocsWithRetry(batch, minRf, 5, 1);
- assertRf(2, "batch should have succeded, only one replica should be down", batchRf);
+ assertRf(2, "batch should have succeeded, only one replica should be down", batchRf);
log.info("Closing second proxy port");
getProxyForReplica(replicas.get(1)).close();
@@ -382,7 +385,7 @@ public class ReplicationFactorTest extends AbstractFullDistribZkTestBase {
// SOLR-13599 sanity check if problem is related to "re-closing" a port on the proxy
log.info("Indexing docId=5");
rf = sendDoc(5);
- assertRf(2, "doc should have succeded, only one replica should be down", rf);
+ assertRf(2, "doc should have succeeded, only one replica should be down", rf);
// now send a batch (again)
batch = new ArrayList<SolrInputDocument>(10);
@@ -394,7 +397,7 @@ public class ReplicationFactorTest extends AbstractFullDistribZkTestBase {
}
log.info("Indexing batch of documents (15-29)");
batchRf = sendDocsWithRetry(batch, minRf, 5, 1);
- assertRf(2, "batch should have succeded, only one replica should be down", batchRf);
+ assertRf(2, "batch should have succeeded, only one replica should be down", batchRf);
doDBQWithRetry(2, 5, "deletes should have propagated to only 1 replica", 15);
doDBIdWithRetry(2, 5, "deletes should have propagated to only 1 replica", 15);
diff --git a/solr/core/src/test/org/apache/solr/cloud/RouteFieldTest.java b/solr/core/src/test/org/apache/solr/cloud/RouteFieldTest.java
index f2693a1da7e..f30dd3ab357 100644
--- a/solr/core/src/test/org/apache/solr/cloud/RouteFieldTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/RouteFieldTest.java
@@ -91,13 +91,13 @@ public class RouteFieldTest extends SolrCloudTestCase {
.getStatus());
// We now have two collections, add the same docs to each with the proper
- // fields so the id field is used in one collection and ROUTE_FIELD in the other..
+ // fields so the id field is used in one collection and ROUTE_FIELD in the other
List<SolrInputDocument> docsRoute = new ArrayList<>();
List<SolrInputDocument> docsId = new ArrayList<>();
int lim = random().nextInt(50) + 50;
for (int idx = 0; idx < lim; ++idx) {
SolrInputDocument doc = new SolrInputDocument();
- // id should be irrelevant for routing, but we want to insure that
+ // id should be irrelevant for routing, but we want to ensure that
// if somehow we _do_ use id to route, we don't use the same ID
// as the docs we're adding to the collection routed by id.
doc.addField("id", idx + 1_500_000);
diff --git a/solr/core/src/test/org/apache/solr/cloud/SegmentTerminateEarlyTestState.java b/solr/core/src/test/org/apache/solr/cloud/SegmentTerminateEarlyTestState.java
index 04fa5069edd..b62fdd0cdd9 100644
--- a/solr/core/src/test/org/apache/solr/cloud/SegmentTerminateEarlyTestState.java
+++ b/solr/core/src/test/org/apache/solr/cloud/SegmentTerminateEarlyTestState.java
@@ -35,7 +35,7 @@ class SegmentTerminateEarlyTestState {
static final String KEY_FIELD = "id";
- // for historic reasons, this is refered to as a "timestamp" field, but in actuallity is just an
+ // for historic reasons, this is referred to as a "timestamp" field, but actually it is just an
// int value representing a number of "minutes" between 0-60.
// aka: I decided not to rename a million things while refactoring this test
public static final String TIMESTAMP_FIELD = "timestamp_i_dvo";
diff --git a/solr/core/src/test/org/apache/solr/cloud/SolrCLIZkUtilsTest.java b/solr/core/src/test/org/apache/solr/cloud/SolrCLIZkUtilsTest.java
index 62f3fd68011..648be5e9094 100644
--- a/solr/core/src/test/org/apache/solr/cloud/SolrCLIZkUtilsTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/SolrCLIZkUtilsTest.java
@@ -158,7 +158,7 @@ public class SolrCLIZkUtilsTest extends SolrCloudTestCase {
verifyZkLocalPathsMatch(
Paths.get(tmp.toAbsolutePath().toString(), "conf"), "/configs/downconfig1");
- // Insure that empty files don't become directories (SOLR-11198)
+ // Ensure that empty files don't become directories (SOLR-11198)
Path emptyFile = Paths.get(tmp.toAbsolutePath().toString(), "conf", "stopwords", "emptyfile");
Files.createFile(emptyFile);
@@ -815,7 +815,7 @@ public class SolrCLIZkUtilsTest extends SolrCloudTestCase {
assertTrue("Return should contain the conf directory", content.contains("lister"));
assertTrue("Return should contain a child node", content.contains("solrconfig.xml"));
- // Saw a case where going from root foo'd, so test it.
+ // Saw a case where going from root didn't work, so test it.
args =
new String[] {
"-path", "/",
@@ -846,7 +846,7 @@ public class SolrCLIZkUtilsTest extends SolrCloudTestCase {
assertEquals("List should have succeeded", res, 0);
assertFalse("Return should not contain /zookeeper", content.contains("/zookeeper"));
- // Saw a case where ending in slash foo'd, so test it.
+ // Saw a case where ending in slash didn't work, so test it.
args =
new String[] {
"-path", "/configs/",
@@ -992,7 +992,7 @@ public class SolrCLIZkUtilsTest extends SolrCloudTestCase {
new SimpleFileVisitor<Path>() {
void checkPathOnZk(Path path) {
String znode = ZkMaintenanceUtils.createZkNodeName(zkRoot, fileRoot, path);
- try { // It's easier to catch this exception and fail than catch it everywher eles.
+ try { // It's easier to catch this exception and fail than catch it everywhere else.
assertTrue(
"Should have found " + znode + " on Zookeeper", zkClient.exists(znode, true));
} catch (Exception e) {
@@ -1020,14 +1020,14 @@ public class SolrCLIZkUtilsTest extends SolrCloudTestCase {
});
}
- // Insure that all znodes in first are in second and vice-versa
+ // Ensure that all znodes in first are in second and vice-versa
private void verifyZnodesMatch(String first, String second)
throws KeeperException, InterruptedException {
verifyFirstZNodesInSecond(first, second);
verifyFirstZNodesInSecond(second, first);
}
- // Note, no folderol here with Windows path names.
+ // Note, no fuss here with Windows path names.
private void verifyFirstZNodesInSecond(String first, String second)
throws KeeperException, InterruptedException {
for (String node : zkClient.getChildren(first, null, true)) {
diff --git a/solr/core/src/test/org/apache/solr/cloud/SolrCloudExampleTest.java b/solr/core/src/test/org/apache/solr/cloud/SolrCloudExampleTest.java
index 9d4bea1f9c8..ea8627b3dd6 100644
--- a/solr/core/src/test/org/apache/solr/cloud/SolrCloudExampleTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/SolrCloudExampleTest.java
@@ -129,7 +129,7 @@ public class SolrCloudExampleTest extends AbstractFullDistribZkTestBase {
invalidToolExitStatus,
tool.runTool(cli));
- // now index docs like bin/post would do but we can't use SimplePostTool because it uses
+ // now index docs like bin/post would, but we can't use SimplePostTool because it uses
// System.exit when it encounters an error, which JUnit doesn't like ...
log.info("Created collection, now posting example docs!");
Path exampleDocsDir = Path.of(ExternalPaths.SOURCE_HOME, "example", "exampledocs");
@@ -293,7 +293,7 @@ public class SolrCloudExampleTest extends AbstractFullDistribZkTestBase {
assertTrue("All cores should have been reloaded within 60 seconds!!!", allGood);
}
- // Collect all of the autoSoftCommit intervals.
+ // Collect all the autoSoftCommit intervals.
private Map<String, Long> getSoftAutocommitInterval(String collection) throws Exception {
Map<String, Long> ret = new HashMap<>();
DocCollection coll = cloudClient.getClusterState().getCollection(collection);
diff --git a/solr/core/src/test/org/apache/solr/cloud/SplitShardTest.java b/solr/core/src/test/org/apache/solr/cloud/SplitShardTest.java
index 94023354f8b..0664ebf419a 100644
--- a/solr/core/src/test/org/apache/solr/cloud/SplitShardTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/SplitShardTest.java
@@ -236,7 +236,7 @@ public class SplitShardTest extends SolrCloudTestCase {
() -> {
while (doIndex.get()) {
try {
- // Thread.sleep(10); // cap indexing rate at 100 docs per second per thread
+ // Thread.sleep(10); // cap indexing rate at 100 docs per second, per thread
int currDoc = docsIndexed.incrementAndGet();
String docId = "doc_" + currDoc;
@@ -277,7 +277,7 @@ public class SplitShardTest extends SolrCloudTestCase {
2,
3 * repFactor)); // 2 repFactor for the new split shards, 1 repFactor for old replicas
- // make sure that docs were able to be indexed during the split
+ // make sure that docs were indexed during the split
assertTrue(model.size() > docCount);
Thread.sleep(100); // wait for a few more docs to be indexed after split
diff --git a/solr/core/src/test/org/apache/solr/cloud/SystemCollectionCompatTest.java b/solr/core/src/test/org/apache/solr/cloud/SystemCollectionCompatTest.java
index 4a9df21ca80..2572aeae244 100644
--- a/solr/core/src/test/org/apache/solr/cloud/SystemCollectionCompatTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/SystemCollectionCompatTest.java
@@ -119,7 +119,7 @@ public class SystemCollectionCompatTest extends SolrCloudTestCase {
CollectionAdminResponse response = reloadRequest.process(solrClient);
assertEquals(0, response.getStatus());
assertTrue(response.isSuccess());
- // wait for the reload of all replicas to complete
+ // wait for the reload operation of all replicas to complete
RetryUtil.retryUntil(
"Timed out waiting for core to reload",
30,
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestAuthenticationFramework.java b/solr/core/src/test/org/apache/solr/cloud/TestAuthenticationFramework.java
index 54847cbf16a..22fb8bdcc84 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestAuthenticationFramework.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestAuthenticationFramework.java
@@ -117,7 +117,7 @@ public class TestAuthenticationFramework extends SolrCloudTestCase {
0, client.query(collectionName, new SolrQuery("*:*")).getResults().getNumFound());
// modify/query collection
- // not everyone is up to date just because we waited to make sure one was - pause a moment
+ // not everyone is up-to-date just because we waited to make sure one was - pause a moment
Thread.sleep(100);
new UpdateRequest().add("id", "1").commit(client, collectionName);
QueryResponse rsp = client.query(collectionName, new SolrQuery("*:*"));
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestBaseStatsCacheCloud.java b/solr/core/src/test/org/apache/solr/cloud/TestBaseStatsCacheCloud.java
index 2597951803a..20e9d86267b 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestBaseStatsCacheCloud.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestBaseStatsCacheCloud.java
@@ -188,7 +188,7 @@ public abstract class TestBaseStatsCacheCloud extends SolrCloudTestCase {
break;
case "statsCacheImpl":
assertTrue(
- "incorreect cache impl, expected"
+ "incorrect cache impl, expected"
+ getImplementationName()
+ " but was "
+ value,
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestCloudConsistency.java b/solr/core/src/test/org/apache/solr/cloud/TestCloudConsistency.java
index 8a2d4d556a1..4fe3aada7bf 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestCloudConsistency.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestCloudConsistency.java
@@ -195,7 +195,7 @@ public class TestCloudConsistency extends SolrCloudTestCase {
if (newLeader != null
&& !newLeader.getName().equals(leader.getName())
&& newLeader.getState() == Replica.State.ACTIVE) {
- // this is is the bad case, our "bad" state was found before timeout
+ // this is the bad case, our "bad" state was found before timeout
log.error("WTF: New Leader={}", newLeader);
return true;
}
@@ -261,7 +261,7 @@ public class TestCloudConsistency extends SolrCloudTestCase {
if (newLeader != null
&& !newLeader.getName().equals(leader.getName())
&& newLeader.getState() == Replica.State.ACTIVE) {
- // this is is the bad case, our "bad" state was found before timeout
+ // this is the bad case, our "bad" state was found before timeout
log.error("WTF: New Leader={}", newLeader);
return true;
}
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestCloudDeleteByQuery.java b/solr/core/src/test/org/apache/solr/cloud/TestCloudDeleteByQuery.java
index d8e021327b1..2a53c3d0dd3 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestCloudDeleteByQuery.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestCloudDeleteByQuery.java
@@ -173,7 +173,7 @@ public class TestCloudDeleteByQuery extends SolrCloudTestCase {
fail("unexpected shard: " + shardName);
}
}
- assertEquals("Should be exactly one server left (nost hosting either shard)", 1, urlMap.size());
+ assertEquals("Should be exactly one server left (not hosting either shard)", 1, urlMap.size());
NO_COLLECTION_CLIENT =
getHttpSolrClient(urlMap.values().iterator().next() + "/" + COLLECTION_NAME + "/");
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestCloudPhrasesIdentificationComponent.java b/solr/core/src/test/org/apache/solr/cloud/TestCloudPhrasesIdentificationComponent.java
index 6af06e6ae77..42fcd69e7bb 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestCloudPhrasesIdentificationComponent.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestCloudPhrasesIdentificationComponent.java
@@ -102,7 +102,7 @@ public class TestCloudPhrasesIdentificationComponent extends SolrCloudTestCase {
"id", "44",
"title", "Why the LazY dog was lazy",
"body",
- "News flash: Lazy Dog was not actually lazy, it just seemd so compared to Fox"));
+ "News flash: Lazy Dog was not actually lazy, it just seemed so compared to Fox"));
CLOUD_CLIENT.add(
sdoc(
"id", "45",
@@ -128,7 +128,7 @@ public class TestCloudPhrasesIdentificationComponent extends SolrCloudTestCase {
final String expected = " did a Quick {brown FOX} perniciously jump over {the lazy dog}";
// based on the documents indexed, these assertions should all pass regardless of
- // how many shards we have, or wether the request is done via /phrases or /select...
+ // how many shards we have, or whether the request is done via /phrases or /select...
for (String path : Arrays.asList("/select", "/phrases")) {
// ... or if we muck with "q" and use the alternative phrases.q for the bits we care about...
for (SolrParams p :
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestCloudPivotFacet.java b/solr/core/src/test/org/apache/solr/cloud/TestCloudPivotFacet.java
index de768d30544..48a3064e1bd 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestCloudPivotFacet.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestCloudPivotFacet.java
@@ -71,7 +71,7 @@ public class TestCloudPivotFacet extends AbstractFullDistribZkTestBase {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
- // because floating point addition can depende on the order of operations, we ignore
+ // because floating point addition can depend on the order of operations, we ignore
// any stats that can be lossy -- the purpose of testing stats here is just to sanity check
// that the basic hooks between pivot faceting and stats.field work, and these let us do that
private static final String USE_STATS = "count=true missing=true min=true max=true";
@@ -100,7 +100,7 @@ public class TestCloudPivotFacet extends AbstractFullDistribZkTestBase {
@BeforeClass
public static void initUseFieldRandomizedFactor() {
useFieldRandomizedFactor = TestUtil.nextInt(random(), 2, 30);
- log.info("init'ing useFieldRandomizedFactor = {}", useFieldRandomizedFactor);
+ log.info("initializing useFieldRandomizedFactor = {}", useFieldRandomizedFactor);
}
@Test
@@ -222,7 +222,7 @@ public class TestCloudPivotFacet extends AbstractFullDistribZkTestBase {
pivotP.add(FACET_OVERREQUEST_COUNT, "" + TestUtil.nextInt(random(), 0, 5));
}
if (random().nextBoolean()) {
- // sometimes give a ratio less then 1, code should be smart enough to deal
+ // sometimes give a ratio less than 1, code should be smart enough to deal
float ratio = 0.5F + random().nextFloat();
// sometimes go negative
if (random().nextBoolean()) {
@@ -360,9 +360,9 @@ public class TestCloudPivotFacet extends AbstractFullDistribZkTestBase {
if (actualStats == null) {
// handle case for not found stats (using stats query)
//
- // these has to be a special case check due to the legacy behavior of "top level"
+ // This has to be a special case check due to the legacy behavior of "top level"
// StatsComponent results being "null" (and not even included in the
- // getFieldStatsInfo() Map due to specila SolrJ logic)
+ // getFieldStatsInfo() Map due to special SolrJ logic)
log.info("Requested stats missing in verification query, pivot stats: {}", pivotStats);
assertEquals("Special Count", 0L, pivotStats.getCount().longValue());
@@ -405,7 +405,7 @@ public class TestCloudPivotFacet extends AbstractFullDistribZkTestBase {
}
/**
- * Verify that the PivotFields we're lookin at doesn't violate any of the expected behaviors based
+ * Verify that the PivotFields we're looking at don't violate any of the expected behaviors based
* on the <code>TRACE_*</code> params found in the base params
*/
private void assertTraceOk(
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestCloudPseudoReturnFields.java b/solr/core/src/test/org/apache/solr/cloud/TestCloudPseudoReturnFields.java
index 8771606049e..1a5c5078782 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestCloudPseudoReturnFields.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestCloudPseudoReturnFields.java
@@ -115,7 +115,6 @@ public class TestCloudPseudoReturnFields extends SolrCloudTestCase {
.add(sdoc("id", "46", "val_i", "3", "ssto", "X", "subject", "ggg"))
.getStatus());
assertEquals(0, CLOUD_CLIENT.commit().getStatus());
- ;
}
@Before
@@ -145,7 +144,7 @@ public class TestCloudPseudoReturnFields extends SolrCloudTestCase {
public void testMultiValued() throws Exception {
// the response writers used to consult isMultiValued on the field
// but this doesn't work when you alias a single valued field to
- // a multi valued field (the field value is copied first, then
+ // a multivalued field (the field value is copied first, then
// if the type lookup is done again later, we get the wrong thing). SOLR-4036
// score as pseudo field - precondition checks
@@ -205,7 +204,7 @@ public class TestCloudPseudoReturnFields extends SolrCloudTestCase {
// returning a an List)
//
// (NOTE: not doing this yet due to how it will impact most other tests, many of which are
- // currently @AwaitsFix'ed)
+ // currently @AwaitsFix status)
//
// assertTrue(doc.getFieldValue("val_ss").getClass().toString(),
// doc.getFieldValue("val_ss") instanceof List);
@@ -303,7 +302,7 @@ public class TestCloudPseudoReturnFields extends SolrCloudTestCase {
}
public void testScoreAndAllRealFieldsRTG() throws Exception {
- // also shouldn't matter if we use RTG (committed or otherwise) .. score should be ignored
+ // shouldn't matter if we use RTG (committed or otherwise), score should be ignored
for (String fl : TestPseudoReturnFields.SCORE_AND_REAL_FIELDS) {
for (int i : Arrays.asList(42, 43, 44, 45, 46, 99)) {
SolrDocument doc = getRandClient(random()).getById("" + i, params("fl", fl));
@@ -346,7 +345,7 @@ public class TestCloudPseudoReturnFields extends SolrCloudTestCase {
SolrDocumentList docs = null;
SolrDocument doc = null;
- // shouldn't matter if we use RTG (committed or otherwise) .. score should be ignored
+ // shouldn't matter if we use RTG (committed or otherwise), score should be ignored
for (int i : Arrays.asList(42, 43, 44, 45, 46, 99)) {
for (SolrParams p :
Arrays.asList(params("fl", "score,val_i"), params("fl", "score", "fl", "val_i"))) {
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestCloudSearcherWarming.java b/solr/core/src/test/org/apache/solr/cloud/TestCloudSearcherWarming.java
index cf4bb490346..c21fd2ffa02 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestCloudSearcherWarming.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestCloudSearcherWarming.java
@@ -263,7 +263,7 @@ public class TestCloudSearcherWarming extends SolrCloudTestCase {
log.info("Starting old node 2");
cluster.startJettySolrRunner(oldNode);
waitForState("", collectionName, clusterShape(1, 2));
- // invoke statewatcher explicitly to avoid race condition where the assert happens before the
+ // invoke statewatcher explicitly to avoid race condition when the assert happens before the
// state watcher is invoked by ZkStateReader
ZkStateReader.from(solrClient).registerCollectionStateWatcher(collectionName, stateWatcher);
assertNull(
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPIZkFailure.java b/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPIZkFailure.java
index ad6c3b991fc..8d41f303c2c 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPIZkFailure.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPIZkFailure.java
@@ -63,7 +63,7 @@ import org.junit.Test;
/**
* Test the ConfigSets API under ZK failure. In particular, if create fails, ensure proper cleanup
- * occurs so we aren't left with a partially created ConfigSet.
+ * occurs, so we aren't left with a partially created ConfigSet.
*/
public class TestConfigSetsAPIZkFailure extends SolrTestCaseJ4 {
private MiniSolrCloudCluster solrCluster;
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestDistribDocBasedVersion.java b/solr/core/src/test/org/apache/solr/cloud/TestDistribDocBasedVersion.java
index a67711dfe29..3e217da4638 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestDistribDocBasedVersion.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestDistribDocBasedVersion.java
@@ -113,7 +113,7 @@ public class TestDistribDocBasedVersion extends AbstractFullDistribZkTestBase {
private void doTestHardFail() throws Exception {
log.info("### STARTING doTestHardFail");
- // use a leader so we test both forwarding and non-forwarding logic
+ // use a leader, so we test both forwarding and non-forwarding logic
solrClient = shardToLeaderJetty.get(bucket1).client.solrClient;
// solrClient = cloudClient; CloudSolrServer doesn't currently support propagating error codes
@@ -169,7 +169,7 @@ public class TestDistribDocBasedVersion extends AbstractFullDistribZkTestBase {
doRTG("b!doc1,c!doc2,d!doc3,e!doc4", "30,23,22,21");
- // try delete before add
+ // try to delete before add
vdelete("b!doc123", 100);
vadd("b!doc123", 99);
doRTG("b!doc123", "100");
@@ -180,7 +180,7 @@ public class TestDistribDocBasedVersion extends AbstractFullDistribZkTestBase {
//
// now test with a non-smart client
//
- // use a leader so we test both forwarding and non-forwarding logic
+ // use a leader, so we test both forwarding and non-forwarding logic
solrClient = shardToLeaderJetty.get(bucket1).client.solrClient;
vadd("b!doc5", 10);
@@ -212,7 +212,7 @@ public class TestDistribDocBasedVersion extends AbstractFullDistribZkTestBase {
doRTG("b!doc5,c!doc6,d!doc7,e!doc8", "30,23,22,21");
- // try delete before add
+ // try to delete before add
vdelete("b!doc1234", 100);
vadd("b!doc1234", 99);
doRTG("b!doc1234", "100");
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestMiniSolrCloudClusterSSL.java b/solr/core/src/test/org/apache/solr/cloud/TestMiniSolrCloudClusterSSL.java
index eedcdea87c7..aaf4b2d3395 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestMiniSolrCloudClusterSSL.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestMiniSolrCloudClusterSSL.java
@@ -113,7 +113,7 @@ public class TestMiniSolrCloudClusterSSL extends SolrTestCaseJ4 {
public void testNoSslButSillyClientAuth() throws Exception {
// this combination doesn't really make sense, since ssl==false the clientauth option will be
- // ignored but we test it anyway for completeness of sanity checking the behavior of code that
+ // ignored, but we test it anyway for completeness of checking the behavior of code that
// looks at those options.
final SSLTestConfig sslConfig = new SSLTestConfig(false, true);
HttpClientUtil.setSocketFactoryRegistryProvider(
@@ -172,8 +172,8 @@ public class TestMiniSolrCloudClusterSSL extends SolrTestCaseJ4 {
try {
checkClusterWithCollectionCreations(cluster, sslConfig);
- // Change the defaul SSLContext to match our test config, or to match our original system
- // default if our test config doesn't use SSL, and reset HttpClientUtil to it's defaults so it
+ // Change the default SSLContext to match our test config, or to match our original system
+ // default if our test config doesn't use SSL, and reset HttpClientUtil to its defaults, so it
// picks up our SSLContext that way.
SSLContext.setDefault(
sslConfig.isSSLMode() ? sslConfig.buildClientSSLContext() : DEFAULT_SSL_CONTEXT);
@@ -293,7 +293,7 @@ public class TestMiniSolrCloudClusterSSL extends SolrTestCaseJ4 {
}
/**
- * verify that we can query all of the Jetty instances the specified cluster using the expected
+ * verify that we can query all the Jetty instances of the specified cluster using the expected
* options (based on the sslConfig), and that we can <b>NOT</b> query the Jetty instances in
* specified cluster in the ways that should fail (based on the sslConfig)
*
@@ -398,8 +398,8 @@ public class TestMiniSolrCloudClusterSSL extends SolrTestCaseJ4 {
private static CloseableHttpClient getSslAwareClientWithNoClientCerts() throws Exception {
// NOTE: This method explicitly does *NOT* use HttpClientUtil code because that
- // will muck with the global static HttpClientBuilder / SchemeRegistryProvider
- // and we can't do that and still test the entire purpose of what we are trying to test here.
+ // will change the global static HttpClientBuilder / SchemeRegistryProvider, and
+ // we can't do that and still test the entire purpose of what we are trying to test here.
final SSLTestConfig clientConfig = new SSLTestConfig(true, false);
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestPrepRecovery.java b/solr/core/src/test/org/apache/solr/cloud/TestPrepRecovery.java
index 504bc5087ab..d8800115bff 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestPrepRecovery.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestPrepRecovery.java
@@ -34,7 +34,7 @@ public class TestPrepRecovery extends SolrCloudTestCase {
public static void setupCluster() throws Exception {
System.setProperty("solr.directoryFactory", "solr.StandardDirectoryFactory");
System.setProperty("solr.ulog.numRecordsToKeep", "1000");
- // the default is 180s and our waitForState times out in 90s
+ // the default is 180s and our waitForState times out in 90s,
// so we lower this so that we can still test timeouts
System.setProperty("leaderConflictResolveWait", "5000");
System.setProperty("prepRecoveryReadTimeoutExtraWait", "1000");
@@ -82,7 +82,7 @@ public class TestPrepRecovery extends SolrCloudTestCase {
.setNode(newNodeName)
.process(solrClient);
- // in the absence of the fixes made in SOLR-10914, this statement will timeout after 90s
+ // in the absence of the fixes made in SOLR-10914, this statement will time out after 90s
waitForState(
"Expected collection: testLeaderUnloaded to be live with 1 shard and 3 replicas",
collectionName,
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java b/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java
index e3758110887..04090868d64 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java
@@ -125,7 +125,7 @@ public class TestPullReplica extends SolrCloudTestCase {
super.tearDown();
}
- // 2 times to make sure cleanup is complete and we can create the same collection
+ // 2 times to make sure cleanup is complete, and we can create the same collection
@Repeat(iterations = 2)
public void testCreateDelete() throws Exception {
try {
@@ -177,7 +177,7 @@ public class TestPullReplica extends SolrCloudTestCase {
while (true) {
DocCollection docCollection = getCollectionState(collectionName);
assertNotNull(docCollection);
- assertEquals("Expecting 4 relpicas per shard", 8, docCollection.getReplicas().size());
+ assertEquals("Expecting 4 replicas per shard", 8, docCollection.getReplicas().size());
assertEquals(
"Expecting 6 pull replicas, 3 per shard",
6,
@@ -584,7 +584,7 @@ public class TestPullReplica extends SolrCloudTestCase {
// Queries should still work
waitForNumDocsInAllReplicas(1, docCollection.getReplicas(EnumSet.of(Replica.Type.PULL)));
// Add nrt replica back. Since there is no nrt now, new nrt will have no docs. There will be
- // data loss, since the it will become the leader and pull replicas will replicate from it.
+ // data loss, since it will become the leader and pull replicas will replicate from it.
// Maybe we want to change this. Replicate from pull replicas is not a good idea, since they are
// by definition out of date.
if (removeReplica) {
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestPullReplicaErrorHandling.java b/solr/core/src/test/org/apache/solr/cloud/TestPullReplicaErrorHandling.java
index 50e2c277d01..0902d3cfd10 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestPullReplicaErrorHandling.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestPullReplicaErrorHandling.java
@@ -210,7 +210,7 @@ public class TestPullReplicaErrorHandling extends SolrCloudTestCase {
// Back to normal
// Even if the leader is back to normal, the replica can get broken pipe for some time when
// trying to connect to it. The commit
- // can fail if it's sent to the replica and it forwards it to the leader, and since it uses
+ // can fail if it's sent to the replica, and it forwards it to the leader, and since it uses
// CUSC the error is hidden! That breaks
// the last part of this test.
// addDocs(20);
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestPullReplicaWithAuth.java b/solr/core/src/test/org/apache/solr/cloud/TestPullReplicaWithAuth.java
index cea8d56b7c4..75081234545 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestPullReplicaWithAuth.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestPullReplicaWithAuth.java
@@ -133,7 +133,7 @@ public class TestPullReplicaWithAuth extends SolrCloudTestCase {
QueryResponse statsResponse =
queryWithBasicAuth(
pullReplicaClient, new SolrQuery("qt", "/admin/plugins", "stats", "true"));
- // adds is a gauge, which is null for PULL replicas
+ // the 'adds' metric is a gauge, which is null for PULL replicas
assertNull(
"Replicas shouldn't process the add document request: " + statsResponse,
getUpdateHandlerMetric(statsResponse, "UPDATE.updateHandler.adds"));
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestQueryingOnDownCollection.java b/solr/core/src/test/org/apache/solr/cloud/TestQueryingOnDownCollection.java
index 2f291ec4d5e..87e0dc4bc9c 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestQueryingOnDownCollection.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestQueryingOnDownCollection.java
@@ -90,7 +90,8 @@ public class TestQueryingOnDownCollection extends SolrCloudTestCase {
.setBasicAuthCredentials(USERNAME, PASSWORD);
// Without the SOLR-13793 fix, this causes requests to "down collection" to pile up (until the
- // nodes run out of serviceable threads and they crash, even for other collections hosted on the
+ // nodes run out of serviceable threads, and they crash, even for other collections hosted on
+ // the
// nodes).
SolrException error =
expectThrows(
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestRandomFlRTGCloud.java b/solr/core/src/test/org/apache/solr/cloud/TestRandomFlRTGCloud.java
index 0e334404092..3832550f26d 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestRandomFlRTGCloud.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestRandomFlRTGCloud.java
@@ -77,7 +77,7 @@ public class TestRandomFlRTGCloud extends SolrCloudTestCase {
private static final List<HttpSolrClient> CLIENTS =
Collections.synchronizedList(new ArrayList<>(5));
- /** Always included in fl so we can vet what doc we're looking at */
+ /** Always included in fl, so we can check what doc we're looking at */
private static final FlValidator ID_VALIDATOR = new SimpleFieldValueValidator("id");
/**
@@ -150,7 +150,7 @@ public class TestRandomFlRTGCloud extends SolrCloudTestCase {
// 50% runs use multi node/shard with FL_VALIDATORS only containing stuff that works in cloud
final boolean singleCoreMode = random().nextBoolean();
- // (asuming multi core multi replicas shouldn't matter (assuming multi node) ...
+ // (assuming multi core multi replicas shouldn't matter (assuming multi node) ...
final int repFactor = singleCoreMode ? 1 : (usually() ? 1 : 2);
// ... but we definitely want to ensure forwarded requests to other shards work ...
final int numShards = singleCoreMode ? 1 : 2;
@@ -215,7 +215,7 @@ public class TestRandomFlRTGCloud extends SolrCloudTestCase {
// and a specific Jira for fixing this is listed as a comment
final List<String> knownBugs =
Arrays.asList(
- "child" // way to complicatd to vet with this test, see SOLR-9379 instead
+ "child" // way too complicated to check with this test, see SOLR-9379 instead
);
for (String buggy : knownBugs) {
@@ -281,7 +281,7 @@ public class TestRandomFlRTGCloud extends SolrCloudTestCase {
private void assertOneIter(final SolrInputDocument[] knownDocs)
throws IOException, SolrServerException {
- // we want to occasionally test more then one doc per RTG
+ // we want to occasionally test more than one doc per RTG
final int numDocsThisIter = TestUtil.nextInt(random(), 1, atLeast(2));
int numDocsThisIterThatExist = 0;
@@ -337,7 +337,7 @@ public class TestRandomFlRTGCloud extends SolrCloudTestCase {
}
/**
- * Deletes the docIds specified and asserts the results are valid, updateing knownDocs accordingly
+ * Deletes the docIds specified and asserts the results are valid, updating knownDocs accordingly
*/
private void assertDelete(final SolrInputDocument[] knownDocs, final int[] docIds)
throws IOException, SolrServerException {
@@ -373,7 +373,7 @@ public class TestRandomFlRTGCloud extends SolrCloudTestCase {
//
"geo_1_srpt", GeoTransformerValidator.getValueForIndexing(random()),
"geo_2_srpt", GeoTransformerValidator.getValueForIndexing(random()),
- // for testing subqueries
+ // for testing sub-queries
"next_2_ids_ss", String.valueOf(docId + 1),
"next_2_ids_ss", String.valueOf(docId + 2),
// for testing prefix globbing
@@ -459,7 +459,7 @@ public class TestRandomFlRTGCloud extends SolrCloudTestCase {
}
final Set<FlValidator> validators = new LinkedHashSet<>();
- // always include id so we can be confident which doc we're looking at
+ // always include id, so we can be confident which doc we're looking at
validators.add(ID_VALIDATOR);
validators.add(ROOT_VALIDATOR); // always added in a nested schema, with the same value as id
addRandomFlValidators(random(), validators);
@@ -548,7 +548,7 @@ public class TestRandomFlRTGCloud extends SolrCloudTestCase {
docsToExpect.size(),
docs.size());
- // NOTE: RTG makes no garuntees about the order docs will be returned in when multi requested
+ // NOTE: RTG makes no guarantees about the order docs will be returned in when multi requested
for (SolrDocument actual : docs) {
try {
int actualId = assertParseInt("id", actual.getFirstValue("id"));
@@ -652,7 +652,7 @@ public class TestRandomFlRTGCloud extends SolrCloudTestCase {
private interface FlValidator {
/**
- * Given a list of FlValidators, adds one or more fl params that corrispond to the entire set,
+ * Given a list of FlValidators, adds one or more fl params that correspond to the entire set,
* as well as any other special case top level params required by the validators.
*/
public static void addParams(
@@ -668,9 +668,9 @@ public class TestRandomFlRTGCloud extends SolrCloudTestCase {
/**
* Indicates if this validator is for a transformer that returns true from {@link
* DocTransformer#needsSolrIndexSearcher}. Other validators for transformers that do
- * <em>not</em> require a re-opened searcher (but may have slightly diff behavior depending on
- * wether a doc comesfrom the index or from the update log) may use this information to decide
- * wether they wish to enforce stricter assertions on the resulting document.
+ * <em>not</em> require a re-opened searcher (but may have slightly different behavior depending
+ * on whether a doc comes from the index or from the update log) may use this information to
+ * decide whether they wish to enforce stricter assertions on the resulting document.
*
* <p>The default implementation always returns <code>false</code>
*
@@ -682,7 +682,7 @@ public class TestRandomFlRTGCloud extends SolrCloudTestCase {
/**
* the name of a transformer listed in {@link TransformerFactory#defaultFactories} that this
- * validator corrisponds to, or null if not applicable. Used for testing coverage of Solr's
+ * validator corresponds to, or null if not applicable. Used for testing coverage of Solr's
* implicitly supported transformers.
*
* <p>Default behavior is to return null
@@ -699,7 +699,7 @@ public class TestRandomFlRTGCloud extends SolrCloudTestCase {
}
/**
- * Must return a non null String that can be used in an fl param -- either by itself, or with
+ * Must return a non-null String that can be used in a fl param -- either by itself, or with
* other items separated by commas
*/
public String getFlParam();
@@ -805,11 +805,11 @@ public class TestRandomFlRTGCloud extends SolrCloudTestCase {
* Validator for {@link RawValueTransformerFactory}
*
* <p>This validator is fairly weak, because it doesn't do anything to verify the conditional
- * logic in RawValueTransformerFactory realted to the output format -- but that's out of the scope
+ * logic in RawValueTransformerFactory related to the output format -- but that's out of the scope
* of this randomized testing.
*
- * <p>What we're primarily concerned with is that the transformer does it's job and puts the
- * string in the response, regardless of cloud/RTG/uncommited state of the document.
+ * <p>What we're primarily concerned with is that the transformer does its job and puts the string
+ * in the response, regardless of cloud/RTG/uncommitted state of the document.
*/
private static class RawFieldValueValidator extends RenameFieldValueValidator {
final String type;
@@ -934,7 +934,7 @@ public class TestRandomFlRTGCloud extends SolrCloudTestCase {
/**
* enforces that a valid <code>[docid]</code> is present in the response, possibly using a
- * resultKey alias. By default the only validation of docId values is that they are an integer
+ * resultKey alias. By default, the only validation of docId values is that they are an integer
* greater than or equal to <code>-1</code> -- but if any other validator in use returns true from
* {@link #requiresRealtimeSearcherReOpen} then the constraint is tightened and values must be
* greater than or equal to <code>0</code>
@@ -1121,15 +1121,15 @@ public class TestRandomFlRTGCloud extends SolrCloudTestCase {
* focuses on the basics of:
*
* <ul>
- * <li>do a subquery for docs where SUBQ_FIELD contains the id of the top level doc
- * <li>verify that any subquery match is expected based on indexing pattern
+ * <li>do a sub-query for docs where SUBQ_FIELD contains the id of the top level doc
+ * <li>verify that any sub-query match is expected based on indexing pattern
* </ul>
*/
private static class SubQueryValidator implements FlValidator {
// HACK to work around SOLR-9396...
//
- // we're using "id" (and only "id") in the subquery.q as a workarround limitation in
+ // we're using "id" (and only "id") in the sub-query.q as a workaround limitation in
// "$rows.foo" parsing -- it only works reliably if "foo" is in fl, so we only use "$rows.id",
// which we know is in every request (and is a valid integer)
@@ -1197,7 +1197,7 @@ public class TestRandomFlRTGCloud extends SolrCloudTestCase {
*/
private static final Map<String, String> VALUES = new HashMap<>();
/**
- * The set of legal field values this validator is willing to test as a list so we can reliably
+ * The set of legal field values this validator is willing to test as a list, so we can reliably
* index into it with random ints
*/
private static final List<String> ALLOWED_FIELD_VALUES;
@@ -1380,7 +1380,10 @@ public class TestRandomFlRTGCloud extends SolrCloudTestCase {
}
}
- /** helper method for adding a random number (may be 0) of items from {@link #FL_VALIDATORS} */
+ /**
+ * helper method for adding a random number (the number may be 0) of items from {@link
+ * #FL_VALIDATORS}
+ */
private static void addRandomFlValidators(final Random r, final Set<FlValidator> validators) {
List<FlValidator> copyToShuffle = new ArrayList<>(FL_VALIDATORS);
Collections.shuffle(copyToShuffle, r);
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestRebalanceLeaders.java b/solr/core/src/test/org/apache/solr/cloud/TestRebalanceLeaders.java
index 4355365e2f6..6a432af6d4b 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestRebalanceLeaders.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestRebalanceLeaders.java
@@ -110,7 +110,7 @@ public class TestRebalanceLeaders extends SolrCloudTestCase {
// the property on other replicas _in that slice_.
//
// NOTE: There were significant problems because at one point the code implicitly defined
- // shardUnique=true for the special property preferredLeader. That was removed at one point so
+ // shardUnique=true for the special property preferredLeader. That was removed at one point, so
// we're explicitly testing that as well.
@Test
public void testSetArbitraryPropertySliceUnique()
@@ -122,7 +122,7 @@ public class TestRebalanceLeaders extends SolrCloudTestCase {
}
// Test that automatically distributing a slice unique property un-sets that property if it's in
- // any other replica on that slice. This is different than the test above. The test above sets
+ // any other replica on that slice. This is different from the test above. The test above sets
// individual properties on individual nodes. This one relies on Solr to pick which replicas to
// set the property on
@Test
@@ -157,7 +157,7 @@ public class TestRebalanceLeaders extends SolrCloudTestCase {
checkPreferredsAreLeaders();
}
- // Insure that the property is set on only one replica per slice when changing a unique property
+ // Ensure that the property is set on only one replica per slice when changing a unique property
// on an individual
// replica.
private void doTestSetArbitraryPropertySliceUnique(String propIn)
@@ -184,7 +184,7 @@ public class TestRebalanceLeaders extends SolrCloudTestCase {
Slice modSlice;
DocCollection modColl = null; // keeps IDE happy
- // insure that no other replica in that slice has the property when we return.
+ // ensure that no other replica in that slice has the property when we return.
while (timeout.hasTimedOut() == false) {
forceUpdateCollectionStatus();
modColl = cluster.getSolrClient().getClusterState().getCollection(COLLECTION_NAME);
@@ -217,14 +217,14 @@ public class TestRebalanceLeaders extends SolrCloudTestCase {
}
}
- // Fail if we the replicas with the preferredLeader property are _not_ also the leaders.
+ // Fail if we have replicas with the preferredLeader property are _not_ also the leaders.
private void checkPreferredsAreLeaders() throws InterruptedException, KeeperException {
// Make sure that the shard unique are where you expect.
TimeOut timeout = new TimeOut(timeoutMs, TimeUnit.MILLISECONDS, TimeSource.NANO_TIME);
while (timeout.hasTimedOut() == false) {
if (checkPreferredsAreLeaders(false)) {
- // Ok, all preferreds are leaders. Just for Let's also get the election queue and guarantee
+ // Ok, all preferred's are leaders. Just for Let's also get the election queue and guarantee
// that every live replica is in the queue and none are repeated.
checkElectionQueues();
return;
@@ -233,7 +233,7 @@ public class TestRebalanceLeaders extends SolrCloudTestCase {
}
log.error(
- "Leaders are not all preferres {}",
+ "Leaders are not all preferred {}",
cluster.getSolrClient().getClusterState().getCollection(COLLECTION_NAME));
// Show the errors
checkPreferredsAreLeaders(true);
@@ -499,7 +499,7 @@ public class TestRebalanceLeaders extends SolrCloudTestCase {
params.set("replica", rep.getName());
params.set("property", prop);
params.set("property.value", "true");
- // Test to insure that implicit shardUnique is added for preferredLeader.
+ // Test to ensure that implicit shardUnique is added for preferredLeader.
if (prop.toLowerCase(Locale.ROOT).equals("preferredleader") == false) {
params.set("shardUnique", "true");
}
@@ -546,8 +546,8 @@ public class TestRebalanceLeaders extends SolrCloudTestCase {
(n, c) -> c.getReplica(rep.getName()).getProperty(prop) == null);
}
- // Intentionally un-balance the property to insure that BALANCESHARDUNIQUE does its job. There was
- // an odd case where rebalancing didn't work very well if the Solr nodes were stopped and
+ // Intentionally un-balance the property to ensure that BALANCESHARDUNIQUE does its job. There was
+ // an odd case where re-balancing didn't work very well if the Solr nodes were stopped and
// restarted that worked perfectly when if the nodes were _not_ restarted in the test. So we have
// to test that too.
private void concentratePropByRestartingJettys() throws Exception {
@@ -555,7 +555,7 @@ public class TestRebalanceLeaders extends SolrCloudTestCase {
List<JettySolrRunner> jettys = new ArrayList<>(cluster.getJettySolrRunners());
Collections.shuffle(jettys, random());
jettys.remove(random().nextInt(jettys.size()));
- // Now we have a list of jettys, and there is one missing. Stop all of the remaining jettys,
+ // Now we have a list of jettys, and there is one missing. Stop all the remaining jettys,
// then start them again to concentrate the leaders. It's not necessary that all shards have a
// leader.
@@ -603,8 +603,8 @@ public class TestRebalanceLeaders extends SolrCloudTestCase {
// cluster.getSolrClient().getZkStateReader().forceUpdateCollection(COLLECTION_NAME);
}
- // Since we have to restart jettys, we don't want to try rebalancing etc. until we're sure all
- // jettys that should be up are up and all replicas are active.
+ // Since we have to restart jettys, we don't want to try re-balancing etc. until we're sure all
+ // jettys that should be up are and all replicas are active.
private void checkReplicasInactive(List<JettySolrRunner> downJettys) throws InterruptedException {
TimeOut timeout = new TimeOut(timeoutMs, TimeUnit.MILLISECONDS, TimeSource.NANO_TIME);
DocCollection docCollection = null;
@@ -713,7 +713,7 @@ public class TestRebalanceLeaders extends SolrCloudTestCase {
TimeOut timeout = new TimeOut(timeoutMs, TimeUnit.MILLISECONDS, TimeSource.NANO_TIME);
while (timeout.hasTimedOut() == false) {
uniquePropMaps.clear();
- if (checkdUniquePropPerShard(uniquePropMaps, prop)) {
+ if (checkUniquePropPerShard(uniquePropMaps, prop)) {
return uniquePropMaps;
}
TimeUnit.MILLISECONDS.sleep(10);
@@ -727,20 +727,20 @@ public class TestRebalanceLeaders extends SolrCloudTestCase {
}
// return true if every shard has exactly one replica with the unique property set to "true"
- private boolean checkdUniquePropPerShard(Map<String, String> uniques, String prop) {
+ private boolean checkUniquePropPerShard(Map<String, String> uniques, String prop) {
forceUpdateCollectionStatus();
DocCollection docCollection =
cluster.getSolrClient().getClusterState().getCollection(COLLECTION_NAME);
for (Slice slice : docCollection.getSlices()) {
- int propfCount = 0;
+ int propCount = 0;
for (Replica rep : slice.getReplicas()) {
if (rep.getBool("property." + prop.toLowerCase(Locale.ROOT), false)) {
- propfCount++;
+ propCount++;
uniques.put(slice.getName(), rep.getName());
}
}
- if (1 != propfCount) {
+ if (1 != propCount) {
return false;
}
}
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestSSLRandomization.java b/solr/core/src/test/org/apache/solr/cloud/TestSSLRandomization.java
index 4514d137aad..bd145d82192 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestSSLRandomization.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestSSLRandomization.java
@@ -87,7 +87,7 @@ public class TestSSLRandomization extends SolrCloudTestCase {
/** Used by {@link #testSSLRandomizer} */
@RandomizeSSL(ssl = 0.42, clientAuth = 0.33, reason = "foo")
public class InheritedSuppressedWithIgnoredAnnotation extends Suppressed {
- // Even with direct annotation, supression at superclass overrules us.
+ // Even with direct annotation, suppression at superclass overrules us.
//
// (If it didn't work this way, it would be a pain in the ass to quickly disable SSL for a
// broad hierarchy of tests)
@@ -104,12 +104,12 @@ public class TestSSLRandomization extends SolrCloudTestCase {
/** Used by {@link #testSSLRandomizer} */
@RandomizeSSL(0.5)
- public class InheritedEmptyAnnotatationWithOverride extends EmptyAnnotated {}
+ public class InheritedEmptyAnnotationWithOverride extends EmptyAnnotated {}
;
/** Used by {@link #testSSLRandomizer} */
@RandomizeSSL(ssl = 0.42, clientAuth = 0.33, reason = "foo")
- public class GrandchildInheritedEmptyAnnotatationWithOverride extends InheritedEmptyAnnotated {}
+ public class GrandchildInheritedEmptyAnnotationWithOverride extends InheritedEmptyAnnotated {}
;
/** Used by {@link #testSSLRandomizer} */
@@ -160,7 +160,7 @@ public class TestSSLRandomization extends SolrCloudTestCase {
Arrays.asList(
FullyAnnotated.class,
InheritedFullyAnnotated.class,
- GrandchildInheritedEmptyAnnotatationWithOverride.class)) {
+ GrandchildInheritedEmptyAnnotationWithOverride.class)) {
r = SSLRandomizer.getSSLRandomizerForClass(c);
assertEquals(c.toString(), 0.42D, r.ssl, 0.0D);
assertEquals(c.toString(), 0.33D, r.clientAuth, 0.0D);
@@ -200,7 +200,7 @@ public class TestSSLRandomization extends SolrCloudTestCase {
}
for (Class<?> c :
- Arrays.asList(SimplyAnnotated.class, InheritedEmptyAnnotatationWithOverride.class)) {
+ Arrays.asList(SimplyAnnotated.class, InheritedEmptyAnnotationWithOverride.class)) {
r = SSLRandomizer.getSSLRandomizerForClass(c);
assertEquals(c.toString(), 0.5D, r.ssl, 0.0D);
assertEquals(c.toString(), 0.5D, r.clientAuth, 0.0D);
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestSegmentSorting.java b/solr/core/src/test/org/apache/solr/cloud/TestSegmentSorting.java
index fb4a7a68473..8392c6ed72c 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestSegmentSorting.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestSegmentSorting.java
@@ -103,7 +103,7 @@ public class TestSegmentSorting extends SolrCloudTestCase {
tstes.queryTimestampDescendingSegmentTerminateEarlyYes(cloudSolrClient);
tstes.queryTimestampDescendingSegmentTerminateEarlyNo(cloudSolrClient);
- // CommonParams.SEGMENT_TERMINATE_EARLY parameter present but it won't be used
+ // CommonParams.SEGMENT_TERMINATE_EARLY parameter present, but it won't be used
tstes.queryTimestampDescendingSegmentTerminateEarlyYesGrouped(cloudSolrClient);
// uses a sort order that is _not_ compatible with the merge sort order
tstes.queryTimestampAscendingSegmentTerminateEarlyYes(cloudSolrClient);
@@ -111,7 +111,8 @@ public class TestSegmentSorting extends SolrCloudTestCase {
/**
* Verify that atomic updates against our (DVO) segment sort field doesn't cause errors. In this
- * situation, the updates should *NOT* be done inplace, because that would break the index sorting
+ * situation, the updates should *NOT* be done in-place, because that would break the index
+ * sorting
*/
@Test
// 12-Jun-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 26-Mar-2018
@@ -121,7 +122,7 @@ public class TestSegmentSorting extends SolrCloudTestCase {
final String updateField = SegmentTerminateEarlyTestState.TIMESTAMP_FIELD;
// sanity check that updateField is in fact a DocValues only field, meaning it
- // would normally be eligable for inplace updates -- if it weren't also used for merge sorting
+ // would normally be eligible for in-place updates -- if it weren't also used for merge sorting
final Map<String, Object> schemaOpts =
new Field(
updateField,
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestShortCircuitedRequests.java b/solr/core/src/test/org/apache/solr/cloud/TestShortCircuitedRequests.java
index c34007eec45..950a6a35fe5 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestShortCircuitedRequests.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestShortCircuitedRequests.java
@@ -46,7 +46,7 @@ public class TestShortCircuitedRequests extends AbstractFullDistribZkTestBase {
doQuery("a!doc1", "q", "*:*", ShardParams._ROUTE_, "a!"); // can go to any random node
- // query shard3 directly with _route_=a! so that we trigger the short circuited request path
+ // query shard3 directly with _route_=a! so that we trigger the short-circuited request path
Replica shard3 =
cloudClient.getClusterState().getCollection(DEFAULT_COLLECTION).getLeader("shard3");
String nodeName = shard3.getNodeName();
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestSkipOverseerOperations.java b/solr/core/src/test/org/apache/solr/cloud/TestSkipOverseerOperations.java
index 1869ced5ded..46635a070d9 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestSkipOverseerOperations.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestSkipOverseerOperations.java
@@ -143,7 +143,7 @@ public class TestSkipOverseerOperations extends SolrCloudTestCase {
// Longer term question...
if (!cluster.getOpenOverseer().getDistributedClusterStateUpdater().isDistributedStateUpdate()) {
- assertEquals(getNumLeaderOpeations(resp), getNumLeaderOpeations(resp2));
+ assertEquals(getNumLeaderOperations(resp), getNumLeaderOperations(resp2));
}
CollectionAdminRequest.deleteCollection(collection).process(cluster.getSolrClient());
}
@@ -222,20 +222,20 @@ public class TestSkipOverseerOperations extends SolrCloudTestCase {
// See comment in testSkipLeaderOperations() above why this assert is skipped
if (!cluster.getOpenOverseer().getDistributedClusterStateUpdater().isDistributedStateUpdate()) {
// 2 for recovering state, 4 for active state
- assertEquals(getNumStateOpeations(resp) + 6, getNumStateOpeations(resp2));
+ assertEquals(getNumStateOperations(resp) + 6, getNumStateOperations(resp2));
}
CollectionAdminRequest.deleteCollection(collection).process(cluster.getSolrClient());
}
/**
* Returns the value corresponding to stat: "overseer_operations", "leader", "requests" This stat
- * (see {@link org.apache.solr.cloud.api.collections.OverseerStatusCmd} is updated when the
+ * (see {@link org.apache.solr.cloud.api.collections.OverseerStatusCmd}) is updated when the
* cluster state updater processes a message of type {@link
* org.apache.solr.cloud.overseer.OverseerAction#LEADER} to set a shard leader
*
* <p>The update happens in org.apache.solr.cloud.Overseer.ClusterStateUpdater.processQueueItem()
*/
- private int getNumLeaderOpeations(CollectionAdminResponse resp) {
+ private int getNumLeaderOperations(CollectionAdminResponse resp) {
return (int) resp.getResponse().findRecursive("overseer_operations", "leader", "requests");
}
@@ -243,7 +243,7 @@ public class TestSkipOverseerOperations extends SolrCloudTestCase {
* "state" stats are when Overseer processes a {@link
* org.apache.solr.cloud.overseer.OverseerAction#STATE} message that sets replica properties
*/
- private int getNumStateOpeations(CollectionAdminResponse resp) {
+ private int getNumStateOperations(CollectionAdminResponse resp) {
return (int) resp.getResponse().findRecursive("overseer_operations", "state", "requests");
}
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestStressCloudBlindAtomicUpdates.java b/solr/core/src/test/org/apache/solr/cloud/TestStressCloudBlindAtomicUpdates.java
index a9233e388c7..872348602ce 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestStressCloudBlindAtomicUpdates.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestStressCloudBlindAtomicUpdates.java
@@ -95,7 +95,7 @@ public class TestStressCloudBlindAtomicUpdates extends SolrCloudTestCase {
/**
* Used as an increment and multiplier when deciding how many docs should be in the test index. 1
* means every doc in the index is a candidate for updates, bigger numbers mean a larger index is
- * used (so tested docs are more likeely to be spread out in multiple segments)
+ * used (so tested docs are more likely to be spread out in multiple segments)
*/
private static int DOC_ID_INCR;
@@ -111,8 +111,8 @@ public class TestStressCloudBlindAtomicUpdates extends SolrCloudTestCase {
@BeforeClass
@SuppressWarnings({"unchecked"})
private static void createMiniSolrCloudCluster() throws Exception {
- // NOTE: numDocsToCheck uses atLeast, so nightly & multiplier are alreayd a factor in index size
- // no need to redundently factor them in here as well
+ // NOTE: numDocsToCheck uses atLeast, so nightly & multiplier are already a factor in index size
+ // no need to redundantly factor them in here as well
DOC_ID_INCR = TestUtil.nextInt(random(), 1, 7);
NUM_THREADS = atLeast(3);
@@ -199,7 +199,7 @@ public class TestStressCloudBlindAtomicUpdates extends SolrCloudTestCase {
/**
* Assigns {@link #testInjection} to various TestInjection variables. Calling this method multiple
* times in the same method should always result in the same setting being applied (even if {@link
- * TestInjection#reset} was called in between.
+ * TestInjection#reset}) was called in between.
*
* <p>NOTE: method is currently a No-Op pending SOLR-13189
*/
@@ -325,7 +325,7 @@ public class TestStressCloudBlindAtomicUpdates extends SolrCloudTestCase {
Worker worker =
new Worker(
workerId, expected, abortLatch, new Random(random().nextLong()), numericFieldName);
- // ask for the Worker to be returned in the Future so we can inspect it
+ // ask for the Worker to be returned to the Future, so we can inspect it
results.add(EXEC_SERVICE.submit(worker, worker));
}
// check the results of all our workers
@@ -368,7 +368,7 @@ public class TestStressCloudBlindAtomicUpdates extends SolrCloudTestCase {
final String docId = "" + id;
- // sometimes include an fq on the expected value to ensure the updated values
+ // sometimes include a fq on the expected value to ensure the updated values
// are "visible" for searching
final SolrParams p =
(0 != TestUtil.nextInt(random(), 0, 15))
@@ -506,7 +506,7 @@ public class TestStressCloudBlindAtomicUpdates extends SolrCloudTestCase {
public static SolrInputField f(String fieldName, Object... values) {
SolrInputField f = new SolrInputField(fieldName);
f.setValue(values);
- // TODO: soooooooooo stupid (but currently neccessary because atomic updates freak out
+ // TODO: soooooooooo stupid (but currently necessary because atomic updates freak out
// if the Map with the "inc" operation is inside of a collection - even if it's the only
// "value") ...
if (1 == values.length) {
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestStressInPlaceUpdates.java b/solr/core/src/test/org/apache/solr/cloud/TestStressInPlaceUpdates.java
index b1e2f5b52de..ca79d021f08 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestStressInPlaceUpdates.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestStressInPlaceUpdates.java
@@ -250,7 +250,7 @@ public class TestStressInPlaceUpdates extends AbstractFullDistribZkTestBase {
} catch (RuntimeException e) {
if (e.getMessage() != null && e.getMessage().contains("version conflict")
|| e.getMessage() != null && e.getMessage().contains("Conflict")) {
- // Its okay for a leader to reject a concurrent request
+ // It's okay for a leader to reject a concurrent request
log.warn("Conflict during {}, rejected id={}, {}", delType, id, e);
returnedVersion = null;
} else {
@@ -305,7 +305,7 @@ public class TestStressInPlaceUpdates extends AbstractFullDistribZkTestBase {
} catch (RuntimeException e) {
if (e.getMessage() != null && e.getMessage().contains("version conflict")
|| e.getMessage() != null && e.getMessage().contains("Conflict")) {
- // Its okay for a leader to reject a concurrent request
+ // It's okay for a leader to reject a concurrent request
log.warn("Conflict during full update, rejected id={}, {}", id, e);
returnedVersion = null;
} else {
@@ -336,7 +336,7 @@ public class TestStressInPlaceUpdates extends AbstractFullDistribZkTestBase {
} catch (RuntimeException e) {
if (e.getMessage() != null && e.getMessage().contains("version conflict")
|| e.getMessage() != null && e.getMessage().contains("Conflict")) {
- // Its okay for a leader to reject a concurrent request
+ // It's okay for a leader to reject a concurrent request
log.warn("Conflict during partial update, rejected id={}, {}", id, e);
} else if (e.getMessage() != null
&& e.getMessage().contains("Document not found for update.")
@@ -423,7 +423,8 @@ public class TestStressInPlaceUpdates extends AbstractFullDistribZkTestBase {
QueryResponse response = clients.get(clientId).query(params);
if (response.getResults().size() == 0) {
- // there's no info we can get back with a delete, so not much we can check
+ // there's no info we can get back from a delete operation, so not much we
+ // can check
// without further synchronization
} else if (response.getResults().size() == 1) {
final SolrDocument actual = response.getResults().get(0);
@@ -454,7 +455,7 @@ public class TestStressInPlaceUpdates extends AbstractFullDistribZkTestBase {
}
// Some things we can assert about any Doc returned from solr,
- // even if it's newer then our (expected) model information...
+ // even if it's newer than our (expected) model information...
assertTrue(
msg + " ...how did a doc in solr get a non positive intVal?", 0 < intVal);
@@ -462,23 +463,25 @@ public class TestStressInPlaceUpdates extends AbstractFullDistribZkTestBase {
msg + " ...how did a doc in solr get a non positive longVal?", 0 < longVal);
assertEquals(
msg
- + " ...intVal and longVal in solr doc are internally (modulo) inconsistent w/eachother",
+ + " ...intVal and longVal in solr doc are internally (modulo) inconsistent with each other",
0,
(longVal % intVal));
- // NOTE: when foundVersion is greater then the version read from the model, it's
+ // NOTE: when foundVersion is greater than the version read from the model, it's
// not possible to make any assertions about the field values in solr relative
// to the field values in the model -- ie: we can *NOT* assert
// expected.longFieldVal <= doc.longVal
//
// it's tempting to think that this would be possible if we changed our model to
- // preserve the "old" valuess when doing a delete, but that's still no garuntee
- // because of how oportunistic concurrency works with negative versions: When
+ // preserve the "old" values when running a delete operation, but that's still
+ // no guarantee
+ // because of how opportunistic concurrency works with negative versions: When
// adding a doc, we can assert that it must not exist with version<0, but we
- // can't assert that the *reason* it doesn't exist was because of a delete with
- // the specific version of "-42". So a wrtier thread might (1) prep to add a doc
+ // can't assert that the *reason* it doesn't exist was because running a delete
+ // operation with
+ // the specific version of "-42". So a writer thread might (1) prep to add a doc
// for the first time with "intValue=1,_version_=-1", and that add may succeed
- // and (2) return some version X which is put in the model. but inbetween #1
+ // and (2) return some version X which is put in the model. But in between #1
// and #2 other threads may have added & deleted the doc repeatedly, updating
// the model with intValue=7,_version_=-42, and a reader thread might meanwhile
// read from the model before #2 and expect intValue=5, but get intValue=1 from
@@ -540,13 +543,13 @@ public class TestStressInPlaceUpdates extends AbstractFullDistribZkTestBase {
{
// do a final search and compare every result with the model because commits don't provide any
// sort of concrete versioning (or optimistic concurrency constraints) there's no way to
- // garuntee that our committedModel matches what was in Solr at the time of the last commit.
+ // guarantee that our committedModel matches what was in Solr at the time of the last commit.
// It's possible other threads made additional writes to solr before the commit was processed,
- // but after the committedModel variable was assigned it's new value. what we can do however,
+ // but after the committedModel variable was assigned its new value. what we can do however,
// is commit all completed updates, and *then* compare solr search results against the (new)
// committed model....
- // NOTE: this does an automatic commit for us & ensures replicas are up to date
+ // NOTE: this does an automatic commit for us & ensures replicas are up-to-date
waitForThingsToLevelOut(30, TimeUnit.SECONDS);
committedModel = new HashMap<>(model);
@@ -583,7 +586,7 @@ public class TestStressInPlaceUpdates extends AbstractFullDistribZkTestBase {
assertEquals(msg, expected.version, actual.getFieldValue("_version_"));
assertTrue(msg + " doc exists in solr, but version is negative???", 0 < expected.version);
- // also sanity check the model (which we already know matches the doc)
+ // check the model (which we already know matches the doc)
assertEquals(
"Inconsistent (modulo) values in model for id " + id + "=" + expected,
0,
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestStressLiveNodes.java b/solr/core/src/test/org/apache/solr/cloud/TestStressLiveNodes.java
index 9a0ee3caafa..c2f19e02d30 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestStressLiveNodes.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestStressLiveNodes.java
@@ -143,7 +143,7 @@ public class TestStressLiveNodes extends SolrCloudTestCase {
List<String> actualLiveNodes = getTrueLiveNodesFromZk();
assertEquals("iter" + iter + ": " + actualLiveNodes.toString(), 1, actualLiveNodes.size());
- // only here do we forcibly update the cached live nodes so we don't have to wait for it to
+ // only here do we forcibly update the cached live nodes, so we don't have to wait for it to
// catch up with all the ephemeral nodes that vanished after the last iteration
cluster.getZkStateReader().updateLiveNodes();
@@ -158,13 +158,14 @@ public class TestStressLiveNodes extends SolrCloudTestCase {
// start spinning up some threads to add some live_node children in parallel
// we don't need a lot of threads or nodes (we don't want to swamp the CPUs just bursts of
- // concurrent adds) but we do want to randomize it a bit so we increase the odds of concurrent
+ // concurrent adds) but we do want to randomize it a bit, so we increase the odds of
+ // concurrent
// watchers firing regardless of the num CPUs or load on the machine running the test (but we
// deliberately don't look at availableProcessors() since we want randomization consistency
// across all machines for a given seed)
final int numThreads = TestUtil.nextInt(random(), 2, 5);
- // use same num for all thrashers, to increase likely hood of them all competing
+ // use same num for all thrashers, to increase likelihood of them all competing
// (diff random number would mean heavy concurrency only for ~ the first N=lowest num
// requests)
//
@@ -180,7 +181,7 @@ public class TestStressLiveNodes extends SolrCloudTestCase {
numNodesPerThrasher);
// NOTE: using ephemeral nodes
- // so we can't close any of these thrashers until we are done with our assertions
+ // means we can't close any of these thrashers until we are done with our assertions
final List<LiveNodeTrasher> thrashers = new ArrayList<>(numThreads);
for (int i = 0; i < numThreads; i++) {
thrashers.add(new LiveNodeTrasher("T" + iter + "_" + i, numNodesPerThrasher));
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestTlogReplayVsRecovery.java b/solr/core/src/test/org/apache/solr/cloud/TestTlogReplayVsRecovery.java
index 6ce8ec5edf1..819fc679d0f 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestTlogReplayVsRecovery.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestTlogReplayVsRecovery.java
@@ -50,7 +50,7 @@ import org.slf4j.LoggerFactory;
public class TestTlogReplayVsRecovery extends SolrCloudTestCase {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
- private static final String COLLECTION = "collecion_with_slow_tlog_recovery";
+ private static final String COLLECTION = "collection_with_slow_tlog_recovery";
private JettySolrRunner NODE0;
private JettySolrRunner NODE1;
@@ -195,7 +195,7 @@ public class TestTlogReplayVsRecovery extends SolrCloudTestCase {
if (newLeader != null
&& !newLeader.getName().equals(leader.getName())
&& newLeader.getState() == Replica.State.ACTIVE) {
- // this is is the bad case, our "bad" state was found before timeout
+ // this is the bad case, our "bad" state was found before timeout
log.error("WTF: New Leader={}", newLeader);
return true;
}
@@ -232,8 +232,8 @@ public class TestTlogReplayVsRecovery extends SolrCloudTestCase {
}
/**
- * Adds the specified number of docs directly to the leader, using increasing docIds begining with
- * startId. Commits if and only if the boolean is true.
+ * Adds the specified number of docs directly to the leader, using increasing docIds beginning
+ * with startId. Commits if and only if the boolean is true.
*/
private void addDocs(final boolean commit, final int numDocs, final int startId)
throws SolrServerException, IOException {
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java b/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java
index c3c0d924d3d..4d717298663 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java
@@ -152,7 +152,7 @@ public class TestTlogReplica extends SolrCloudTestCase {
}
}
- // 2 times to make sure cleanup is complete and we can create the same collection
+ // 2 times to make sure cleanup is complete, and we can create the same collection
@Repeat(iterations = 2)
public void testCreateDelete() throws Exception {
switch (random().nextInt(3)) {
@@ -203,7 +203,7 @@ public class TestTlogReplica extends SolrCloudTestCase {
DocCollection docCollection = getCollectionState(collectionName);
assertNotNull(docCollection);
assertEquals("Expecting 2 shards", 2, docCollection.getSlices().size());
- assertEquals("Expecting 4 relpicas per shard", 8, docCollection.getReplicas().size());
+ assertEquals("Expecting 4 replicas per shard", 8, docCollection.getReplicas().size());
assertEquals(
"Expecting 8 tlog replicas, 4 per shard",
8,
@@ -242,7 +242,7 @@ public class TestTlogReplica extends SolrCloudTestCase {
CollectionAdminRequest.reloadCollection(collectionName)
.process(cluster.getSolrClient());
assertEquals(0, response.getStatus());
- waitForState("failed waiting for active colletion", collectionName, clusterShape(2, 8));
+ waitForState("failed waiting for active collection", collectionName, clusterShape(2, 8));
reloaded = true;
}
}
@@ -494,12 +494,12 @@ public class TestTlogReplica extends SolrCloudTestCase {
int maxAttempts = 3;
for (int i = 0; i < maxAttempts; i++) {
try {
- CollectionAdminResponse respone =
+ CollectionAdminResponse response =
CollectionAdminRequest.addReplicaToShard(collectionName, "shard1", Replica.Type.TLOG)
.process(cluster.getSolrClient());
// This is an unfortunate hack. There are cases where the ADDREPLICA fails, will create a
// Jira to address that separately. for now, we'll retry
- if (respone.isSuccess()) {
+ if (response.isSuccess()) {
break;
}
log.error("Unsuccessful attempt to add replica. Attempt: {}/{}", i, maxAttempts);
@@ -643,7 +643,7 @@ public class TestTlogReplica extends SolrCloudTestCase {
// non-leader replicas, since we haven't opened a new searcher on the leader yet
// timeout for stale collection state
- waitForNumDocsInAllReplicas(4, getNonLeaderReplias(collectionName), 10);
+ waitForNumDocsInAllReplicas(4, getNonLeaderReplicas(collectionName), 10);
// If I add the doc immediately, the leader fails to communicate with the follower with broken
// pipe. Options are, wait or retry...
@@ -668,7 +668,7 @@ public class TestTlogReplica extends SolrCloudTestCase {
solrRunner.start();
waitForState("Replica didn't recover", collectionName, activeReplicaCount(0, 2, 0));
// timeout for stale collection state
- waitForNumDocsInAllReplicas(5, getNonLeaderReplias(collectionName), 10);
+ waitForNumDocsInAllReplicas(5, getNonLeaderReplicas(collectionName), 10);
checkRTG(3, 7, cluster.getJettySolrRunners());
cluster.getSolrClient().commit(collectionName);
@@ -717,7 +717,7 @@ public class TestTlogReplica extends SolrCloudTestCase {
}
}
- private List<Replica> getNonLeaderReplias(String collectionName) {
+ private List<Replica> getNonLeaderReplicas(String collectionName) {
return getCollectionState(collectionName).getReplicas().stream()
.filter((r) -> !r.getBool("leader", false))
.collect(Collectors.toList());
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestTolerantUpdateProcessorCloud.java b/solr/core/src/test/org/apache/solr/cloud/TestTolerantUpdateProcessorCloud.java
index a6d3befcd1e..b90bdd3b7ce 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestTolerantUpdateProcessorCloud.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestTolerantUpdateProcessorCloud.java
@@ -162,7 +162,7 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {
fail("unexpected shard: " + shardName);
}
}
- assertEquals("Should be exactly one server left (nost hosting either shard)", 1, urlMap.size());
+ assertEquals("Should be exactly one server left (not hosting either shard)", 1, urlMap.size());
NO_COLLECTION_CLIENT =
getHttpSolrClient(urlMap.values().iterator().next() + "/" + COLLECTION_NAME + "/");
@@ -273,7 +273,7 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {
400,
e.code());
- // verify malformed deleteByQuerys fail
+ // verify malformed deleteByQuery's fail
e =
expectThrows(
SolrException.class,
@@ -453,7 +453,7 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {
assertQueryDocIds(client, false, docId1);
assertQueryDocIds(client, true, docId2);
- // mix 2 deleteByQuery, one malformed (fail), one that alctaully removes some docs (ok)
+ // mix 2 deleteByQuery, one malformed (fail), one that actually removes some docs (ok)
assertQueryDocIds(client, true, docId2);
rsp =
update(
@@ -668,7 +668,7 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {
// clean slate
assertEquals(0, client.deleteByQuery("*:*").getStatus());
- // many docs from diff shards, more then 10 (total) should fail
+ // many docs from diff shards, more than 10 (total) should fail
SolrException e =
expectThrows(
SolrException.class,
@@ -694,8 +694,8 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {
doc(f("id", S_TWO_PRE + "28"), f("foo_i", "bogus_val")),
doc(f("id", S_ONE_PRE + "19"), f("foo_i", "bogus_val")),
doc(f("id", S_TWO_PRE + "29"), f("foo_i", "bogus_val")),
- doc(f("id", S_ONE_PRE + "10")), // may be skipped, more then 10 fails
- doc(f("id", S_TWO_PRE + "20")) // may be skipped, more then 10 fails
+ doc(f("id", S_ONE_PRE + "10")), // may be skipped, more than 10 fails
+ doc(f("id", S_TWO_PRE + "20")) // may be skipped, more than 10 fails
)
.process(client));
{
@@ -709,7 +709,7 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {
400,
e.code());
- // verify that the Exceptions metadata can tell us what failed.
+ // verify that the Exceptions' metadata can tell us what failed.
NamedList<String> remoteErrMetadata = e.getMetadata();
assertNotNull("no metadata in: " + e.toString(), remoteErrMetadata);
Set<ToleratedUpdateError> actualKnownErrs =
@@ -776,7 +776,7 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {
// clean slate
assertEquals(0, client.deleteByQuery("*:*").getStatus());
- // many docs from diff shards, more then 10 from a single shard (two) should fail
+ // many docs from diff shards, more than 10 from a single shard (two) should fail
e =
expectThrows(
@@ -792,8 +792,8 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {
docs.add(doc(f("id", S_ONE_PRE + i)));
docs.add(doc(f("id", S_TWO_PRE + i), f("foo_i", "bogus_val")));
}
- docs.add(doc(f("id", S_ONE_PRE + "x"))); // may be skipped, more then 10 fails
- docs.add(doc(f("id", S_TWO_PRE + "x"))); // may be skipped, more then 10 fails
+ docs.add(doc(f("id", S_ONE_PRE + "x"))); // may be skipped, more than 10 fails
+ docs.add(doc(f("id", S_TWO_PRE + "x"))); // may be skipped, more than 10 fails
update(
params("update.chain", "tolerant-chain-max-errors-10", "commit", "true"),
@@ -812,7 +812,7 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {
400,
e.code());
- // verify that the Exceptions metadata can tell us what failed.
+ // verify that the Exceptions' metadata can tell us what failed.
NamedList<String> remoteErrMetadata = e.getMetadata();
assertNotNull("no metadata in: " + e.toString(), remoteErrMetadata);
Set<ToleratedUpdateError> actualKnownErrs =
@@ -886,12 +886,12 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {
// clean slate
assertEquals(0, client.deleteByQuery("*:*").getStatus());
- // many docs from diff shards, more then 10 don't have any uniqueKey specified
+ // many docs from diff shards, more than 10 don't have any uniqueKey specified
e =
expectThrows(
SolrException.class,
- "did not get a top level exception when more then 10 docs mising uniqueKey",
+ "did not get a top level exception when more then 10 docs missing uniqueKey",
() -> {
ArrayList<SolrInputDocument> docs = new ArrayList<SolrInputDocument>(30);
docs.add(doc(f("id", S_ONE_PRE + "z")));
@@ -902,8 +902,8 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {
// no "id" field
docs.add(doc(f("foo_i", "" + i)));
}
- docs.add(doc(f("id", S_ONE_PRE + "x"))); // may be skipped, more then 10 fails
- docs.add(doc(f("id", S_TWO_PRE + "x"))); // may be skipped, more then 10 fails
+ docs.add(doc(f("id", S_ONE_PRE + "x"))); // may be skipped, more than 10 fails
+ docs.add(doc(f("id", S_TWO_PRE + "x"))); // may be skipped, more than 10 fails
update(
params("update.chain", "tolerant-chain-max-errors-10", "commit", "true"),
@@ -922,7 +922,7 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {
400,
e.code());
- // verify that the Exceptions metadata can tell us what failed.
+ // verify that the Exceptions' metadata can tell us what failed.
NamedList<String> remoteErrMetadata = e.getMetadata();
assertNotNull("no metadata in: " + e.toString(), remoteErrMetadata);
int actualKnownErrsCount = 0;
@@ -955,7 +955,7 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {
// clean slate
assertEquals(0, client.deleteByQuery("*:*").getStatus());
- // many docs from diff shards, more then 10 from a single shard (two) should fail but
+ // many docs from diff shards, more than 10 from a single shard (two) should fail but
// request should still succeed because of maxErrors=-1 param
ArrayList<SolrInputDocument> docs = new ArrayList<SolrInputDocument>(30);
@@ -1115,7 +1115,7 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {
// on a single node setup -- a 5xx type error isn't something we should have triggered
400 == e.code() || 409 == e.code());
- // verify that the Exceptions metadata can tell us what failed.
+ // verify that the Exceptions' metadata can tell us what failed.
NamedList<String> remoteErrMetadata = e.getMetadata();
assertNotNull("no metadata in: " + e.toString(), remoteErrMetadata);
Set<ToleratedUpdateError> actualKnownErrs =
@@ -1192,7 +1192,7 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {
String message = err.get("message");
assertNotNull(assertErrPre + " ... null message", message);
- // inefficient scan, but good nough for the size of sets we're dealing with
+ // inefficient scan, but good enough for the size of sets we're dealing with
boolean found = false;
for (ExpectedErr expected : expectedErrs) {
if (expected.type.equals(type)
@@ -1206,7 +1206,7 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {
}
}
- /** convinience method when the only type of errors you expect are 'add' errors */
+ /** convenience method when the only type of errors you expect are 'add' errors */
public static void assertUpdateTolerantAddErrors(
String assertionMsgPrefix, UpdateResponse response, String... errorIdsExpected) {
ExpectedErr[] expected = new ExpectedErr[errorIdsExpected.length];
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestTolerantUpdateProcessorRandomCloud.java b/solr/core/src/test/org/apache/solr/cloud/TestTolerantUpdateProcessorRandomCloud.java
index 740b3f565cc..e3923e2812e 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestTolerantUpdateProcessorRandomCloud.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestTolerantUpdateProcessorRandomCloud.java
@@ -160,13 +160,13 @@ public class TestTolerantUpdateProcessorRandomCloud extends SolrCloudTestCase {
final int numCmds = TestUtil.nextInt(random(), 1, 20);
final List<ExpectedErr> expectedErrors = new ArrayList<ExpectedErr>(numCmds);
int expectedErrorsCount = 0;
- // it's ambigious/confusing which order mixed DELQ + ADD (or ADD and DELI for the same ID)
+ // it's ambiguous/confusing which order mixed DELQ + ADD (or ADD and DELI for the same ID)
// in the same request wll be processed by various clients, so we keep things simple
- // and ensure that no single doc Id is affected by more then one command in the same request
+ // and ensure that no single doc id is affected by more than one command in the same request
final BitSet docsAffectedThisRequest = new BitSet(maxDocId + 1);
for (int cmdIter = 0; cmdIter < numCmds; cmdIter++) {
if ((maxDocId / 2) < docsAffectedThisRequest.cardinality()) {
- // we're already mucking with more then half the docs in the index
+ // we're already mucking with more than half the docs in the index
break;
}
@@ -220,12 +220,12 @@ public class TestTolerantUpdateProcessorRandomCloud extends SolrCloudTestCase {
final String q;
if (causeError) {
// even though our DBQ is gibberish that's going to fail, record a docId as affected
- // so that we don't generate the same random DBQ and get redundent errors
+ // so that we don't generate the same random DBQ and get redundant errors
// (problematic because of how DUP forwarded DBQs have to have their errors deduped by
// TUP)
final int id_i = randomUnsetBit(random(), docsAffectedThisRequest, maxDocId);
docsAffectedThisRequest.set(id_i);
- q = "foo_i:[" + id_i + " TO ....giberish";
+ q = "foo_i:[" + id_i + " TO ....gibberish";
expectedErrors.add(delQErr(q));
} else {
// ensure our DBQ is only over a range of docs not already affected
@@ -363,7 +363,7 @@ public class TestTolerantUpdateProcessorRandomCloud extends SolrCloudTestCase {
final int hi = bits.nextClearBit(candidate);
if (lo < 0 && max < hi) {
fail(
- "how the hell did we not short circut out? card="
+ "how the hell did we not short circuit out? card="
+ bits.cardinality()
+ "/size="
+ bits.size());
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestWaitForStateWithJettyShutdowns.java b/solr/core/src/test/org/apache/solr/cloud/TestWaitForStateWithJettyShutdowns.java
index 645e2625559..5b95a5e3f74 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestWaitForStateWithJettyShutdowns.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestWaitForStateWithJettyShutdowns.java
@@ -57,10 +57,10 @@ public class TestWaitForStateWithJettyShutdowns extends SolrTestCaseJ4 {
log.info("Wait to confirm our node is fully shutdown");
cluster.waitForJettyToStop(nodeToStop);
- // now that we're confident that node has stoped, check if a waitForState
+ // now that we're confident that node has stopped, check if a waitForState
// call will detect the missing replica -- shouldn't need long wait times (we know it's
// down)...
- log.info("Now check if waitForState will recognize we already have the exepcted state");
+ log.info("Now check if waitForState will recognize we already have the expected state");
cluster
.getZkStateReader()
.waitForState(col_name, 500, TimeUnit.MILLISECONDS, clusterShape(1, 0));
@@ -90,10 +90,10 @@ public class TestWaitForStateWithJettyShutdowns extends SolrTestCaseJ4 {
// HACK implementation detail...
//
// we know that in the current implementation, waitForState invokes the predicate twice
- // independently of the current state of the collection and/or wether the predicate succeeds.
+ // independently of the current state of the collection and/or whether the predicate succeeds.
// If this implementation detail changes, (ie: so that it's only invoked once) then this
- // number needs to change -- but the test fundementally depends on the implementation calling
- // the predicate at least once, which should also be neccessary for any future impl (to verify
+ // number needs to change -- but the test fundamentally depends on the implementation calling
+ // the predicate at least once, which should also be necessary for any future impl (to verify
// that it didn't "miss" the state change when creating the watcher)
final CountDownLatch latch = new CountDownLatch(2);
@@ -127,7 +127,7 @@ public class TestWaitForStateWithJettyShutdowns extends SolrTestCaseJ4 {
log.info("Wait to confirm our node is fully shutdown");
cluster.waitForJettyToStop(nodeToStop);
- // now that we're confident that node has stoped, check if a waitForState
+ // now that we're confident that node has stopped, check if a waitForState
// call will detect the missing replica -- shouldn't need long wait times...
log.info("Checking Future result to see if waitForState finished successfully");
try {
diff --git a/solr/core/src/test/org/apache/solr/cloud/TriLevelCompositeIdRoutingTest.java b/solr/core/src/test/org/apache/solr/cloud/TriLevelCompositeIdRoutingTest.java
index 915018a4e9d..0fc06a07610 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TriLevelCompositeIdRoutingTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TriLevelCompositeIdRoutingTest.java
@@ -44,7 +44,7 @@ public class TriLevelCompositeIdRoutingTest extends ShardRoutingTest {
// TODO: we use an fs based dir because something
// like a ram dir will not recover correctly right now
// because tran log will still exist on restart and ram
- // dir will not persist - perhaps translog can empty on
+ // dir will not persist - perhaps transaction log can empty on
// start if using an EphemeralDirectoryFactory
useFactory(null);
}
@@ -118,7 +118,7 @@ public class TriLevelCompositeIdRoutingTest extends ShardRoutingTest {
actualUniqueKeys.addAll(uniqueKeysInShard);
}
- // foreach uniqueKey, extract it's route prefix and confirm those aren't spread across
+ // foreach uniqueKey, extract its route prefix and confirm those aren't spread across
// multiple shards
for (String uniqueKey : uniqueKeysInShard) {
final String routePrefix = uniqueKey.substring(0, uniqueKey.lastIndexOf('!'));
diff --git a/solr/core/src/test/org/apache/solr/cloud/TrollingIndexReaderFactory.java b/solr/core/src/test/org/apache/solr/cloud/TrollingIndexReaderFactory.java
index 615f67aea31..86c479acf35 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TrollingIndexReaderFactory.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TrollingIndexReaderFactory.java
@@ -124,7 +124,7 @@ public class TrollingIndexReaderFactory extends StandardIndexReaderFactory {
return setTrap(
new Trap() {
- private boolean trigered;
+ private boolean triggered;
@Override
protected boolean shouldExit() {
@@ -133,7 +133,7 @@ public class TrollingIndexReaderFactory extends StandardIndexReaderFactory {
StackTraceElement[] stackTrace = e.getStackTrace();
for (StackTraceElement trace : stackTrace) {
if (judge.test(trace)) {
- trigered = true;
+ triggered = true;
recordStackTrace(stackTrace);
onCaught.run();
return true;
@@ -144,7 +144,7 @@ public class TrollingIndexReaderFactory extends StandardIndexReaderFactory {
@Override
public boolean hasCaught() {
- return trigered;
+ return triggered;
}
@Override
@@ -165,7 +165,7 @@ public class TrollingIndexReaderFactory extends StandardIndexReaderFactory {
return "" + count.get() + "th tick of " + boundary + " allowed";
}
- private boolean trigered;
+ private boolean triggered;
@Override
protected boolean shouldExit() {
@@ -177,14 +177,14 @@ public class TrollingIndexReaderFactory extends StandardIndexReaderFactory {
Exception e = new Exception("stack sniffer");
e.fillInStackTrace();
recordStackTrace(e.getStackTrace());
- trigered = true;
+ triggered = true;
}
return trigger;
}
@Override
public boolean hasCaught() {
- return trigered;
+ return triggered;
}
});
}
@@ -199,7 +199,7 @@ public class TrollingIndexReaderFactory extends StandardIndexReaderFactory {
stack.add(stackTrace[l]);
}
lastStacktraces.add(stack);
- // triming queue
+ // trimming queue
while (lastStacktraces.size() > maxTraces) {
try {
lastStacktraces.poll(100, TimeUnit.MILLISECONDS);
diff --git a/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java b/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java
index cdfb9c4a153..640bb9531d8 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java
@@ -211,8 +211,8 @@ public class ZkControllerTest extends SolrTestCaseJ4 {
/*
This test asserts that if zkController.publishAndWaitForDownStates uses only core name to check if all local
cores are down then the method will return immediately but if it uses coreNodeName (as it does after SOLR-6665 then
- the method will timeout).
- We setup the cluster state in such a way that two replicas with same core name exist on non-existent nodes
+ the method will time out).
+ We set up the cluster state in such a way that two replicas with same core name exist on non-existent nodes
and core container also has a dummy core that has the same core name. The publishAndWaitForDownStates before SOLR-6665
would only check the core names and therefore return immediately but after SOLR-6665 it should time out.
*/
diff --git a/solr/core/src/test/org/apache/solr/cloud/ZkDistributedLockTest.java b/solr/core/src/test/org/apache/solr/cloud/ZkDistributedLockTest.java
index 87dffae8d82..a28c56f2ed0 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ZkDistributedLockTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ZkDistributedLockTest.java
@@ -34,7 +34,7 @@ public class ZkDistributedLockTest extends SolrTestCaseJ4 {
static final int TIMEOUT = 10000;
/**
- * Tests the obtention of a single read or write lock at a specific hierarchical level, for
+ * Tests the obtaining of a single read or write lock at a specific hierarchical level, for
* distributed Collection API locking as well as distributed Config Set API locking.<br>
* Tests the logic with a single thread, then tests multithreaded wait for lock acquire works.
* Tests grouped to pay setup only once.
@@ -101,7 +101,7 @@ public class ZkDistributedLockTest extends SolrTestCaseJ4 {
collRL4.isAcquired());
// Collection is write locked by collWL3 and collRL4 read lock waiting behind. Now moving to
- // request shard level locks. These are totally independent from the Collection level locks so
+ // request shard level locks. These are totally independent of the Collection level locks so
// should see no impact.
DistributedLock shardWL5 =
factory.createLock(
@@ -173,7 +173,7 @@ public class ZkDistributedLockTest extends SolrTestCaseJ4 {
new Thread(
() -> {
writeLock.waitUntilAcquired();
- // countDown() will not be called if waitUntilAcquired() threw exception of any kind
+ // countDown() will not be called if waitUntilAcquired() threw any kind of exception
latch.countDown();
})
.start();
@@ -260,7 +260,7 @@ public class ZkDistributedLockTest extends SolrTestCaseJ4 {
new Thread(
() -> {
configSetWL1.waitUntilAcquired();
- // countDown() will not be called if waitUntilAcquired() threw exception of any kind
+ // countDown() will not be called if waitUntilAcquired() threw any kind of exception
latch.countDown();
})
.start();
diff --git a/solr/core/src/test/org/apache/solr/cloud/ZkFailoverTest.java b/solr/core/src/test/org/apache/solr/cloud/ZkFailoverTest.java
index 0f04dd34d71..b295b4f097a 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ZkFailoverTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ZkFailoverTest.java
@@ -52,7 +52,7 @@ public class ZkFailoverTest extends SolrCloudTestCase {
cluster.getSolrClient().add(coll, new SolrInputDocument("id", "1"));
zkTestServer = cluster.getZkServer();
- // This attempt will fail since it will timeout after 1 second
+ // This attempt will fail since it will time out after 1 second
System.setProperty("waitForZk", "1");
restartSolrAndZk();
waitForLiveNodes(0);
diff --git a/solr/core/src/test/org/apache/solr/cloud/ZkSolrClientTest.java b/solr/core/src/test/org/apache/solr/cloud/ZkSolrClientTest.java
index 95758a639ac..61d3b71bce6 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ZkSolrClientTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ZkSolrClientTest.java
@@ -214,7 +214,7 @@ public class ZkSolrClientTest extends SolrTestCaseJ4 {
}
}
- public void testZkCmdExectutor() throws Exception {
+ public void testZkCmdExecutor() throws Exception {
Path zkDir = createTempDir("zkData");
ZkTestServer server = null;
diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/CollectionApiLockingTest.java b/solr/core/src/test/org/apache/solr/cloud/api/collections/CollectionApiLockingTest.java
index 8eb2d9f383f..04e55e2ffa6 100644
--- a/solr/core/src/test/org/apache/solr/cloud/api/collections/CollectionApiLockingTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/api/collections/CollectionApiLockingTest.java
@@ -169,7 +169,7 @@ public class CollectionApiLockingTest extends SolrTestCaseJ4 {
new Thread(
() -> {
replicaShard1Lock.waitUntilAcquired();
- // countDown() will not be called if waitUntilAcquired() threw exception of any kind
+ // countDown() will not be called if waitUntilAcquired() threw any kind of exception
latch.countDown();
})
.start();
diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/ShardSplitTest.java b/solr/core/src/test/org/apache/solr/cloud/api/collections/ShardSplitTest.java
index 96e8dc1d6fa..94a2c7d9a6b 100644
--- a/solr/core/src/test/org/apache/solr/cloud/api/collections/ShardSplitTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/api/collections/ShardSplitTest.java
@@ -221,7 +221,7 @@ public class ShardSplitTest extends BasicDistributedZkTest {
// add a new replica for the sub-shard
CollectionAdminRequest.AddReplica addReplica =
CollectionAdminRequest.addReplicaToShard(collectionName, SHARD1_0);
- // use control client because less chances of it being the node being restarted
+ // use control client because there are fewer chances of it being the node being restarted
// this is to avoid flakiness of test because of NoHttpResponseExceptions
String control_collection =
client
@@ -362,7 +362,7 @@ public class ShardSplitTest extends BasicDistributedZkTest {
Slice shard11 = collection.getSlice(SHARD1_1);
assertNull(shard11);
- // lets retry the split
+ // let's retry the split
TestInjection.reset(); // let the split succeed
try {
CollectionAdminRequest.SplitShard splitShard =
@@ -556,7 +556,7 @@ public class ShardSplitTest extends BasicDistributedZkTest {
e);
}
- // we don't care if the split failed because we are injecting faults and it is likely
+ // we don't care if the split failed because we are injecting faults, and it is likely
// that the split has failed but in any case we want to assert that all docs that got
// indexed are available in SolrCloud and if the split succeeded then all replicas of the
// sub-shard must be consistent (i.e. have same numdocs)
diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/SplitByPrefixTest.java b/solr/core/src/test/org/apache/solr/cloud/api/collections/SplitByPrefixTest.java
index 20a5982ad61..311d3934227 100644
--- a/solr/core/src/test/org/apache/solr/cloud/api/collections/SplitByPrefixTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/api/collections/SplitByPrefixTest.java
@@ -170,7 +170,7 @@ public class SplitByPrefixTest extends SolrCloudTestCase {
List<Prefix> prefixes = findPrefixes(20, 0, 0x00ffffff);
List<Prefix> uniquePrefixes = removeDups(prefixes);
- // make it an even sized list so we can split it exactly in two
+ // make it an even sized list, so we can split it exactly in two
if (uniquePrefixes.size() % 2 == 1) {
uniquePrefixes.remove(uniquePrefixes.size() - 1);
}
@@ -196,7 +196,7 @@ public class SplitByPrefixTest extends SolrCloudTestCase {
activeClusterShape(3, 5));
// OK, now let's check that the correct split point was chosen
- // We can use the router to find the shards for the middle prefixes and they should be
+ // We can use the router to find the shards for the middle prefixes, and they should be
// different.
DocCollection collection = client.getClusterState().getCollection(COLLECTION_NAME);
@@ -218,7 +218,7 @@ public class SplitByPrefixTest extends SolrCloudTestCase {
assertTrue(slice1 != slice2);
//
- // now lets add enough documents to the first prefix to get it split out on its own
+ // now let's add enough documents to the first prefix to get it split out on its own
//
for (int i = 0; i < uniquePrefixes.size(); i++) {
client.add(getDoc(uniquePrefixes.get(0).key, "doc" + (i + 100)));
diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/TestCollectionsAPIViaSolrCloudCluster.java b/solr/core/src/test/org/apache/solr/cloud/api/collections/TestCollectionsAPIViaSolrCloudCluster.java
index cf11cdd84e1..7511b8dfe14 100644
--- a/solr/core/src/test/org/apache/solr/cloud/api/collections/TestCollectionsAPIViaSolrCloudCluster.java
+++ b/solr/core/src/test/org/apache/solr/cloud/api/collections/TestCollectionsAPIViaSolrCloudCluster.java
@@ -193,7 +193,7 @@ public class TestCollectionsAPIViaSolrCloudCluster extends SolrCloudTestCase {
// create collection
createCollection(collectionName, CollectionHandlingUtils.CREATE_NODE_SET_EMPTY);
- // check the collection's corelessness
+ // check the collection has no cores.
int coreCount = 0;
DocCollection docCollection = client.getClusterState().getCollection(collectionName);
for (Map.Entry<String, Slice> entry : docCollection.getSlicesMap().entrySet()) {
diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/TestLocalFSCloudBackupRestore.java b/solr/core/src/test/org/apache/solr/cloud/api/collections/TestLocalFSCloudBackupRestore.java
index e63fe247e82..6fbe9e8ee7f 100644
--- a/solr/core/src/test/org/apache/solr/cloud/api/collections/TestLocalFSCloudBackupRestore.java
+++ b/solr/core/src/test/org/apache/solr/cloud/api/collections/TestLocalFSCloudBackupRestore.java
@@ -47,11 +47,11 @@ public class TestLocalFSCloudBackupRestore extends AbstractCloudBackupRestoreTes
@BeforeClass
public static void setupClass() throws Exception {
String solrXml = MiniSolrCloudCluster.DEFAULT_CLOUD_SOLR_XML;
- String poisioned =
+ String poisoned =
" <repository name=\""
- + TestLocalFSCloudBackupRestore.poisioned
+ + TestLocalFSCloudBackupRestore.poisoned
+ "\" default=\"true\" "
- + "class=\"org.apache.solr.cloud.api.collections.TestLocalFSCloudBackupRestore$PoinsionedRepository\"> \n"
+ + "class=\"org.apache.solr.cloud.api.collections.TestLocalFSCloudBackupRestore$PoisonedRepository\"> \n"
+ " </repository>\n";
String local =
" <repository name=\"local\" "
@@ -61,7 +61,7 @@ public class TestLocalFSCloudBackupRestore extends AbstractCloudBackupRestoreTes
solrXml.replace(
"</solr>",
"<backup>"
- + (random().nextBoolean() ? poisioned + local : local + poisioned)
+ + (random().nextBoolean() ? poisoned + local : local + poisoned)
+ "</backup>"
+ "</solr>");
@@ -112,69 +112,69 @@ public class TestLocalFSCloudBackupRestore extends AbstractCloudBackupRestoreTes
errorBackup(solrClient);
- erroRestore(solrClient);
+ errorRestore(solrClient);
}
- private void erroRestore(CloudSolrClient solrClient) throws SolrServerException, IOException {
+ private void errorRestore(CloudSolrClient solrClient) throws SolrServerException, IOException {
String backupName = BACKUPNAME_PREFIX + testSuffix;
CollectionAdminRequest.Restore restore =
CollectionAdminRequest.restoreCollection(getCollectionName() + "boo", backupName)
.setLocation(backupLocation);
if (random().nextBoolean()) {
- restore.setRepositoryName(poisioned);
+ restore.setRepositoryName(poisoned);
}
try {
restore.process(solrClient);
- fail("This request should have failed since omitting repo, picks up default poisioned.");
+ fail("This request should have failed since omitting repo, picks up default poisoned.");
} catch (SolrException ex) {
assertEquals(ErrorCode.SERVER_ERROR.code, ex.code());
- assertTrue(ex.getMessage(), ex.getMessage().contains(poisioned));
+ assertTrue(ex.getMessage(), ex.getMessage().contains(poisoned));
}
}
private void errorBackup(CloudSolrClient solrClient) throws SolrServerException, IOException {
CollectionAdminRequest.Backup backup =
- CollectionAdminRequest.backupCollection(getCollectionName(), "poisionedbackup")
+ CollectionAdminRequest.backupCollection(getCollectionName(), "poisonedbackup")
.setLocation(getBackupLocation());
if (random().nextBoolean()) {
- backup.setRepositoryName(poisioned);
- } // otherwise we hit default
+ backup.setRepositoryName(poisoned);
+ } // otherwise, we hit default
try {
backup.process(solrClient);
- fail("This request should have failed since omitting repo, picks up default poisioned.");
+ fail("This request should have failed since omitting repo, picks up default poisoned.");
} catch (SolrException ex) {
assertEquals(ErrorCode.SERVER_ERROR.code, ex.code());
}
}
- private static final String poisioned = "poisioned";
+ private static final String poisoned = "poisoned";
// let it go through collection handler, and break only when real thing is doing:
// Restore/BackupCore
- public static class PoinsionedRepository extends LocalFileSystemRepository {
+ public static class PoisonedRepository extends LocalFileSystemRepository {
- public PoinsionedRepository() {
+ public PoisonedRepository() {
super();
}
@Override
public void copyFileFrom(Directory sourceDir, String fileName, URI dest) {
- throw new UnsupportedOperationException(poisioned);
+ throw new UnsupportedOperationException(poisoned);
}
@Override
public void copyFileTo(URI sourceDir, String fileName, Directory dest) {
- throw new UnsupportedOperationException(poisioned);
+ throw new UnsupportedOperationException(poisoned);
}
@Override
public IndexInput openInput(URI dirPath, String fileName, IOContext ctx) throws IOException {
- throw new UnsupportedOperationException(poisioned);
+ throw new UnsupportedOperationException(poisoned);
}
@Override
public OutputStream createOutput(URI path) {
- throw new UnsupportedOperationException(poisioned);
+ throw new UnsupportedOperationException(poisoned);
}
}
}
diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/TestReplicaProperties.java b/solr/core/src/test/org/apache/solr/cloud/api/collections/TestReplicaProperties.java
index e0eb34d19c0..656597aa549 100644
--- a/solr/core/src/test/org/apache/solr/cloud/api/collections/TestReplicaProperties.java
+++ b/solr/core/src/test/org/apache/solr/cloud/api/collections/TestReplicaProperties.java
@@ -50,12 +50,12 @@ public class TestReplicaProperties extends ReplicaPropertiesBase {
try (CloudSolrClient client = createCloudClient(null)) {
// Mix up a bunch of different combinations of shards and replicas in order to exercise
- // boundary cases. shards, replicationfactor
+ // boundary cases. shards, replicationFactor
int shards = random().nextInt(7);
if (shards < 2) shards = 2;
- int rFactor = random().nextInt(4);
- if (rFactor < 2) rFactor = 2;
- createCollection(null, COLLECTION_NAME, shards, rFactor, client, null, "conf1");
+ int replicationFactor = random().nextInt(4);
+ if (replicationFactor < 2) replicationFactor = 2;
+ createCollection(null, COLLECTION_NAME, shards, replicationFactor, client, null, "conf1");
}
waitForCollection(ZkStateReader.from(cloudClient), COLLECTION_NAME, 2);
diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/TestRequestStatusCollectionAPI.java b/solr/core/src/test/org/apache/solr/cloud/api/collections/TestRequestStatusCollectionAPI.java
index 8c0ab26d078..fdcd9e34fee 100644
--- a/solr/core/src/test/org/apache/solr/cloud/api/collections/TestRequestStatusCollectionAPI.java
+++ b/solr/core/src/test/org/apache/solr/cloud/api/collections/TestRequestStatusCollectionAPI.java
@@ -119,7 +119,7 @@ public class TestRequestStatusCollectionAPI extends BasicDistributedZkTest {
}
assertEquals("found [1001] in completed tasks", message);
- // create * 2 + preprecovery *2 + split + req_apply_upd * 2 =7
+ // create * 2 + preprecovery * 2 + split + req_apply_upd * 2 = 7
assertEquals(
"expecting " + (2 + 2 + 1 + 2) + " shard responses at " + splitResponse,
(2 + 2 + 1 + 2),
diff --git a/solr/core/src/test/org/apache/solr/cluster/placement/Builders.java b/solr/core/src/test/org/apache/solr/cluster/placement/Builders.java
index 4ef38be3e43..764957703dc 100644
--- a/solr/core/src/test/org/apache/solr/cluster/placement/Builders.java
+++ b/solr/core/src/test/org/apache/solr/cluster/placement/Builders.java
@@ -265,16 +265,16 @@ public class Builders {
for (String replicaNode : replicasOnNodes) {
// replicaNode is like "TLOG 2" meaning a TLOG replica should be placed on node 2
- String[] splited = replicaNode.split("\\s+");
- Assert.assertEquals(2, splited.length);
- Replica.ReplicaType type = Replica.ReplicaType.valueOf(splited[0]);
+ String[] split = replicaNode.split("\\s+");
+ Assert.assertEquals(2, split.length);
+ Replica.ReplicaType type = Replica.ReplicaType.valueOf(split[0]);
final NodeBuilder node;
- int nodeIndex = Integer.parseInt(splited[1]);
+ int nodeIndex = Integer.parseInt(split[1]);
if (nodeIndex < liveNodes.size()) {
node = liveNodes.get(nodeIndex);
} else {
- // The collection can have replicas on non live nodes. Let's create such a node here
- // (that is not known to the cluster). There could be many non live nodes in the
+ // The collection can have replicas on non-live nodes. Let's create such a node here
+ // (that is not known to the cluster). There could be many non-live nodes in the
// collection configuration, they will all reference new instances such as below of a
// node unknown to cluster, but all will have the same name (so will be equal if
// tested).
@@ -309,7 +309,7 @@ public class Builders {
/**
* Initializes shard and replica builders for the collection based on passed parameters.
- * Replicas are assigned round robin to the nodes. The shard leader is the first NRT replica of
+ * Replicas are assigned round-robin to the nodes. The shard leader is the first NRT replica of
* each shard (or first TLOG is no NRT). Shard and replica configuration can be modified
* afterwards, the returned builder hierarchy is a convenient starting point.
*
@@ -331,7 +331,7 @@ public class Builders {
/**
* Initializes shard and replica builders for the collection based on passed parameters.
- * Replicas are assigned round robin to the nodes. The shard leader is the first NRT replica of
+ * Replicas are assigned round-robin to the nodes. The shard leader is the first NRT replica of
* each shard (or first TLOG is no NRT). Shard and replica configuration can be modified
* afterwards, the returned builder hierarchy is a convenient starting point.
*
diff --git a/solr/core/src/test/org/apache/solr/cluster/placement/plugins/AffinityPlacementFactoryTest.java b/solr/core/src/test/org/apache/solr/cluster/placement/plugins/AffinityPlacementFactoryTest.java
index 37e4cf10365..4d0c8c70cd6 100644
--- a/solr/core/src/test/org/apache/solr/cluster/placement/plugins/AffinityPlacementFactoryTest.java
+++ b/solr/core/src/test/org/apache/solr/cluster/placement/plugins/AffinityPlacementFactoryTest.java
@@ -76,12 +76,12 @@ public class AffinityPlacementFactoryTest extends SolrTestCaseJ4 {
}
/**
- * When this test places a replica for a new collection, it should pick the node with less cores.
+ * When this test places a replica for a new collection, it should pick the node with fewer cores.
*
* <p>
*
- * <p>When it places a replica for an existing collection, it should pick the node with less cores
- * that doesn't already have a replica for the shard.
+ * <p>When it places a replica for an existing collection, it should pick the node with fewer
+ * cores that doesn't already have a replica for the shard.
*/
private void testBasicPlacementInternal(boolean hasExistingCollection) throws Exception {
String collectionName = "basicCollection";
@@ -292,7 +292,7 @@ public class AffinityPlacementFactoryTest extends SolrTestCaseJ4 {
// Cluster nodes and their attributes.
// 3 AZ's with three nodes each, 2 of which can only take NRT, one that can take TLOG or PULL
- // One of the NRT has less cores than the other
+ // One of the NRT has fewer cores than the other
// The TLOG/PULL replica on AZ1 doesn't have much free disk space
Builders.ClusterBuilder clusterBuilder = Builders.newClusterBuilder().initializeLiveNodes(9);
LinkedList<Builders.NodeBuilder> nodeBuilders = clusterBuilder.getLiveNodeBuilders();
@@ -356,10 +356,10 @@ public class AffinityPlacementFactoryTest extends SolrTestCaseJ4 {
PlacementPlan pp =
plugin.computePlacement(placementRequest, clusterBuilder.buildPlacementContext());
// Shard 1: The NRT's should go to the med cores node on AZ2 and low core on az3 (even though a
- // low core node can take the replica in az1, there's already an NRT replica there and we want
+ // low core node can take the replica in az1, there's already an NRT replica there, and we want
// spreading across AZ's), the TLOG to the TLOG node on AZ2 (because the tlog node on AZ1 has
// low free disk)
- // Shard 2: The NRT's should go to AZ1 and AZ3 lowcores because AZ2 has more cores (and there's
+ // Shard 2: The NRT's should go to AZ1 and AZ3 low cores because AZ2 has more cores (and there's
// not NRT in any AZ for this shard). The TLOG should go to AZ3 because AZ1 TLOG node has low
// free disk. Each expected placement is represented as a string "shard replica-type node"
Set<String> expectedPlacements =
@@ -493,12 +493,12 @@ public class AffinityPlacementFactoryTest extends SolrTestCaseJ4 {
plugin.computePlacement(placementRequest, clusterBuilder.buildPlacementContext());
// Each expected placement is represented as a string "shard replica-type node"
- // Node 0 has less cores than node 1 (0 vs 1) so the placement should go there.
+ // Node 0 has fewer cores than node 1 (0 vs 1) so the placement should go there.
Set<String> expectedPlacements = Set.of("1 PULL 0");
verifyPlacements(expectedPlacements, pp, collectionBuilder.getShardBuilders(), liveNodes);
// If we placed instead a replica for shard 2 (starting with the same initial cluster state, not
- // including the first placement above), it should go too to node 0 since it has less cores...
+ // including the first placement above), it should go too to node 0 since it has fewer cores...
Iterator<Shard> it = solrCollection.iterator();
it.next(); // skip first shard to do placement for the second one...
placementRequest =
diff --git a/solr/core/src/test/org/apache/solr/core/BlobRepositoryCloudTest.java b/solr/core/src/test/org/apache/solr/core/BlobRepositoryCloudTest.java
index c3c7d50625c..bc05f99488f 100644
--- a/solr/core/src/test/org/apache/solr/core/BlobRepositoryCloudTest.java
+++ b/solr/core/src/test/org/apache/solr/core/BlobRepositoryCloudTest.java
@@ -49,7 +49,7 @@ public class BlobRepositoryCloudTest extends SolrCloudTestCase {
HashMap<String, String> params = new HashMap<>();
CollectionAdminRequest.createCollection(CollectionAdminParams.SYSTEM_COLL, null, 1, 1)
.process(cluster.getSolrClient());
- // test component will fail if it cant' find a blob with this data by this name
+ // test component will fail if it can't find a blob with this data by this name
TestBlobHandler.postData(
cluster.getSolrClient(),
findLiveNodeURI(),
diff --git a/solr/core/src/test/org/apache/solr/core/CoreSorterTest.java b/solr/core/src/test/org/apache/solr/core/CoreSorterTest.java
index af00381528d..ad54a09fbc5 100644
--- a/solr/core/src/test/org/apache/solr/core/CoreSorterTest.java
+++ b/solr/core/src/test/org/apache/solr/core/CoreSorterTest.java
@@ -91,7 +91,7 @@ public class CoreSorterTest extends SolrTestCaseJ4 {
// compute nodes, some live, some down
final int maxNodesOfAType =
- perShardCounts.stream() // not too important how many we have, but lets have plenty
+ perShardCounts.stream() // not too important how many we have, but let's have plenty
.mapToInt(c -> c.totalReplicasInLiveNodes + c.totalReplicasInDownNodes + c.myReplicas)
.max()
.getAsInt();
diff --git a/solr/core/src/test/org/apache/solr/core/DirectoryFactoriesTest.java b/solr/core/src/test/org/apache/solr/core/DirectoryFactoriesTest.java
index d13bf40cbc4..f3a9bc5da50 100644
--- a/solr/core/src/test/org/apache/solr/core/DirectoryFactoriesTest.java
+++ b/solr/core/src/test/org/apache/solr/core/DirectoryFactoriesTest.java
@@ -27,7 +27,7 @@ import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.common.util.NamedList;
/**
- * Test some expected equivilencies of all DirectoryFactory implementations.
+ * Test some expected equivalencies of all DirectoryFactory implementations.
*
* <p>TODO: test more methods besides exists(String)
*/
@@ -43,7 +43,7 @@ public class DirectoryFactoriesTest extends SolrTestCaseJ4 {
StandardDirectoryFactory.class);
/* Test that MockDirectoryFactory's exist method behaves consistent w/other impls */
- public void testExistsEquivilence() throws Exception {
+ public void testExistsEquivalence() throws Exception {
// TODO: ideally we'd init all of these using DirectoryFactory.loadDirectoryFactory() ...
// ...but the scaffolding needed for dealing with the CoreContainer/SolrConfig is a PITA
@@ -57,7 +57,7 @@ public class DirectoryFactoriesTest extends SolrTestCaseJ4 {
DirectoryFactory dirFac = null;
try {
dirFac = clazz.getConstructor().newInstance();
- dirFac.initCoreContainer(null); // greybox testing directly against path
+ dirFac.initCoreContainer(null); // grey box testing directly against path
dirFac.init(new NamedList<>());
assertFalse(path + " should not exist yet", dirFac.exists(path));
diff --git a/solr/core/src/test/org/apache/solr/core/ExitableDirectoryReaderTest.java b/solr/core/src/test/org/apache/solr/core/ExitableDirectoryReaderTest.java
index 210f3ff9e48..2493dd6d3a1 100644
--- a/solr/core/src/test/org/apache/solr/core/ExitableDirectoryReaderTest.java
+++ b/solr/core/src/test/org/apache/solr/core/ExitableDirectoryReaderTest.java
@@ -27,7 +27,7 @@ import org.junit.BeforeClass;
import org.junit.Test;
/**
- * Test that checks that long running queries are exited by Solr using the SolrQueryTimeoutImpl
+ * Test that checks that long-running queries are exited by Solr using the SolrQueryTimeoutImpl
* implementation.
*/
public class ExitableDirectoryReaderTest extends SolrTestCaseJ4 {
@@ -113,7 +113,7 @@ public class ExitableDirectoryReaderTest extends SolrTestCaseJ4 {
.getGauge();
long qrInserts = (long) queryCacheStats.getValue().get("inserts");
- // This gets 0 docs back. Use 10000 instead of 1 for timeAllowed and it gets 100 back and the
+ // This gets 0 docs back. Use 10000 instead of 1 for timeAllowed, and it gets 100 back and the
// for loop below succeeds.
String response =
JQ(req("q", "*:*", "fq", fq, "indent", "true", "timeAllowed", "1", "sleep", sleep));
diff --git a/solr/core/src/test/org/apache/solr/core/PluginInfoTest.java b/solr/core/src/test/org/apache/solr/core/PluginInfoTest.java
index df2555af218..57e63a7984b 100644
--- a/solr/core/src/test/org/apache/solr/core/PluginInfoTest.java
+++ b/solr/core/src/test/org/apache/solr/core/PluginInfoTest.java
@@ -24,7 +24,7 @@ import org.w3c.dom.Node;
/**
* TestCase for PluginInfo. Extends DOMUtilTestBase because PluginInfo heavily depends on DOMUtil
- * and the convinient {@link #getNode(String, String)} method.
+ * and the convenient {@link #getNode(String, String)} method.
*/
public class PluginInfoTest extends DOMUtilTestBase {
diff --git a/solr/core/src/test/org/apache/solr/core/QueryResultKeyTest.java b/solr/core/src/test/org/apache/solr/core/QueryResultKeyTest.java
index a194af74166..d766c5d8837 100644
--- a/solr/core/src/test/org/apache/solr/core/QueryResultKeyTest.java
+++ b/solr/core/src/test/org/apache/solr/core/QueryResultKeyTest.java
@@ -123,7 +123,7 @@ public class QueryResultKeyTest extends SolrTestCaseJ4 {
int[] numsB = smallArrayOfRandomNumbers();
QueryResultKey aa = new QueryResultKey(base, buildFiltersFromNumbers(numsA), null, 0);
QueryResultKey bb = new QueryResultKey(base, buildFiltersFromNumbers(numsB), null, 0);
- // now that we have our keys, sort the numbers so we know what to expect
+ // now that we have our keys, sort the numbers, so we know what to expect
Arrays.sort(numsA);
Arrays.sort(numsB);
if (Arrays.equals(numsA, numsB)) {
diff --git a/solr/core/src/test/org/apache/solr/core/RAMDirectoryFactoryTest.java b/solr/core/src/test/org/apache/solr/core/RAMDirectoryFactoryTest.java
index 862cfd2ac95..6547cf48659 100644
--- a/solr/core/src/test/org/apache/solr/core/RAMDirectoryFactoryTest.java
+++ b/solr/core/src/test/org/apache/solr/core/RAMDirectoryFactoryTest.java
@@ -59,7 +59,7 @@ public class RAMDirectoryFactoryTest extends SolrTestCase {
Directory dir =
factory.get("/fake/path", DirContext.DEFAULT, DirectoryFactory.LOCK_TYPE_SINGLE);
assertNotNull(
- "RAMDirectoryFactory should create RefCntRamDirectory even if the path doen't lead "
+ "RAMDirectoryFactory should create RefCntRamDirectory even if the path doesn't lead "
+ "to index directory on the file system",
dir);
factory.release(dir);
diff --git a/solr/core/src/test/org/apache/solr/core/ResourceLoaderTest.java b/solr/core/src/test/org/apache/solr/core/ResourceLoaderTest.java
index aa2f3dee9a3..c6b520cd851 100644
--- a/solr/core/src/test/org/apache/solr/core/ResourceLoaderTest.java
+++ b/solr/core/src/test/org/apache/solr/core/ResourceLoaderTest.java
@@ -225,7 +225,7 @@ public class ResourceLoaderTest extends SolrTestCaseJ4 {
// check "lib/aLibFile"
assertNotNull(loader.getClassLoader().getResource("aLibFile"));
- // add inidividual jars from other paths
+ // add individual jars from other paths
loader.addToClassLoader(
Collections.singletonList(otherLib.resolve("jar2.jar").toUri().toURL()));
diff --git a/solr/core/src/test/org/apache/solr/core/SOLR749Test.java b/solr/core/src/test/org/apache/solr/core/SOLR749Test.java
index 72013c2ae4c..cdc5e63dbd4 100644
--- a/solr/core/src/test/org/apache/solr/core/SOLR749Test.java
+++ b/solr/core/src/test/org/apache/solr/core/SOLR749Test.java
@@ -24,7 +24,7 @@ import org.junit.BeforeClass;
/**
* This class started life as a test for SOLR-749 to prove that value source plugins were properly
- * intialized, but it has since evolved to also help prove that ValueSource's are not asked to
+ * initialized, but it has since evolved to also help prove that ValueSource's are not asked to
* compute values for documents unnecessarily.
*
* @see CountUsageValueSourceParser
@@ -146,7 +146,7 @@ public class SOLR749Test extends SolrTestCaseJ4 {
assertQ(
"query matching 20 -> 10 -> 5 docs; two non-cached queries",
req(
- // match 20. the below IDs have alternating even/odd pairings so as to test possible
+ // match 20. the below IDs have alternating even/odd pairings to test possible
// sequencing of evaluation
"q", "{!notfoo cache=false}id_i1:[20 TO 39]",
// match 10 (subset of above)
diff --git a/solr/core/src/test/org/apache/solr/core/TestBackupRepositoryFactory.java b/solr/core/src/test/org/apache/solr/core/TestBackupRepositoryFactory.java
index e4e2827c274..ab3ed2903ca 100644
--- a/solr/core/src/test/org/apache/solr/core/TestBackupRepositoryFactory.java
+++ b/solr/core/src/test/org/apache/solr/core/TestBackupRepositoryFactory.java
@@ -107,7 +107,7 @@ public class TestBackupRepositoryFactory extends SolrTestCaseJ4 {
}
@Test
- public void testNonExistantBackupRepository() {
+ public void testNonExistentBackupRepository() {
PluginInfo[] plugins = new PluginInfo[0];
BackupRepositoryFactory f = new BackupRepositoryFactory(plugins);
diff --git a/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java b/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java
index 846b2658a14..92dfea8d642 100644
--- a/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java
+++ b/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java
@@ -144,7 +144,7 @@ public class TestCoreDiscovery extends SolrTestCaseJ4 {
public void after() throws Exception {}
// Test the basic setup, create some dirs with core.properties files in them, but solr.xml has
- // discoverCores set and insure that we find all the cores and can load them.
+ // discoverCores set and ensure that we find all the cores and can load them.
@Test
@SuppressWarnings({"try"})
public void testDiscovery() throws Exception {
@@ -280,7 +280,7 @@ public class TestCoreDiscovery extends SolrTestCaseJ4 {
"Failed corep4 should not have left a core.properties file around",
Files.exists(corePropFile));
- // Finally, just for yucks, let's determine that a this create path also leaves a prop file.
+ // Finally, let's determine that this create path operation also leaves a prop file.
corePropFile = Paths.get(solrHomeDirectory.toString(), "corep5", "core.properties");
assertFalse("Should not be a properties file yet for corep5", Files.exists(corePropFile));
@@ -295,18 +295,19 @@ public class TestCoreDiscovery extends SolrTestCaseJ4 {
}
}
- // Insure that if the number of transient cores that are loaded on startup is greater than the
+ // Ensure that if the number of transient cores that are loaded on startup is greater than the
// cache size that Solr "does the right thing". Which means
// 1> stop loading cores after transient cache size is reached, in this case that magic number is
// 3 one non-transient and two transient.
// 2> still loads cores as time passes.
//
- // This seems like a silly test, but it hangs forever on 4.10 so let's guard against it in future.
+ // This seems like a silly test, but it hangs forever on 4.10 so let's guard against it in the
+ // future.
// The behavior has gone away with the removal of the complexity around the old-style solr.xml
// files.
//
// NOTE: The order that cores are loaded depends upon how the core discovery is traversed. I don't
- // think we can make the test depend on that order, so after load just insure that the cores
+ // think we can make the test depend on that order, so after load just ensure that the cores
// counts are correct.
@Test
@@ -485,7 +486,7 @@ public class TestCoreDiscovery extends SolrTestCaseJ4 {
makeCoreProperties("core1", false, true),
new File(coreDir, "core1" + File.separator + CorePropertiesLocator.PROPERTIES_FILENAME));
- // Insure that another core is opened successfully
+ // Ensure that another core is opened successfully
addCoreWithProps(
makeCoreProperties("core2", false, false, "dataDir=core2"),
new File(coreDir, "core2" + File.separator + CorePropertiesLocator.PROPERTIES_FILENAME));
diff --git a/solr/core/src/test/org/apache/solr/core/TestCustomStream.java b/solr/core/src/test/org/apache/solr/core/TestCustomStream.java
index e4570801f2f..96fc61f165f 100644
--- a/solr/core/src/test/org/apache/solr/core/TestCustomStream.java
+++ b/solr/core/src/test/org/apache/solr/core/TestCustomStream.java
@@ -22,7 +22,6 @@ import org.apache.solr.cloud.AbstractFullDistribZkTestBase;
import org.apache.solr.util.RestTestHarness;
import org.junit.Test;
-/** Created by caomanhdat on 6/3/16. */
public class TestCustomStream extends AbstractFullDistribZkTestBase {
@Test
diff --git a/solr/core/src/test/org/apache/solr/core/TestJmxIntegration.java b/solr/core/src/test/org/apache/solr/core/TestJmxIntegration.java
index 51584066525..a68a1d49b6b 100644
--- a/solr/core/src/test/org/apache/solr/core/TestJmxIntegration.java
+++ b/solr/core/src/test/org/apache/solr/core/TestJmxIntegration.java
@@ -60,7 +60,7 @@ public class TestJmxIntegration extends SolrTestCaseJ4 {
// Make sure that at least one MBeanServer is available
// prior to initializing the core
//
- // (test configs are setup to use existing server if any,
+ // (test configs are set up to use existing server if any,
// otherwise skip JMX)
newMbeanServer = MBeanServerFactory.createMBeanServer();
@@ -85,7 +85,7 @@ public class TestJmxIntegration extends SolrTestCaseJ4 {
// NOTE: we can't guarantee that "mbeanServer == platformServer"
// the JVM may have multiple MBean servers running when the test started
// and the contract of not specifying one when configuring solr.xml without
- // agetnId or serviceUrl is that it will use whatever the "first" MBean server
+ // agentId or serviceUrl is that it will use whatever the "first" MBean server
// returned by the JVM is.
nameFactory = new JmxObjectNameFactory("default", registryName);
@@ -133,7 +133,7 @@ public class TestJmxIntegration extends SolrTestCaseJ4 {
Object trash = mbeanServer.getAttribute(o.getObjectName(), attr.getName());
} catch (javax.management.AttributeNotFoundException e) {
throw new RuntimeException(
- "Unable to featch attribute for " + o.getObjectName() + ": " + attr.getName(), e);
+ "Unable to fetch attribute for " + o.getObjectName() + ": " + attr.getName(), e);
}
}
}
diff --git a/solr/core/src/test/org/apache/solr/core/TestLazyCores.java b/solr/core/src/test/org/apache/solr/core/TestLazyCores.java
index 3fc69232cd8..3ad37aa9cc2 100644
--- a/solr/core/src/test/org/apache/solr/core/TestLazyCores.java
+++ b/solr/core/src/test/org/apache/solr/core/TestLazyCores.java
@@ -215,7 +215,7 @@ public class TestLazyCores extends SolrTestCaseJ4 {
checkSearch(core4);
- // Now just insure that the normal searching on "collection1" finds _0_ on the same query that
+ // Now just ensure that the normal searching on "collection1" finds _0_ on the same query that
// found _2_ above. Use of makeReq above and req below is tricky, very tricky.
SolrCore collection1 = cc.getCore("collection1");
assertQ(
@@ -572,9 +572,9 @@ public class TestLazyCores extends SolrTestCaseJ4 {
// Test that transient cores
// 1> produce errors as appropriate when the config or schema files are foo'd
- // 2> "self heal". That is, if the problem is corrected can the core be reloaded and used?
+ // 2> "self-heal". That is, if the problem is corrected can the core be reloaded and used?
// 3> that OK cores can be searched even when some cores failed to load.
- // 4> that having no solr.xml entry for transient chache handler correctly uses the default.
+ // 4> that having no solr.xml entry for transient cache handler correctly uses the default.
@Test
public void testBadConfigsGenerateErrors() throws Exception {
final CoreContainer cc =
@@ -617,7 +617,7 @@ public class TestLazyCores extends SolrTestCaseJ4 {
copyGoodConf("badSchema1", "schema-tiny.xml", "schema.xml");
copyGoodConf("badSchema2", "schema-tiny.xml", "schema.xml");
- // Reload the cores and insure that
+ // Reload the cores and ensure that
// 1> they pick up the new configs
// 2> they don't fail again b/c they still have entries in loadFailure in core container.
cc.reload("badConfig1");
@@ -704,7 +704,7 @@ public class TestLazyCores extends SolrTestCaseJ4 {
FileUtils.writeStringToFile(new File(subHome, "schema.xml"), schema, StandardCharsets.UTF_8);
}
- // Write out the cores' config files, both bad schema files, bad config files as well as some good
+ // Write out the cores' config files, both bad schema files, bad config files and some good
// cores.
private CoreContainer initGoodAndBad(
List<String> goodCores, List<String> badSchemaCores, List<String> badConfigCores)
@@ -778,7 +778,7 @@ public class TestLazyCores extends SolrTestCaseJ4 {
if (ok) {
if (failures.size() != 0) {
- fail("Should have cleared the error, but there are failues " + failures.toString());
+ fail("Should have cleared the error, but there are failures " + failures.toString());
}
} else {
if (failures.size() == 0) {
@@ -965,7 +965,7 @@ public class TestLazyCores extends SolrTestCaseJ4 {
}
}
- // Insure that when a core is evicted from the transient cache, any uncommitted docs are
+ // Ensure that when a core is evicted from the transient cache, any uncommitted docs are
// preserved. Note, this needs FS-based indexes to persist! Cores 2, 3, 6, 7, 8, 9 are transient
@Test
public void testNoCommit() throws Exception {
@@ -996,8 +996,8 @@ public class TestLazyCores extends SolrTestCaseJ4 {
int notLoadedCoreCount = 0;
List<SolrCore> openCores = new ArrayList<>();
for (String coreName : transientCoreNames) {
- // The point of this test is to insure that when cores are evicted and re-opened
- // that the docs are there, so insure that the core we're testing is gone, gone, gone.
+ // The point of this test is to ensure that when cores are evicted and re-opened
+ // that the docs are there, so ensure that the core we're testing is gone, gone, gone.
if (!loadedCoreNames.contains(coreName)) {
notLoadedCoreCount++;
checkCoresNotLoaded(cc, coreName);
diff --git a/solr/core/src/test/org/apache/solr/core/TestQuerySenderListener.java b/solr/core/src/test/org/apache/solr/core/TestQuerySenderListener.java
index cade626afaa..a37ce82f4a5 100644
--- a/solr/core/src/test/org/apache/solr/core/TestQuerySenderListener.java
+++ b/solr/core/src/test/org/apache/solr/core/TestQuerySenderListener.java
@@ -30,7 +30,7 @@ public class TestQuerySenderListener extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeClass() throws Exception {
- // record current value prior to core initialization
+ // record current value prior to core initialization,
// so we can verify the correct number of instances later
// NOTE: this won't work properly if concurrent tests run
// in the same VM
diff --git a/solr/core/src/test/org/apache/solr/core/TestQuerySenderNoQuery.java b/solr/core/src/test/org/apache/solr/core/TestQuerySenderNoQuery.java
index 9609fb315af..abd00224cf0 100644
--- a/solr/core/src/test/org/apache/solr/core/TestQuerySenderNoQuery.java
+++ b/solr/core/src/test/org/apache/solr/core/TestQuerySenderNoQuery.java
@@ -30,7 +30,7 @@ public class TestQuerySenderNoQuery extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeClass() throws Exception {
- // record current value prior to core initialization
+ // record current value prior to core initialization,
// so we can verify the correct number of instances later
// NOTE: this won't work properly if concurrent tests run
// in the same VM
diff --git a/solr/core/src/test/org/apache/solr/core/TestXIncludeConfig.java b/solr/core/src/test/org/apache/solr/core/TestXIncludeConfig.java
index e6c6559730a..6c9002fd534 100644
--- a/solr/core/src/test/org/apache/solr/core/TestXIncludeConfig.java
+++ b/solr/core/src/test/org/apache/solr/core/TestXIncludeConfig.java
@@ -24,7 +24,7 @@ import org.apache.solr.update.processor.UpdateRequestProcessorChain;
import org.junit.Assume;
import org.junit.BeforeClass;
-/** Test both XInclude as well as more old school "entity includes" */
+/** Test both XInclude and old school "entity includes" */
public class TestXIncludeConfig extends SolrTestCaseJ4 {
@BeforeClass
@@ -52,7 +52,7 @@ public class TestXIncludeConfig extends SolrTestCaseJ4 {
UpdateRequestProcessorChain chain = core.getUpdateProcessingChain("special-include");
assertNotNull("chain is missing included processor", chain);
- assertEquals("chain with inclued processor is wrong size", 1, chain.getProcessors().size());
+ assertEquals("chain with included processor is wrong size", 1, chain.getProcessors().size());
assertEquals(
"chain has wrong included processor",
RegexReplaceProcessorFactory.class,
diff --git a/solr/core/src/test/org/apache/solr/core/snapshots/TestSolrCloudSnapshots.java b/solr/core/src/test/org/apache/solr/core/snapshots/TestSolrCloudSnapshots.java
index 4d8bfeda690..e50d3b8caf9 100644
--- a/solr/core/src/test/org/apache/solr/core/snapshots/TestSolrCloudSnapshots.java
+++ b/solr/core/src/test/org/apache/solr/core/snapshots/TestSolrCloudSnapshots.java
@@ -59,7 +59,7 @@ import org.slf4j.LoggerFactory;
*/
// Backups do checksum validation against a footer value not present in 'SimpleText'
@LuceneTestCase.SuppressCodecs({"SimpleText"})
-@SolrTestCaseJ4.SuppressSSL // Currently unknown why SSL does not work with this test
+@SolrTestCaseJ4.SuppressSSL // Currently, unknown why SSL does not work with this test
@Slow
public class TestSolrCloudSnapshots extends SolrCloudTestCase {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@@ -208,7 +208,7 @@ public class TestSolrCloudSnapshots extends SolrCloudTestCase {
CollectionAdminRequest.restoreCollection(restoreCollectionName, backupName)
.setLocation(backupLocation);
// if (replicaFailures) {
- // // In this case one of the Solr servers would be down. Hence we need to increase
+ // // In this case one of the Solr servers would be down. Hence, we need to increase
// // max_shards_per_node property for restore command to succeed.
// restore.setMaxShardsPerNode(2);
// }
@@ -258,7 +258,7 @@ public class TestSolrCloudSnapshots extends SolrCloudTestCase {
CollectionAdminRequest.deleteReplica(
collectionName, replicaToDelete.getShardId(), r.getName());
delReplica.process(solrClient);
- // The replica deletion will cleanup the snapshot meta-data.
+ // The replica deletion will clean up the snapshot meta-data.
snapshotByCoreName.remove(r.getCoreName());
break;
}
diff --git a/solr/core/src/test/org/apache/solr/core/snapshots/TestSolrCoreSnapshots.java b/solr/core/src/test/org/apache/solr/core/snapshots/TestSolrCoreSnapshots.java
index bc9bd222aab..c40cc43804b 100644
--- a/solr/core/src/test/org/apache/solr/core/snapshots/TestSolrCoreSnapshots.java
+++ b/solr/core/src/test/org/apache/solr/core/snapshots/TestSolrCoreSnapshots.java
@@ -65,7 +65,7 @@ import org.slf4j.LoggerFactory;
*/
// Backups do checksum validation against a footer value not present in 'SimpleText'
@LuceneTestCase.SuppressCodecs({"SimpleText"})
-@SolrTestCaseJ4.SuppressSSL // Currently unknown why SSL does not work with this test
+@SolrTestCaseJ4.SuppressSSL // Currently, unknown why SSL does not work with this test
@Slow
public class TestSolrCoreSnapshots extends SolrCloudTestCase {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@@ -158,8 +158,8 @@ public class TestSolrCoreSnapshots extends SolrCloudTestCase {
}
// Verify that the old index directory (before restore) contains only those index commits
- // referred by snapshots. The IndexWriter (used to cleanup index files) creates an additional
- // commit during closing. Hence we expect 2 commits (instead of 1).
+ // referred by snapshots. The IndexWriter (used to clean up index files) creates an additional
+ // commit during closing. Hence, we expect 2 commits (instead of 1).
{
List<IndexCommit> commits = listCommits(metaData.getIndexDirPath());
assertEquals(2, commits.size());
@@ -178,7 +178,7 @@ public class TestSolrCoreSnapshots extends SolrCloudTestCase {
// Verify that corresponding index files have been deleted. Ideally this directory should
// be removed immediately. But the current DirectoryFactory impl waits until the
// closing the core (or the directoryFactory) for actual removal. Since the IndexWriter
- // (used to cleanup index files) creates an additional commit during closing, we expect a
+ // (used to clean up index files) creates an additional commit during closing, we expect a
// single commit (instead of 0).
assertEquals(1, listCommits(duplicateCommit.getIndexDirPath()).size());
}
diff --git a/solr/core/src/test/org/apache/solr/filestore/TestDistribPackageStore.java b/solr/core/src/test/org/apache/solr/filestore/TestDistribPackageStore.java
index 0f7bbee6b69..859a9ade421 100644
--- a/solr/core/src/test/org/apache/solr/filestore/TestDistribPackageStore.java
+++ b/solr/core/src/test/org/apache/solr/filestore/TestDistribPackageStore.java
@@ -284,7 +284,7 @@ public class TestDistribPackageStore extends SolrCloudTestCase {
return Objects.equals(val, v);
};
Object actual = rsp._get(key, null);
- // Important: check all of the values, not just the first one
+ // Important: check all the values, not just the first one
passed = passed && p.test(actual);
if (!passed && i >= repeats - 1) {
String description = Utils.toJSONString(rsp);
diff --git a/solr/core/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java
index 3deab0bdd8c..23ef3c5bdee 100644
--- a/solr/core/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java
@@ -134,7 +134,7 @@ public class DocumentAnalysisRequestHandlerTest extends AnalysisRequestHandlerTe
}
// This test should also test charset detection in UpdateRequestHandler,
- // but the DocumentAnalysisRequestHandler is simplier to use/check.
+ // but the DocumentAnalysisRequestHandler is simpler to use/check.
@Test
public void testCharsetInDocument() throws Exception {
final byte[] xmlBytes =
@@ -168,7 +168,7 @@ public class DocumentAnalysisRequestHandlerTest extends AnalysisRequestHandlerTe
}
// This test should also test charset detection in UpdateRequestHandler,
- // but the DocumentAnalysisRequestHandler is simplier to use/check.
+ // but the DocumentAnalysisRequestHandler is simpler to use/check.
@Test
public void testCharsetOutsideDocument() throws Exception {
final byte[] xmlBytes =
diff --git a/solr/core/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java
index eca1e32e9aa..b1d0f6731b1 100644
--- a/solr/core/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java
@@ -116,7 +116,7 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB
assertFalse(request.isShowMatch());
req.close();
- // testing overide of query value using analysis.query param
+ // testing override of query value using analysis.query param
params.add(AnalysisParams.QUERY, "quick lazy");
req = new LocalSolrQueryRequest(h.getCore(), params);
request = handler.resolveAnalysisRequest(req);
@@ -208,7 +208,7 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB
@SuppressWarnings({"rawtypes"})
List<NamedList> tokenList =
indexPart.get("org.apache.lucene.analysis.standard.StandardTokenizer");
- assertNotNull("Expcting StandardTokenizer analysis breakdown", tokenList);
+ assertNotNull("Expecting StandardTokenizer analysis breakdown", tokenList);
assertEquals(tokenList.size(), 10);
assertToken(
tokenList.get(0),
@@ -274,7 +274,7 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB
tokenList.get(9),
new TokenInfo("dogs", null, "<ALPHANUM>", 45, 49, 10, new int[] {10, 10}, null, false));
tokenList = indexPart.get("org.apache.lucene.analysis.core.StopFilter");
- assertNotNull("Expcting StopFilter analysis breakdown", tokenList);
+ assertNotNull("Expecting StopFilter analysis breakdown", tokenList);
assertEquals(tokenList.size(), 8);
assertToken(
tokenList.get(0),
@@ -301,7 +301,7 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB
tokenList.get(7),
new TokenInfo("dogs", null, "<ALPHANUM>", 45, 49, 10, new int[] {10, 10, 10}, null, false));
tokenList = indexPart.get("org.apache.lucene.analysis.en.PorterStemFilter");
- assertNotNull("Expcting PorterStemFilter analysis breakdown", tokenList);
+ assertNotNull("Expecting PorterStemFilter analysis breakdown", tokenList);
assertEquals(tokenList.size(), 8);
assertToken(
tokenList.get(0),
@@ -346,7 +346,7 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB
tokenList.get(1),
new TokenInfo("brown", null, "<ALPHANUM>", 4, 9, 2, new int[] {2}, null, false));
tokenList = queryPart.get("org.apache.lucene.analysis.core.LowerCaseFilter");
- assertNotNull("Expcting LowerCaseFilter analysis breakdown", tokenList);
+ assertNotNull("Expecting LowerCaseFilter analysis breakdown", tokenList);
assertEquals(2, tokenList.size());
assertToken(
tokenList.get(0),
@@ -355,7 +355,7 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB
tokenList.get(1),
new TokenInfo("brown", null, "<ALPHANUM>", 4, 9, 2, new int[] {2, 2}, null, false));
tokenList = queryPart.get("org.apache.lucene.analysis.core.StopFilter");
- assertNotNull("Expcting StopFilter analysis breakdown", tokenList);
+ assertNotNull("Expecting StopFilter analysis breakdown", tokenList);
assertEquals(2, tokenList.size());
assertToken(
tokenList.get(0),
@@ -364,7 +364,7 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB
tokenList.get(1),
new TokenInfo("brown", null, "<ALPHANUM>", 4, 9, 2, new int[] {2, 2, 2}, null, false));
tokenList = queryPart.get("org.apache.lucene.analysis.en.PorterStemFilter");
- assertNotNull("Expcting PorterStemFilter analysis breakdown", tokenList);
+ assertNotNull("Expecting PorterStemFilter analysis breakdown", tokenList);
assertEquals(2, tokenList.size());
assertToken(
tokenList.get(0),
@@ -381,7 +381,7 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB
assertNotNull("expecting an index token analysis for field type 'nametext'", indexPart);
tokenList = indexPart.get("org.apache.lucene.analysis.core.WhitespaceTokenizer");
- assertNotNull("Expcting WhitespaceTokenizer analysis breakdown", tokenList);
+ assertNotNull("Expecting WhitespaceTokenizer analysis breakdown", tokenList);
assertEquals(10, tokenList.size());
assertToken(
tokenList.get(0), new TokenInfo("the", null, "word", 0, 3, 1, new int[] {1}, null, false));
@@ -576,7 +576,7 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB
@SuppressWarnings({"rawtypes"})
List<NamedList> tokenList = indexPart.get(MockTokenizer.class.getName());
- assertNotNull("Expcting MockTokenizer analysis breakdown", tokenList);
+ assertNotNull("Expecting MockTokenizer analysis breakdown", tokenList);
assertEquals(4, tokenList.size());
assertToken(
tokenList.get(0), new TokenInfo("hi,", null, "word", 0, 3, 1, new int[] {1}, null, false));
@@ -589,7 +589,7 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB
tokenList.get(3),
new TokenInfo("Test", null, "word", 14, 18, 4, new int[] {4}, null, false));
tokenList = indexPart.get("org.apache.lucene.analysis.miscellaneous.WordDelimiterGraphFilter");
- assertNotNull("Expcting WordDelimiterGraphFilter analysis breakdown", tokenList);
+ assertNotNull("Expecting WordDelimiterGraphFilter analysis breakdown", tokenList);
assertEquals(6, tokenList.size());
assertToken(
tokenList.get(0),
@@ -610,7 +610,7 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB
tokenList.get(5),
new TokenInfo("Test", null, "word", 14, 18, 5, new int[] {4, 5}, null, false));
tokenList = indexPart.get("org.apache.lucene.analysis.core.LowerCaseFilter");
- assertNotNull("Expcting LowerCaseFilter analysis breakdown", tokenList);
+ assertNotNull("Expecting LowerCaseFilter analysis breakdown", tokenList);
assertEquals(6, tokenList.size());
assertToken(
tokenList.get(0),
@@ -660,7 +660,7 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB
@SuppressWarnings({"rawtypes"})
List<NamedList> tokenList = indexPart.get(WhitespaceTokenizer.class.getName());
- assertNotNull("Expcting WhitespaceTokenizer analysis breakdown", tokenList);
+ assertNotNull("Expecting WhitespaceTokenizer analysis breakdown", tokenList);
assertEquals(tokenList.size(), 5);
assertToken(
tokenList.get(0), new TokenInfo("the", null, "word", 0, 3, 1, new int[] {1}, null, false));
@@ -677,7 +677,7 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB
tokenList.get(4),
new TokenInfo("dead", null, "word", 18, 22, 5, new int[] {5}, null, false));
tokenList = indexPart.get(CommonGramsFilter.class.getName());
- assertNotNull("Expcting CommonGramsFilter analysis breakdown", tokenList);
+ assertNotNull("Expecting CommonGramsFilter analysis breakdown", tokenList);
assertEquals(tokenList.size(), 9);
assertToken(
tokenList.get(0),
@@ -725,8 +725,8 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB
tokenList.get(3),
new TokenInfo("man", null, "word", 13, 16, 4, new int[] {4}, null, false));
tokenList = queryPart.get(CommonGramsQueryFilter.class.getName());
- assertNotNull("Expcting CommonGramsQueryFilter analysis breakdown", tokenList);
- // Hmmm... Not clear if "dead" should really be here, but it's what the filter currently
+ assertNotNull("Expecting CommonGramsQueryFilter analysis breakdown", tokenList);
+ // Hmm... Not clear if "dead" should really be here, but it's what the filter currently
// produces, see: LUCENE-10007
assertEquals(4, tokenList.size()); // LUCENE-10007
assertToken(
diff --git a/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.java b/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.java
index 2b420fff7b6..f2fe7e1e4e1 100644
--- a/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.java
@@ -213,7 +213,7 @@ public class JsonLoaderTest extends SolrTestCaseJ4 {
// list
checkFieldValueOrdering((pre + "'f':[45,67,89]" + post).replace('\'', '"'));
- // dup fieldname keys
+ // duplicate field name keys
checkFieldValueOrdering((pre + "'f':45,'f':67,'f':89" + post).replace('\'', '"'));
}
@@ -395,7 +395,7 @@ public class JsonLoaderTest extends SolrTestCaseJ4 {
SolrQueryRequest req;
SolrQueryResponse rsp;
BufferingRequestProcessor p;
- JsonLoader loader; // multichild test case
+ JsonLoader loader; // multiple children test case
final boolean array = random().nextBoolean();
StringBuilder b = new StringBuilder();
if (array) {
@@ -685,7 +685,7 @@ public class JsonLoaderTest extends SolrTestCaseJ4 {
"/response/docs/[0]=={'big_decimal_tf':[1.0E38]}");
}
- // The delete syntax was both extended for simplification in 4.0
+ // The delete operation syntax was extended for simplification in 4.0
@Test
public void testDeleteSyntax() throws Exception {
String str =
diff --git a/solr/core/src/test/org/apache/solr/handler/ReplicationTestHelper.java b/solr/core/src/test/org/apache/solr/handler/ReplicationTestHelper.java
index 94e1544c3c9..be3d63af15b 100644
--- a/solr/core/src/test/org/apache/solr/handler/ReplicationTestHelper.java
+++ b/solr/core/src/test/org/apache/solr/handler/ReplicationTestHelper.java
@@ -63,7 +63,7 @@ public final class ReplicationTestHelper {
public static HttpSolrClient createNewSolrClient(String baseUrl) {
try {
- // setup the client...
+ // set up the client...
HttpSolrClient client = SolrTestCaseJ4.getHttpSolrClient(baseUrl, 15000, 90000);
return client;
} catch (Exception ex) {
diff --git a/solr/core/src/test/org/apache/solr/handler/TestCSVLoader.java b/solr/core/src/test/org/apache/solr/handler/TestCSVLoader.java
index 09281ac545d..c24a17114c3 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestCSVLoader.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestCSVLoader.java
@@ -158,7 +158,7 @@ public class TestCSVLoader extends SolrTestCaseJ4 {
assertQ(req("id:100"), "//arr[@name='str_s']/str[.='quoted']");
assertQ(req("id:101"), "count(//str[@name='str_s'])=0");
// 102 is a quoted zero length field ,"", as opposed to ,,
- // but we can't distinguish this case (and it's debateable
+ // but we can't distinguish this case (and it's debatable
// if we should). Does CSV have a way to specify missing
// from zero-length?
assertQ(req("id:102"), "count(//str[@name='str_s'])=0");
diff --git a/solr/core/src/test/org/apache/solr/handler/TestContainerPlugin.java b/solr/core/src/test/org/apache/solr/handler/TestContainerPlugin.java
index 78bfae8aa1a..65ccb3b1109 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestContainerPlugin.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestContainerPlugin.java
@@ -260,7 +260,7 @@ public class TestContainerPlugin extends SolrCloudTestCase {
":result:packages:mypkg[0]:files[0]",
FILE1));
- // Now lets create a plugin using v1 jar file
+ // Now let's create a plugin using v1 jar file
PluginMeta plugin = new PluginMeta();
plugin.name = "myplugin";
plugin.klass = "mypkg:org.apache.solr.handler.MyPlugin";
diff --git a/solr/core/src/test/org/apache/solr/handler/TestHealthCheckHandlerLegacyMode.java b/solr/core/src/test/org/apache/solr/handler/TestHealthCheckHandlerLegacyMode.java
index 40077d2b3e2..aec31b231c2 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestHealthCheckHandlerLegacyMode.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestHealthCheckHandlerLegacyMode.java
@@ -35,7 +35,7 @@ import org.junit.Test;
/** Test for HealthCheckHandler in legacy mode */
@Slow
-@SuppressSSL // Currently unknown why SSL does not work with this test
+@SuppressSSL // Currently, unknown why SSL does not work with this test
public class TestHealthCheckHandlerLegacyMode extends SolrTestCaseJ4 {
HttpSolrClient leaderClientHealthCheck, followerClientHealthCheck;
JettySolrRunner leaderJetty, followerJetty;
diff --git a/solr/core/src/test/org/apache/solr/handler/TestIncrementalCoreBackup.java b/solr/core/src/test/org/apache/solr/handler/TestIncrementalCoreBackup.java
index 80c0d073b84..1c303a1f6c5 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestIncrementalCoreBackup.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestIncrementalCoreBackup.java
@@ -91,7 +91,8 @@ public class TestIncrementalCoreBackup extends SolrTestCaseJ4 {
public void testBackupBeforeFirstCommit() throws Exception {
- // even w/o a user sending any data, the SolrCore initialiation logic should have automatically
+ // even without a user sending any data, the SolrCore initialization logic should have
+ // automatically
// created an "empty" commit point that can be backed up...
final IndexCommit empty = h.getCore().getDeletionPolicy().getLatestCommit();
assertNotNull(empty);
@@ -99,7 +100,7 @@ public class TestIncrementalCoreBackup extends SolrTestCaseJ4 {
// white box sanity check that the commit point of the "reader" available from SolrIndexSearcher
// matches the commit point that IDPW claims is the "latest"
//
- // this is important to ensure that backup/snapshot behavior is consistent with user expection
+ // this is important to ensure that backup/snapshot behavior is consistent with user expectation
// when using typical commit + openSearcher
assertEquals(empty, h.getCore().withSearcher(s -> s.getIndexReader().getIndexCommit()));
@@ -130,7 +131,7 @@ public class TestIncrementalCoreBackup extends SolrTestCaseJ4 {
simpleBackupCheck(locationUri, firstShardBackup, initialEmptyIndexSegmentFileName);
}
- { // Empty (named) snapshot..
+ { // Empty (named) snapshot...
SolrQueryResponse resp = new SolrQueryResponse();
admin.handleRequestBody(
req(
@@ -147,7 +148,7 @@ public class TestIncrementalCoreBackup extends SolrTestCaseJ4 {
assertU(adoc("id", "1")); // uncommitted
final ShardBackupId secondShardBackupId = new ShardBackupId("shard1", new BackupId(1));
- { // second backup w/uncommited docs
+ { // second backup with uncommitted docs
SolrQueryResponse resp = new SolrQueryResponse();
admin.handleRequestBody(
req(
@@ -164,7 +165,7 @@ public class TestIncrementalCoreBackup extends SolrTestCaseJ4 {
simpleBackupCheck(locationUri, secondShardBackupId, initialEmptyIndexSegmentFileName);
}
- { // Second empty (named) snapshot..
+ { // Second empty (named) snapshot...
SolrQueryResponse resp = new SolrQueryResponse();
admin.handleRequestBody(
req(
diff --git a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
index 362202b50c7..dca20896995 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
@@ -83,7 +83,7 @@ import org.slf4j.LoggerFactory;
* @since 1.4
*/
@Slow
-@SuppressSSL // Currently unknown why SSL does not work with this test
+@SuppressSSL // Currently, unknown why SSL does not work with this test
public class TestReplicationHandler extends SolrTestCaseJ4 {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
diff --git a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java
index e42982272a5..afcf27d0f6d 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java
@@ -54,7 +54,7 @@ import org.slf4j.LoggerFactory;
// Backups do checksum validation against a footer value not present in 'SimpleText'
@LuceneTestCase.SuppressCodecs({"SimpleText"})
-@SolrTestCaseJ4.SuppressSSL // Currently unknown why SSL does not work with this test
+@SolrTestCaseJ4.SuppressSSL // Currently, unknown why SSL does not work with this test
public class TestReplicationHandlerBackup extends SolrJettyTestBase {
JettySolrRunner leaderJetty;
@@ -86,7 +86,7 @@ public class TestReplicationHandlerBackup extends SolrJettyTestBase {
private static SolrClient createNewSolrClient(int port) {
try {
- // setup the client...
+ // set up the client...
final String baseUrl = buildUrl(port, context);
HttpSolrClient client = getHttpSolrClient(baseUrl, 15000, 60000);
return client;
diff --git a/solr/core/src/test/org/apache/solr/handler/TestRequestId.java b/solr/core/src/test/org/apache/solr/handler/TestRequestId.java
index 264e65e5e7e..c29a0c35d70 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestRequestId.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestRequestId.java
@@ -45,14 +45,14 @@ public class TestRequestId extends SolrTestCaseJ4 {
try (LogListener reqLog = LogListener.info(SolrCore.class.getName() + ".Request")) {
- // Sanity check that the our MDC doesn't already have some sort of rid set in it
+ // Check that our MDC doesn't already have some sort of rid set in it
assertNull(MDC.get(CommonParams.REQUEST_ID));
// simple request that should successfully be logged ...
assertQ("xxx", req("q", "*:*", CommonParams.REQUEST_ID, "xxx"), "//*[@numFound='0']");
// Sanity check that the test framework didn't let our "request" MDC info "leak" out of
- // assertQ..
+ // assertQ...
assertNull(MDC.get(CommonParams.REQUEST_ID));
{
@@ -73,7 +73,7 @@ public class TestRequestId extends SolrTestCaseJ4 {
ErrorCode.BAD_REQUEST);
// Sanity check that the test framework didn't let our "request" MDC info "leak" out of
- // assertQEx..
+ // assertQEx...
assertNull(MDC.get(CommonParams.REQUEST_ID));
{
diff --git a/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.java b/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.java
index 983aad7058a..dae30ad4d5f 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.java
@@ -39,7 +39,7 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-@SolrTestCaseJ4.SuppressSSL // Currently unknown why SSL does not work with this test
+@SolrTestCaseJ4.SuppressSSL // Currently, unknown why SSL does not work with this test
// Backups do checksum validation against a footer value not present in 'SimpleText'
@LuceneTestCase.SuppressCodecs("SimpleText")
public class TestRestoreCore extends SolrJettyTestBase {
@@ -69,7 +69,7 @@ public class TestRestoreCore extends SolrJettyTestBase {
private static SolrClient createNewSolrClient(int port) {
try {
- // setup the client...
+ // set up the client...
final String baseUrl = buildUrl(port, context);
HttpSolrClient client = getHttpSolrClient(baseUrl, 15000, 60000);
return client;
@@ -219,7 +219,7 @@ public class TestRestoreCore extends SolrJettyTestBase {
final String backupDirName = backupStatus.waitForBackupSuccess(snapshotName, 30);
// Remove the segments_n file so that the backup index is corrupted.
- // Restore should fail and it should automatically rollback to the original index.
+ // Restore should fail, and it should automatically roll back to the original index.
final Path restoreIndexPath = Paths.get(location, backupDirName);
assertTrue("Does not exist: " + restoreIndexPath, Files.exists(restoreIndexPath));
try (DirectoryStream<Path> stream =
diff --git a/solr/core/src/test/org/apache/solr/handler/TestSnapshotCoreBackup.java b/solr/core/src/test/org/apache/solr/handler/TestSnapshotCoreBackup.java
index 4e440c84878..cb9a06b59ac 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestSnapshotCoreBackup.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestSnapshotCoreBackup.java
@@ -88,7 +88,8 @@ public class TestSnapshotCoreBackup extends SolrTestCaseJ4 {
public void testBackupBeforeFirstCommit() throws Exception {
- // even w/o a user sending any data, the SolrCore initialiation logic should have automatically
+ // even without a user sending any data, the SolrCore initialization logic should have
+ // automatically
// created an "empty" commit point that can be backed up...
final IndexCommit empty = h.getCore().getDeletionPolicy().getLatestCommit();
assertNotNull(empty);
@@ -96,7 +97,7 @@ public class TestSnapshotCoreBackup extends SolrTestCaseJ4 {
// white box sanity check that the commit point of the "reader" available from SolrIndexSearcher
// matches the commit point that IDPW claims is the "latest"
//
- // this is important to ensure that backup/snapshot behavior is consistent with user expection
+ // this is important to ensure that backup/snapshot behavior is consistent with user expectation
// when using typical commit + openSearcher
assertEquals(empty, h.getCore().withSearcher(s -> s.getIndexReader().getIndexCommit()));
@@ -130,7 +131,7 @@ public class TestSnapshotCoreBackup extends SolrTestCaseJ4 {
new File(backupDir, "snapshot.empty_backup1"), 0, initialEmptyIndexSegmentFileName);
}
- { // Empty (named) snapshot..
+ { // Empty (named) snapshot...
SolrQueryResponse resp = new SolrQueryResponse();
admin.handleRequestBody(
req(
@@ -146,7 +147,7 @@ public class TestSnapshotCoreBackup extends SolrTestCaseJ4 {
assertU(adoc("id", "1")); // uncommitted
- { // second backup w/uncommited docs
+ { // second backup with uncommitted docs
SolrQueryResponse resp = new SolrQueryResponse();
admin.handleRequestBody(
req(
@@ -166,7 +167,7 @@ public class TestSnapshotCoreBackup extends SolrTestCaseJ4 {
new File(backupDir, "snapshot.empty_backup2"), 0, initialEmptyIndexSegmentFileName);
}
- { // Second empty (named) snapshot..
+ { // Second empty (named) snapshot...
SolrQueryResponse resp = new SolrQueryResponse();
admin.handleRequestBody(
req(
@@ -372,7 +373,7 @@ public class TestSnapshotCoreBackup extends SolrTestCaseJ4 {
/**
* A simple sanity check that asserts the current weird behavior of
* DirectoryReader.openIfChanged() and demos how 'softCommit' can cause the IndexReader in use by
- * SolrIndexSearcher to missrepresent what commit is "current". So Backup code should only ever
+ * SolrIndexSearcher to misrepresent what commit is "current". So Backup code should only ever
* "trust" the IndexCommit info available from the IndexDeletionPolicyWrapper
*
* @see <a href="https://issues.apache.org/jira/browse/LUCENE-9040">LUCENE-9040</a>
@@ -393,7 +394,7 @@ public class TestSnapshotCoreBackup extends SolrTestCaseJ4 {
// sanity check we are empty...
assertEquals(0L, (long) s.getIndexReader().numDocs());
- // sanity check this is the initial commit..
+ // check this is the initial commit...
final IndexCommit commit = s.getIndexReader().getIndexCommit();
assertEquals(EXPECTED_GEN_OF_EMPTY_INDEX, commit.getGeneration());
return commit;
@@ -417,7 +418,7 @@ public class TestSnapshotCoreBackup extends SolrTestCaseJ4 {
final IndexCommit commit = s.getIndexReader().getIndexCommit();
// WTF: how/why does this reader still have the same commit generation as before?
assertEquals(
- "WTF: This Reader (claims) the same generation as our previous pre-softCommif (empty) reader",
+ "WTF: This Reader (claims) the same generation as our previous pre-softCommit (empty) reader",
EXPECTED_GEN_OF_EMPTY_INDEX,
commit.getGeneration());
return commit;
@@ -438,7 +439,7 @@ public class TestSnapshotCoreBackup extends SolrTestCaseJ4 {
/**
* Simple check that the backup exists, is a valid index, and contains the expected number of
- * docs. If expectedSegmentsFileName is non null then confirms that file exists in the bakup dir
+ * docs. If expectedSegmentsFileName is non-null then confirms that file exists in the backup dir
* <em>and</em> that it is reported as the current segment file when opening a reader on that
* backup.
*/
diff --git a/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerConcurrent.java b/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerConcurrent.java
index 68c10393d5f..1a43c8d1437 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerConcurrent.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerConcurrent.java
@@ -112,7 +112,7 @@ public class TestSolrConfigHandlerConcurrent extends AbstractFullDistribZkTestBa
+ "}";
Set<String> errmessages = new HashSet<>();
- for (int i = 1; i < 2; i++) { // make it ahigher number
+ for (int i = 1; i < 2; i++) { // make it a higher number
RestTestHarness publisher = randomRestTestHarness(r);
String response;
String val1;
diff --git a/solr/core/src/test/org/apache/solr/handler/TestStressIncrementalBackup.java b/solr/core/src/test/org/apache/solr/handler/TestStressIncrementalBackup.java
index 6fdd8c83e5b..1692da09b5f 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestStressIncrementalBackup.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestStressIncrementalBackup.java
@@ -102,7 +102,7 @@ public class TestStressIncrementalBackup extends SolrCloudTestCase {
System.clearProperty("solr.allowPaths");
}
- @SuppressWarnings("AssertionFailureIgnored") // failure happens inside of a thread
+ @SuppressWarnings("AssertionFailureIgnored") // failure happens inside a thread
public void testCoreAdminHandler() throws Exception {
final int numBackupIters = 20; // don't use 'atLeast', we don't want to blow up on nightly
@@ -146,11 +146,11 @@ public class TestStressIncrementalBackup extends SolrCloudTestCase {
heavyCommitting.start();
try {
- // now have the "main" test thread try to take a serious of backups/snapshots
+ // now have the "main" test thread try to take a series of backups/snapshots
// while adding other "real" docs
// NOTE #1: start at i=1 for 'id' & doc counting purposes...
- // NOTE #2: abort quickly if the oher thread reports a heavyCommitFailure...
+ // NOTE #2: abort quickly if the other thread reports a heavyCommitFailure...
for (int i = 1; (i <= numBackupIters && null == heavyCommitFailure.get()); i++) {
// in each iteration '#i', the commit we create should have exactly 'i' documents in
diff --git a/solr/core/src/test/org/apache/solr/handler/TestStressThreadBackup.java b/solr/core/src/test/org/apache/solr/handler/TestStressThreadBackup.java
index e862211701d..a6df127a75d 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestStressThreadBackup.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestStressThreadBackup.java
@@ -125,7 +125,7 @@ public class TestStressThreadBackup extends SolrCloudTestCase {
@Test
public void testReplicationHandler() throws Exception {
- // Create a custom BackupAPIImpl which uses ReplicatoinHandler for the backups
+ // Create a custom BackupAPIImpl which uses ReplicationHandler for the backups
// but still defaults to CoreAdmin for making named snapshots (since that's what's documented)
testSnapshotsAndBackupsDuringConcurrentCommitsAndOptimizes(
new BackupAPIImpl() {
@@ -158,7 +158,7 @@ public class TestStressThreadBackup extends SolrCloudTestCase {
});
}
- @SuppressWarnings("AssertionFailureIgnored") // failure happens inside of a thread
+ @SuppressWarnings("AssertionFailureIgnored") // failure happens inside a thread
public void testSnapshotsAndBackupsDuringConcurrentCommitsAndOptimizes(final BackupAPIImpl impl)
throws Exception {
final int numBackupIters = 20; // don't use 'atLeast', we don't want to blow up on nightly
@@ -203,13 +203,13 @@ public class TestStressThreadBackup extends SolrCloudTestCase {
heavyCommitting.start();
try {
- // now have the "main" test thread try to take a serious of backups/snapshots
+ // now have the "main" test thread try to take a series of backups/snapshots
// while adding other "real" docs
final Queue<String> namedSnapshots = new LinkedList<>();
// NOTE #1: start at i=1 for 'id' & doc counting purposes...
- // NOTE #2: abort quickly if the oher thread reports a heavyCommitFailure...
+ // NOTE #2: abort quickly if the other thread reports a heavyCommitFailure...
for (int i = 1; (i <= numBackupIters && null == heavyCommitFailure.get()); i++) {
// in each iteration '#i', the commit we create should have exactly 'i' documents in
@@ -246,7 +246,7 @@ public class TestStressThreadBackup extends SolrCloudTestCase {
if (3 < namedSnapshots.size()
&& random().nextInt(3 + numBackupIters - i) < random().nextInt(namedSnapshots.size())) {
- assert 0 < namedSnapshots.size() : "Someone broke the conditionl";
+ assert 0 < namedSnapshots.size() : "Something broke the conditional";
final String snapshotName = namedSnapshots.poll();
final String backupName = "backup_as_of_" + snapshotName;
log.info("Creating {} from {} in iter={}", backupName, snapshotName, i);
@@ -298,7 +298,7 @@ public class TestStressThreadBackup extends SolrCloudTestCase {
}
/**
- * Given a backup name, extrats the numberic suffix identifying how many "real" docs should be in
+ * Given a backup name, extracts the numeric suffix identifying how many "real" docs should be in
* it
*
* @see #ENDS_WITH_INT_DIGITS
@@ -311,7 +311,7 @@ public class TestStressThreadBackup extends SolrCloudTestCase {
/**
* Validates a backup exists, passes check index, and contains a number of "real" documents that
- * match it's name
+ * match its name
*
* @see #validateBackup(File)
*/
@@ -322,7 +322,7 @@ public class TestStressThreadBackup extends SolrCloudTestCase {
/**
* Validates a backup dir exists, passes check index, and contains a number of "real" documents
- * that match it's name
+ * that match its name
*
* @see #getNumRealDocsFromBackupName
*/
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/DaemonStreamApiTest.java b/solr/core/src/test/org/apache/solr/handler/admin/DaemonStreamApiTest.java
index c1fc5b6aa02..e8c2e6ab274 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/DaemonStreamApiTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/DaemonStreamApiTest.java
@@ -54,7 +54,7 @@ public class DaemonStreamApiTest extends SolrTestCaseJ4 {
private static final String DAEMON_OP = "DaemonOp";
// We want 2-5 daemons. Choose one of them to start/stop/kill to catch any off-by-one or other
- // bookeeping errors.
+ // bookkeeping errors.
final int numDaemons = random().nextInt(3) + 2;
String daemonOfInterest;
@@ -223,7 +223,8 @@ public class DaemonStreamApiTest extends SolrTestCaseJ4 {
+ daemonName
+ "' did not become RUNNABLE, WAITING or TIMED_WAITING in 10 seconds");
}
- // There can be some delay while threads stabilize, so we need to loop. Evenutally, the statu of a
+ // There can be some delay while threads stabilize, so we need to loop. Eventually, the status of
+ // a
// stopped thread should be "TERMINATED"
private void checkStopped() throws InterruptedException, IOException {
TimeOut timeout = new TimeOut(10, TimeUnit.SECONDS, TimeSource.NANO_TIME);
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/HealthCheckHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/admin/HealthCheckHandlerTest.java
index cd0a7d5661a..9f8d233c424 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/HealthCheckHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/HealthCheckHandlerTest.java
@@ -64,7 +64,7 @@ public class HealthCheckHandlerTest extends SolrCloudTestCase {
// positive check that our only existing "healthy" node works with cloud client
// NOTE: this is using GenericSolrRequest, not HealthCheckRequest which is why it passes
// as compared with testHealthCheckHandlerWithCloudClient
- // (Not sure if that's actaully a good thing -- but it's how the existing test worked)
+ // (Not sure if that's actually a good thing -- but it's how the existing test worked)
assertEquals(
CommonParams.OK,
req.process(cluster.getSolrClient()).getResponse().get(CommonParams.STATUS));
@@ -96,14 +96,14 @@ public class HealthCheckHandlerTest extends SolrCloudTestCase {
JettySolrRunner newJetty = cluster.startJettySolrRunner();
try (HttpSolrClient httpSolrClient = getHttpSolrClient(newJetty.getBaseUrl().toString())) {
- // postive check that our (new) "healthy" node works with direct http client
+ // positive check that our (new) "healthy" node works with direct http client
assertEquals(
CommonParams.OK, req.process(httpSolrClient).getResponse().get(CommonParams.STATUS));
// now "break" our (new) node
newJetty.getCoreContainer().getZkController().getZkClient().close();
- // negative check of our (new) "broken" node that we deliberately put into an unhealth state
+ // negative check of our (new) "broken" node that we deliberately put into an unhealthy state
BaseHttpSolrClient.RemoteSolrException e =
expectThrows(
BaseHttpSolrClient.RemoteSolrException.class,
@@ -121,7 +121,7 @@ public class HealthCheckHandlerTest extends SolrCloudTestCase {
newJetty = cluster.startJettySolrRunner();
try (HttpSolrClient httpSolrClient = getHttpSolrClient(newJetty.getBaseUrl().toString())) {
- // postive check that our (new) "healthy" node works with direct http client
+ // positive check that our (new) "healthy" node works with direct http client
assertEquals(
CommonParams.OK, req.process(httpSolrClient).getResponse().get(CommonParams.STATUS));
@@ -147,7 +147,7 @@ public class HealthCheckHandlerTest extends SolrCloudTestCase {
newJetty.stop();
}
- // (redundent) positive check that our (previously) exiting "healthy" node (still) works
+ // (redundant) positive check that our (previously) exiting "healthy" node (still) works
// after getting negative results from our broken node and failed core container
try (HttpSolrClient httpSolrClient =
getHttpSolrClient(cluster.getJettySolrRunner(0).getBaseUrl().toString())) {
@@ -185,7 +185,7 @@ public class HealthCheckHandlerTest extends SolrCloudTestCase {
JettySolrRunner newJetty = cluster.startJettySolrRunner();
try (HttpSolrClient httpSolrClient = getHttpSolrClient(newJetty.getBaseUrl().toString())) {
- // postive check that our (new) "healthy" node works with direct http client
+ // positive check that our (new) "healthy" node works with direct http client
assertEquals(
CommonParams.OK,
new V2Request.Builder("/node/health")
@@ -197,7 +197,7 @@ public class HealthCheckHandlerTest extends SolrCloudTestCase {
// now "break" our (new) node
newJetty.getCoreContainer().getZkController().getZkClient().close();
- // negative check of our (new) "broken" node that we deliberately put into an unhealth state
+ // negative check of our (new) "broken" node that we deliberately put into an unhealthy state
BaseHttpSolrClient.RemoteSolrException e =
expectThrows(
BaseHttpSolrClient.RemoteSolrException.class,
@@ -229,7 +229,7 @@ public class HealthCheckHandlerTest extends SolrCloudTestCase {
mockCD("collection1", "slice1_replica1", "slice1", true, Replica.State.ACTIVE),
mockCD("collection1", "slice1_replica3", "slice1", true, Replica.State.DOWN),
mockCD("collection2", "slice1_replica5", "slice1", true, Replica.State.RECOVERING),
- // A dangling core for a non-existant collection will not fail the check
+ // A dangling core for a non-existent collection will not fail the check
mockCD("invalid", "invalid", "slice1", false, Replica.State.RECOVERING),
// A core for a slice that is not an active slice will not fail the check
mockCD("collection1", "invalid_replica1", "invalid", true, Replica.State.DOWN));
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/LoggingHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/admin/LoggingHandlerTest.java
index a8b471a5e47..2e2ded7d248 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/LoggingHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/LoggingHandlerTest.java
@@ -102,7 +102,7 @@ public class LoggingHandlerTest extends SolrTestCaseJ4 {
assertEquals(Level.DEBUG, config.getLoggerConfig(CLASS_LOGGER_NAME).getLevel());
// NOTE: LoggingHandler doesn't actually "remove" the LoggerConfig, ...
- // evidently so people using they UI can see that it was explicitly turned "OFF" ?
+ // evidently so people using the UI can see that it was explicitly turned "OFF" ?
mparams.set("set", PARENT_LOGGER_NAME + ":null");
rsp =
client.request(
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/LukeRequestHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/admin/LukeRequestHandlerTest.java
index ff0c2bc1513..870c603113b 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/LukeRequestHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/LukeRequestHandlerTest.java
@@ -21,7 +21,7 @@ import java.util.EnumSet;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.common.luke.FieldFlag;
import org.apache.solr.request.SolrQueryRequest;
-import org.apache.solr.schema.CustomAnalyzerStrField; // jdoc
+import org.apache.solr.schema.CustomAnalyzerStrField;
import org.apache.solr.schema.IndexSchema;
import org.apache.solr.util.TestHarness;
import org.junit.Before;
@@ -107,7 +107,7 @@ public class LukeRequestHandlerTest extends SolrTestCaseJ4 {
@Test
public void testLuke() {
- // test that Luke can handle all of the field types
+ // test that Luke can handle all the field types
assertQ(req("qt", "/admin/luke", "id", "SOLR1000"));
final int numFlags = EnumSet.allOf(FieldFlag.class).size();
@@ -206,7 +206,7 @@ public class LukeRequestHandlerTest extends SolrTestCaseJ4 {
assertQ(
req("qt", "/admin/luke", "fl", f, "numTerms", "1"),
- // no garuntee which one we find
+ // no guarantee which one we find
"count(" + field(f) + "lst[@name='topTerms']/int)=1");
assertQ(
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/MetricsHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/admin/MetricsHandlerTest.java
index 40dfba5d6ae..131e2b1733a 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/MetricsHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/MetricsHandlerTest.java
@@ -49,7 +49,7 @@ public class MetricsHandlerTest extends SolrTestCaseJ4 {
h.getCoreContainer().waitForLoadingCoresToFinish(30000);
// manually register & seed some metrics in solr.jvm and solr.jetty for testing via handler
- // (use "solrtest_" prefix just in case the jvm or jetty ads a "foo" metric at some point)
+ // (use "solrtest_" prefix just in case the jvm or jetty adds a "foo" metric at some point)
Counter c = h.getCoreContainer().getMetricManager().counter(null, "solr.jvm", "solrtest_foo");
c.inc();
c = h.getCoreContainer().getMetricManager().counter(null, "solr.jetty", "solrtest_foo");
@@ -90,7 +90,7 @@ public class MetricsHandlerTest extends SolrTestCaseJ4 {
Object o = nl.get("SEARCHER.new.errors");
assertNotNull(o); // counter type
assertTrue(o instanceof MapWriter);
- // response wasn't serialized so we get here whatever MetricUtils produced instead of NamedList
+ // response wasn't serialized, so we get here whatever MetricUtils produced instead of NamedList
assertNotNull(((MapWriter) o)._get("count", null));
assertEquals(0L, ((MapWriter) nl.get("SEARCHER.new.errors"))._get("count", null));
nl = (NamedList<?>) values.get("solr.node");
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/ShowFileRequestHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/admin/ShowFileRequestHandlerTest.java
index 2950c66e25c..f33cfd23532 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/ShowFileRequestHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/ShowFileRequestHandlerTest.java
@@ -96,7 +96,7 @@ public class ShowFileRequestHandlerTest extends SolrJettyTestBase {
new ResponseParser() {
@Override
public String getWriterType() {
- // unfortunately this gets put onto params wt=mock but it apparently has no effect
+ // unfortunately this gets put onto params wt=mock, but it apparently has no effect
return "mock";
}
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/SplitHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/admin/SplitHandlerTest.java
index ab542bf1154..f3f1f69322f 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/SplitHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/SplitHandlerTest.java
@@ -172,7 +172,7 @@ public class SplitHandlerTest extends SolrTestCaseJ4 {
assertEquals(12, results.iterator().next().max);
verifyContiguous(results, curr);
- // don't freak out if we encounter some ranges outside of the current defined shard range
+ // don't freak out if we encounter some ranges outside the current defined shard range
// this can happen since document routing can be overridden.
curr = new DocRouter.Range(-100, 101);
counts = new ArrayList<>();
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/StatsReloadRaceTest.java b/solr/core/src/test/org/apache/solr/handler/admin/StatsReloadRaceTest.java
index 0bca9183832..3d48aa84319 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/StatsReloadRaceTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/StatsReloadRaceTest.java
@@ -76,7 +76,7 @@ public class StatsReloadRaceTest extends SolrTestCaseJ4 {
requestCoreStatus();
}
- isCompleted = checkReloadComlpetion(asyncId);
+ isCompleted = checkReloadCompletion(asyncId);
} while (!isCompleted);
requestMetrics(false);
}
@@ -96,7 +96,7 @@ public class StatsReloadRaceTest extends SolrTestCaseJ4 {
assertNull("" + rsp.getException(), rsp.getException());
}
- private boolean checkReloadComlpetion(int asyncId) {
+ private boolean checkReloadCompletion(int asyncId) {
boolean isCompleted;
SolrQueryResponse rsp = new SolrQueryResponse();
h.getCoreContainer()
@@ -132,7 +132,7 @@ public class StatsReloadRaceTest extends SolrTestCaseJ4 {
NamedList<?> values = rsp.getValues();
// this is not guaranteed to exist right away after core reload - there's a
- // small window between core load and before searcher metrics are registered
+ // small window between core load and before searcher metrics are registered,
// so we may have to check a few times, and then fail softly if reload is not complete yet
NamedList<?> metrics = (NamedList<?>) values.get("metrics");
if (metrics == null) {
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/TestCollectionAPIs.java b/solr/core/src/test/org/apache/solr/handler/admin/TestCollectionAPIs.java
index ee608e531ec..8cbb8d24fe7 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/TestCollectionAPIs.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/TestCollectionAPIs.java
@@ -121,7 +121,7 @@ public class TestCollectionAPIs extends SolrTestCaseJ4 {
null,
"{name:newcoll, fromApi:'true', nrtReplicas:'2', replicationFactor:'2', tlogReplicas:'2', pullReplicas:'2', collection.configName:schemaless, numShards:'2', operation:create}");
- // test a create collection with custom properties
+ // test a create collection operation with custom properties
compareOutput(
apiBag,
"/collections",
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/V2ApiMappingTest.java b/solr/core/src/test/org/apache/solr/handler/admin/V2ApiMappingTest.java
index c52e9626d68..06b7522ad6e 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/V2ApiMappingTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/V2ApiMappingTest.java
@@ -55,7 +55,7 @@ import org.mockito.Mock;
* {@link #createUnderlyingRequestHandler()} to properly use this harness. See the method-level
* Javadocs on each for more information. With these methods implemented, subclasses can test their
* API mappings by calling any of the 'capture' methods included on this harness, which take in the
- * v2 API path, method, etc. and use them to lookup and run the matching API (if a match can be
+ * v2 API path, method, etc. and use them to look up and run the matching API (if a match can be
* found). Most of these helper methods return the (post-v1-conversion) {@link SolrParams} seen by
* the mocked RequestHandler.
*/
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/V2CollectionsAPIMappingTest.java b/solr/core/src/test/org/apache/solr/handler/admin/V2CollectionsAPIMappingTest.java
index dc52e1bb2ae..7b1dafdafa7 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/V2CollectionsAPIMappingTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/V2CollectionsAPIMappingTest.java
@@ -275,7 +275,8 @@ public class V2CollectionsAPIMappingTest extends V2ApiMappingTest<CollectionsHan
assertEquals(123, v1Params.getPrimitiveInt(CoreAdminParams.BACKUP_ID));
assertEquals("requestTrackingId", v1Params.get(CommonAdminParams.ASYNC));
// NOTE: Unlike other v2 APIs that have a nested object for collection-creation params,
- // restore's v1 equivalent for these properties doesn't have a "create-collection." prefix.
+ // the restore API's v1 equivalent for these properties doesn't have a "create-collection."
+ // prefix.
assertEquals(1, v1Params.getPrimitiveInt(CollectionAdminParams.NUM_SHARDS));
assertEquals("bar", v1Params.get("property.foo"));
assertEquals("bar2", v1Params.get("property.foo2"));
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/api/V2NodeAPIMappingTest.java b/solr/core/src/test/org/apache/solr/handler/admin/api/V2NodeAPIMappingTest.java
index 159e3d2e59b..6a49040ab9d 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/api/V2NodeAPIMappingTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/api/V2NodeAPIMappingTest.java
@@ -52,7 +52,7 @@ import org.junit.BeforeClass;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
-/** Unit tests for the v2 to v1 mapping for Solr's /node/ APIs */
+/** Unit tests for the v2 to v1 mapping for /node/ APIs. */
public class V2NodeAPIMappingTest {
private ApiBag apiBag;
private ArgumentCaptor<SolrQueryRequest> queryRequestCaptor;
diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java
index ce81f308f4a..841539d1bd9 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java
@@ -372,7 +372,7 @@ public class DistributedDebugComponentTest extends SolrJettyTestBase {
query.setQuery("id:1 OR id:2");
query.setFilterQueries("id:[0 TO 10]", "id:[0 TO 5]");
query.setRows(1);
- query.setSort("id", SolrQuery.ORDER.asc); // thus only return id:1 since rows 1
+ query.setSort("id", SolrQuery.ORDER.asc); // thus, only return id:1 since rows 1
query.set("debug", "true");
query.set("distrib", "true");
query.setFields("id");
diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedExpandComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedExpandComponentTest.java
index 50b37c3eb31..095ff3a3ca3 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedExpandComponentTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedExpandComponentTest.java
@@ -88,7 +88,7 @@ public class DistributedExpandComponentTest extends BaseDistributedSearchTestCas
2, "id", "10", "term_s", "YYYY", group, ccc, "test_i", "1500", "test_l", "1001", "test_f",
"3200");
- // NOTE: nullPolicy=collapse will only be viable because all null docs are in collocated in
+ // NOTE: nullPolicy=collapse will only be viable because all null docs are in colocated in
// shard #2
index_specific(2, "id", "88", "test_i", "1001", "test_l", "1001", "test_f", "3200");
index_specific(2, "id", "99", "test_i", "11", "test_l", "100", "test_f", "200");
diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetExistsSmallTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetExistsSmallTest.java
index 712cc6d8bfc..66fbab59198 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetExistsSmallTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetExistsSmallTest.java
@@ -55,7 +55,7 @@ public class DistributedFacetExistsSmallTest extends BaseDistributedSearchTestCa
index(id, maxId += 1 + rnd.nextInt(5), FLD, "CCC");
final SolrClient shard0 = clients.get(0);
- // expectidly fails test
+ // expectedly fails test
// shard0.add(sdoc("id", 13, FLD, "DDD"));
commit();
@@ -128,7 +128,7 @@ public class DistributedFacetExistsSmallTest extends BaseDistributedSearchTestCa
params.add("facet.prefix", prefixes[rand.nextInt(prefixes.length)]);
}
- // don't bother trying to to test facet.missing=true + facet.limit=0
+ // don't bother trying to test facet.missing=true + facet.limit=0
// distrib & non-distrib are known to behave differently in this
if (rand.nextInt(100) < 20 && 0 < params.getInt("facet.limit", 100)) {
params.add("facet.missing", "true");
diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLargeTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLargeTest.java
index e3110ec1951..b7f2dc1493f 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLargeTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLargeTest.java
@@ -161,7 +161,7 @@ public class DistributedFacetPivotLargeTest extends BaseDistributedSearchTestCas
// sort=index + offset + limit w/ some variables
for (SolrParams variableParams :
new SolrParams[] { // bother variations should kwrk just as well
- // defauts
+ // defaults
params(),
// force refinement
params(
@@ -347,7 +347,7 @@ public class DistributedFacetPivotLargeTest extends BaseDistributedSearchTestCas
rsp = query(p);
assertPivot("place_s", "cardiff", 107, rsp.getFacetPivot().get("place_s").get(0));
// - zeroShard = 50 ... above per-shard min of 50/(numShards=4)
- // - oneShard = 5 ... below per-shard min of 50/(numShards=4) .. should be refined
+ // - oneShard = 5 ... below per-shard min of 50/(numShards=4)... should be refined
// - twoShard = 52 ... above per-shard min of 50/(numShards=4)
// = threeShard = 0 ... should be refined and still match nothing
} catch (AssertionError ae) {
@@ -1558,7 +1558,7 @@ public class DistributedFacetPivotLargeTest extends BaseDistributedSearchTestCas
SPECIAL);
// two really trivial documents, unrelated to the rest of the tests,
- // for the purpose of demoing the porblem with mincount=0
+ // to demonstrate the problem with mincount=0
addPivotDoc(oneShard, "id", getDocNum(), "top_s", "aaa", "sub_s", "bbb");
addPivotDoc(twoShard, "id", getDocNum(), "top_s", "xxx", "sub_s", "yyy");
diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLongTailTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLongTailTest.java
index f0d20e4afe5..8315d2c57d4 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLongTailTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLongTailTest.java
@@ -253,7 +253,7 @@ public class DistributedFacetPivotLongTailTest extends BaseDistributedSearchTest
assertEquals(pivot.toString(), 14, pivot.getCount());
}
- // however with a lower limit and overrequesting disabled,
+ // however, with a lower limit and overrequesting disabled,
// we're going to miss out on tailB
pivots =
diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedMLTComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedMLTComponentTest.java
index 13db5a5d8cf..1b66c847b4f 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedMLTComponentTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedMLTComponentTest.java
@@ -192,7 +192,7 @@ public class DistributedMLTComponentTest extends BaseDistributedSearchTestCase {
// we care only about the mlt results
handle.put("response", SKIP);
- // currently distrib mlt is sorting by score (even though it's not really comparable across
+ // currently, distrib mlt is sorting by score (even though it's not really comparable across
// shards) so it may not match the sort of single shard mlt
handle.put("17", UNORDERED);
@@ -234,12 +234,12 @@ public class DistributedMLTComponentTest extends BaseDistributedSearchTestCase {
handle.put("13", UNORDERED);
handle.put("7", UNORDERED);
- // keep in mind that MLT params influence stats that are calulated
+ // keep in mind that MLT params influence stats that are calculated
// per shard - because of this, depending on params, distrib and single
// shard queries will not match.
// because distrib and single node do not currently sort exactly the same,
- // we ask for an mlt.count of 20 to ensure both include all results
+ // we ask for a mlt.count of 20 to ensure both include all results
query(
"q",
diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryComponentOptimizationTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryComponentOptimizationTest.java
index 416866e5c88..1982d5089b6 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryComponentOptimizationTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryComponentOptimizationTest.java
@@ -573,7 +573,7 @@ public class DistributedQueryComponentOptimizationTest extends SolrCloudTestCase
* <li>Requests all fields that are present in 'fl' param
* </ol>
*
- * <p>It also asserts that every regular two phase distribtued search:
+ * <p>It also asserts that every regular two phase distributed search:
*
* <ol>
* <li>Makes at most 2 * 'numSlices' number of shard requests
@@ -593,7 +593,7 @@ public class DistributedQueryComponentOptimizationTest extends SolrCloudTestCase
// the jettys doesn't include the control jetty which is exactly what we need here
TrackingShardHandlerFactory.setTrackingQueue(cluster, trackingQueue);
- // let's add debug=track to such requests so we can use DebugComponent responses for assertions
+ // let's add debug=track to such requests, so we can use DebugComponent responses for assertions
QueryResponse response =
cluster.getSolrClient().query(COLLECTION, new SolrQuery("debug", "track", q));
diff --git a/solr/core/src/test/org/apache/solr/handler/component/PhrasesIdentificationComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/PhrasesIdentificationComponentTest.java
index 3e7947a12af..b666760ad8d 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/PhrasesIdentificationComponentTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/PhrasesIdentificationComponentTest.java
@@ -66,7 +66,7 @@ public class PhrasesIdentificationComponentTest extends SolrTestCaseJ4 {
"id", "44",
"title", "Why the LazY dog was lazy",
"body",
- "News flash: Lazy Dog was not actually lazy, it just seemd so compared to Fox"));
+ "News flash: Lazy Dog was not actually lazy, it just seemed so compared to Fox"));
assertU(
adoc(
"id", "45",
@@ -92,7 +92,7 @@ public class PhrasesIdentificationComponentTest extends SolrTestCaseJ4 {
IntStream.rangeClosed((11 - 7 + 1), 11).sum(), // 11 words, max query phrase size is 7
phrases.size());
- // spot check a few explicitly choosen phrases of various lengths...
+ // spot check a few explicitly chosen phrases of various lengths...
{ // single term, close to edge so not as many super phrases as other terms might have
final Phrase lazy = phrases.get(phrases.size() - 1 - 2);
@@ -146,7 +146,7 @@ public class PhrasesIdentificationComponentTest extends SolrTestCaseJ4 {
assertEquals(debug, daq, daq.getLargestIndexedSubPhrases().get(0));
assertEquals(debug, 0, daq.getIndexedSuperPhrases().size());
}
- { // length 4 phrase (larger then the max indexed size)
+ { // length 4 phrase (larger than the max indexed size)
final Phrase qbfp = phrases.get((7 * 2) + 3);
final String debug = qbfp.toString();
@@ -342,7 +342,7 @@ public class PhrasesIdentificationComponentTest extends SolrTestCaseJ4 {
final String input = "BROWN fox lAzY dog xxxyyyzzz";
// a function we'll re-use on phrases generated from the above input
- // the multiplier let's us simulate multiple shards returning the same values
+ // the multiplier lets us simulate multiple shards returning the same values
BiConsumer<Integer, List<Phrase>> assertions =
(mult, phrases) -> {
final Phrase brown_fox = phrases.get(1);
@@ -502,7 +502,7 @@ public class PhrasesIdentificationComponentTest extends SolrTestCaseJ4 {
wawl.toString(), wawl.getFieldScore("multigrams_title"), wawl.getTotalScore(), 0.0D);
// "brown fox why are we" is longer then the max indexed phrase, and none of it's
- // (longest) sub phrases exists in either field -- so all of it's scores should be -1
+ // (longest) sub phrases exists in either field -- so all of its scores should be -1
final Phrase bfwaw = phrases.get(11);
assertEquals("BROWN fox why are we", bfwaw.getSubSequence());
assertEquals(bfwaw.toString(), -1.0D, bfwaw.getFieldScore("multigrams_title"), 0.0D);
@@ -510,7 +510,7 @@ public class PhrasesIdentificationComponentTest extends SolrTestCaseJ4 {
assertEquals(bfwaw.toString(), -1.0D, bfwaw.getTotalScore(), 0.0D);
}
- public void testWhiteboxScorcesStopwords() throws Exception {
+ public void testWhiteboxScoresStopwords() throws Exception {
final String input = "why the lazy dog brown fox";
final Map<String, Double> fieldWeights = new TreeMap<>();
fieldWeights.put("multigrams_title", 1.0D);
@@ -567,9 +567,9 @@ public class PhrasesIdentificationComponentTest extends SolrTestCaseJ4 {
}
{ // now flip things: our analysisField filters stopwords,
- // but we also generates scores from a field that doesn't know about them...
+ // but we also generate scores from a field that doesn't know about them...
//
- // (NOTE: the parser will still generate _some_ candidate phrases spaning the stop word
+ // (NOTE: the parser will still generate _some_ candidate phrases spanning the stop word
// position, but not ones that start with the stopword)
final SchemaField analysisField =
h.getCore().getLatestSchema().getField("multigrams_title_stop");
@@ -625,7 +625,7 @@ public class PhrasesIdentificationComponentTest extends SolrTestCaseJ4 {
ErrorCode.BAD_REQUEST);
assertQEx(
- "analyzer missmatch should cause error",
+ "analyzer mismatch should cause error",
"must have the same fieldType",
req(
"q",
@@ -694,7 +694,7 @@ public class PhrasesIdentificationComponentTest extends SolrTestCaseJ4 {
final String input = " did a Quick brown FOX perniciously jump over the lazy dog";
final String expected = " did a Quick {brown FOX} perniciously jump over {the lazy dog}";
- // should get same behavior regardless of wether we use "q" or "phrases.q"
+ // should get same behavior regardless of whether we use "q" or "phrases.q"
for (String p : Arrays.asList("q", "phrases.q")) {
// basic request...
assertQ(
diff --git a/solr/core/src/test/org/apache/solr/handler/component/ResourceSharingTestComponent.java b/solr/core/src/test/org/apache/solr/handler/component/ResourceSharingTestComponent.java
index 47b3555e4c8..81474e7be33 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/ResourceSharingTestComponent.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/ResourceSharingTestComponent.java
@@ -124,7 +124,7 @@ public class ResourceSharingTestComponent extends SearchComponent implements Sol
}
// if we get here we have seen the data from the blob and all we need is to test that two
- // collections are able to see the same object..
+ // collections are able to see the same object...
return new TestObject();
}
}
diff --git a/solr/core/src/test/org/apache/solr/handler/component/SearchHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/component/SearchHandlerTest.java
index e0433929b7f..f2135d876e8 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/SearchHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/SearchHandlerTest.java
@@ -65,7 +65,7 @@ public class SearchHandlerTest extends SolrTestCaseJ4 {
core.getSearchComponent(MoreLikeThisComponent.COMPONENT_NAME),
handler.getComponents().get(0));
} catch (IOException e) {
- fail("IOExcepiton closing SearchHandler");
+ fail("IOException closing SearchHandler");
}
// Build an explicit list that includes the debug comp.
diff --git a/solr/core/src/test/org/apache/solr/handler/component/StatsComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/StatsComponentTest.java
index 039b9f58891..1fb6fb634b6 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/StatsComponentTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/StatsComponentTest.java
@@ -149,7 +149,7 @@ public class StatsComponentTest extends SolrTestCaseJ4 {
// used when doing key overrides in conjunction with the baseParamsSet
//
// even when these aren't included in the request, using them helps us
- // test the code path of an exclusion that refers to an fq that doesn't exist
+ // test the code path of an exclusion that refers to a fq that doesn't exist
final String all_possible_ex = "fq1,fq2";
assertU(adoc("id", "1", f, "-10"));
@@ -790,7 +790,7 @@ public class StatsComponentTest extends SolrTestCaseJ4 {
"{!type=func key=" + f + " ex=key_ex_tag v='product(1," + f + ")'}",
}) {
assertQ(
- "test statis & stats.facet over field specified as a function: " + param,
+ "test stats & stats.facet over field specified as a function: " + param,
req(
"q",
"*:*",
@@ -1054,7 +1054,7 @@ public class StatsComponentTest extends SolrTestCaseJ4 {
SolrQueryRequest req = new LocalSolrQueryRequest(core, new MapSolrParams(args));
assertQ(
- "test exluding filter query",
+ "test excluding filter query",
req,
"//lst[@name='id_i']/double[@name='min'][.='1.0']",
"//lst[@name='id_i']/double[@name='max'][.='4.0']");
@@ -1246,7 +1246,7 @@ public class StatsComponentTest extends SolrTestCaseJ4 {
kpre + "double[@name='mean'][.='34.40666643778483']",
kpre + "double[@name='stddev'][.='10.622007151430441']");
- // force constant score for matches so we aren't dependent on similarity
+ // force constant score for matches, so we aren't dependent on similarity
final float constScore = 4.2F;
final double expectedScore = (double) constScore;
assertQ(
@@ -1263,7 +1263,7 @@ public class StatsComponentTest extends SolrTestCaseJ4 {
}
/**
- * Whitebox test of {@link StatsField} parsing to ensure expected equivilence operations hold up
+ * Whitebox test of {@link StatsField} parsing to ensure expected equivalence operations hold up
*/
public void testStatsFieldWhitebox() throws Exception {
StatsComponent component = new StatsComponent();
@@ -1491,7 +1491,7 @@ public class StatsComponentTest extends SolrTestCaseJ4 {
return cat_docValues;
}
- /** Convinience struct used in {@link #testIndividualStatLocalParams} */
+ /** Convenience struct used in {@link #testIndividualStatLocalParams} */
private static final class ExpectedStat {
public static final String KPRE = XPRE + "lst[@name='stats_fields']/lst[@name='k']/";
public final Stat stat;
@@ -1557,7 +1557,7 @@ public class StatsComponentTest extends SolrTestCaseJ4 {
kpre + "double[@name='min'][.='9.0']",
"count(" + kpre + "*)=2");
- // for stats that are true/false, sanity check false does it's job
+ // for stats that are true/false, check false does its job
assertQ(
"min=true & max=false: only min should come back",
req("q", "*:*", "stats", "true", "stats.field", "{!key=k max=false min=true}a_i"),
@@ -1981,7 +1981,7 @@ public class StatsComponentTest extends SolrTestCaseJ4 {
params("stats.field", "{!key=a min=true cardinality=false}a_l"),
params("stats.field", "{!key=a min=true cardinality=$doit}a_l", "doit", "false"),
params("stats.field", "{!key=a min=true cardinality=$doit}a_l"), // missing doit param
- // other tunning options shouldn't change things
+ // other tuning options shouldn't change things
params("stats.field", "{!key=a min=true hllPreHashed=true cardinality=false}a_l"),
params(
"stats.field",
@@ -2021,26 +2021,26 @@ public class StatsComponentTest extends SolrTestCaseJ4 {
assertNull(HllOptions.parseHllOptions(params(), field_l));
assertNull(HllOptions.parseHllOptions(params("cardinality", "false"), field_l));
- // sanity check, future proof against the HLL library changing stuff on us
+ // check, future-proof against the HLL library changing stuff on us
assertEquals(
"HLL Changed definition min for log2m, "
- + "need to note in upgrade instructions and maybe adjust accuracy hueristic",
+ + "need to note in upgrade instructions and maybe adjust accuracy heuristic",
4,
HLL.MINIMUM_LOG2M_PARAM);
// NOTE: https://github.com/aggregateknowledge/java-hll/issues/14
assertEquals(
"HLL Changed definition max for log2m, "
- + "need to note in upgrade instructions and maybe adjust accuracy hueristic",
+ + "need to note in upgrade instructions and maybe adjust accuracy heuristic",
30,
HLL.MAXIMUM_LOG2M_PARAM);
assertEquals(
"HLL Changed definition min for regwidth, "
- + "need to note in upgrade instructions and probably adjust hueristic",
+ + "need to note in upgrade instructions and probably adjust heuristic",
1,
HLL.MINIMUM_REGWIDTH_PARAM);
assertEquals(
"HLL Changed definition max for regwidth, "
- + "need to note in upgrade instructions and probably adjust hueristic",
+ + "need to note in upgrade instructions and probably adjust heuristic",
8,
HLL.MAXIMUM_REGWIDTH_PARAM);
@@ -2074,7 +2074,7 @@ public class StatsComponentTest extends SolrTestCaseJ4 {
// non defaults: lower/upper accuracy bounds should give min/max log2m & adjusted regwidth
HllOptions optsMin = HllOptions.parseHllOptions(params("cardinality", "0"), field);
assertEquals(f + " min log2m", HLL.MINIMUM_LOG2M_PARAM, optsMin.getLog2m());
- assertEquals(f + " min regwidth", 5, optsMin.getRegwidth()); // lowest hueristic for 64bit
+ assertEquals(f + " min regwidth", 5, optsMin.getRegwidth()); // lowest heuristic for 64bit
HllOptions optsMax = HllOptions.parseHllOptions(params("cardinality", "1"), field);
assertEquals(f + " max log2m", HLL.MAXIMUM_LOG2M_PARAM, optsMax.getLog2m());
@@ -2095,7 +2095,7 @@ public class StatsComponentTest extends SolrTestCaseJ4 {
params(
"cardinality", "true", "hllLog2m", "13", "hllRegwidth", "5", "hllPreHash", "false"),
- // explicit hllLog2M & hllRegwidth should override hueristic float arg
+ // explicit hllLog2M & hllRegwidth should override heuristic float arg
params("cardinality", "1.0", "hllLog2m", "13", "hllRegwidth", "5"),
params("cardinality", "0.0", "hllLog2m", "13", "hllRegwidth", "5", "hllPreHash", "false")
};
@@ -2111,7 +2111,7 @@ public class StatsComponentTest extends SolrTestCaseJ4 {
// non defaults: lower/upper accuracy bounds should give min/max log2m & adjusted regwidth
HllOptions optsMin = HllOptions.parseHllOptions(params("cardinality", "0"), field);
assertEquals(f + " min log2m", HLL.MINIMUM_LOG2M_PARAM, optsMin.getLog2m());
- assertEquals(f + " min regwidth", 4, optsMin.getRegwidth()); // lowest hueristic for 32bit
+ assertEquals(f + " min regwidth", 4, optsMin.getRegwidth()); // lowest heuristic for 32bit
HllOptions optsMax = HllOptions.parseHllOptions(params("cardinality", "1"), field);
assertEquals(f + " max log2m", HLL.MAXIMUM_LOG2M_PARAM, optsMax.getLog2m());
@@ -2264,7 +2264,7 @@ public class StatsComponentTest extends SolrTestCaseJ4 {
"stats.field",
"{!percentiles='" + percentiles + "'}stat_f")) {
SolrQueryResponse rsp = h.queryAndResponse(null, query);
- NamedList<Double> pout = extractPercentils(rsp, "stat_f");
+ NamedList<Double> pout = extractPercentiles(rsp, "stat_f");
for (int i = 0; i < percentilesList.size(); i++) {
// ensure exact order, but all values should be null (empty result set)
assertEquals(percentilesList.get(i), pout.getName(i));
@@ -2292,7 +2292,7 @@ public class StatsComponentTest extends SolrTestCaseJ4 {
"stats.field",
"{!percentiles='" + percentiles + "'}stat_f")) {
SolrQueryResponse rsp = h.queryAndResponse(null, query);
- NamedList<Double> pout = extractPercentils(rsp, "stat_f");
+ NamedList<Double> pout = extractPercentiles(rsp, "stat_f");
for (int i = 0; i < percentilesList.size(); i++) {
String p = percentilesList.get(i);
assertEquals(p, pout.getName(i));
@@ -2304,7 +2304,7 @@ public class StatsComponentTest extends SolrTestCaseJ4 {
try (SolrQueryRequest query =
req("q", "*:*", "stats", "true", "stats.field", "{!percentiles=''}stat_f")) {
SolrQueryResponse rsp = h.queryAndResponse(null, query);
- NamedList<Double> pout = extractPercentils(rsp, "stat_f");
+ NamedList<Double> pout = extractPercentiles(rsp, "stat_f");
assertNull(pout);
}
@@ -2325,13 +2325,13 @@ public class StatsComponentTest extends SolrTestCaseJ4 {
"stats.field",
"{!percentiles='" + percentiles + "'}stat_s")) {
SolrQueryResponse rsp = h.queryAndResponse(null, query);
- assertNull(extractPercentils(rsp, "stat_dt"));
- assertNull(extractPercentils(rsp, "stat_s"));
+ assertNull(extractPercentiles(rsp, "stat_dt"));
+ assertNull(extractPercentiles(rsp, "stat_s"));
}
}
@SuppressWarnings({"unchecked"})
- private NamedList<Double> extractPercentils(SolrQueryResponse rsp, String key) {
+ private NamedList<Double> extractPercentiles(SolrQueryResponse rsp, String key) {
return ((NamedList<NamedList<NamedList<NamedList<Double>>>>) rsp.getValues().get("stats"))
.get("stats_fields")
.get(key)
diff --git a/solr/core/src/test/org/apache/solr/handler/component/SuggestComponentContextFilterQueryTest.java b/solr/core/src/test/org/apache/solr/handler/component/SuggestComponentContextFilterQueryTest.java
index 73100901d29..3d02dc6c395 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/SuggestComponentContextFilterQueryTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/SuggestComponentContextFilterQueryTest.java
@@ -328,7 +328,7 @@ public class SuggestComponentContextFilterQueryTest extends SolrTestCaseJ4 {
@Test
public void testStringContext() {
- // Here, the context field is a string, so it's case sensitive
+ // Here, the context field is a string, so it's case-sensitive
assertQ(
req(
"qt",
diff --git a/solr/core/src/test/org/apache/solr/handler/component/SuggestComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/SuggestComponentTest.java
index d469a981f94..76c45d12142 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/SuggestComponentTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/SuggestComponentTest.java
@@ -502,7 +502,7 @@ public class SuggestComponentTest extends SolrTestCaseJ4 {
@Test
public void testLoadOnStartup() throws Exception {
- final String suggester = "suggest_fuzzy_doc_manal_build";
+ final String suggester = "suggest_fuzzy_doc_manual_build";
// validate that this suggester is storing the lookup
@@ -671,7 +671,7 @@ public class SuggestComponentTest extends SolrTestCaseJ4 {
+ suggesterFuzzy
+ "']/lst[@name='exampel']/int[@name='numFound'][.='2']");
- // reload the core and wait for for the listeners to finish
+ // reload the core and wait for the listeners to finish
reloadCore(createNewCores);
if (System.getProperty(SYSPROP_NIGHTLY) != null) {
// wait some time here in nightly to make sure there are no race conditions in suggester build
diff --git a/solr/core/src/test/org/apache/solr/handler/component/TermVectorComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/TermVectorComponentTest.java
index ba710d8788d..cf52416418a 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/TermVectorComponentTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/TermVectorComponentTest.java
@@ -51,7 +51,7 @@ public class TermVectorComponentTest extends SolrTestCaseJ4 {
System.setProperty("solr.tests.id.docValues", "true");
break;
default:
- fail("Bad random number generatged not between 0-2 iunclusive");
+ fail("Bad random number generated not between 0-2 inclusive");
break;
}
initCore("solrconfig.xml", "schema.xml");
diff --git a/solr/core/src/test/org/apache/solr/handler/component/TestDistributedStatsComponentCardinality.java b/solr/core/src/test/org/apache/solr/handler/component/TestDistributedStatsComponentCardinality.java
index 3ed50c984b1..2aeea618ba8 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/TestDistributedStatsComponentCardinality.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/TestDistributedStatsComponentCardinality.java
@@ -91,7 +91,7 @@ public class TestDistributedStatsComponentCardinality extends BaseDistributedSea
final String strValue = "s" + currentLong;
- // with these values, we know that every doc indexed has a unique value in all of
+ // with these values, we know that every doc indexed has a unique value in all
// the fields we will compute cardinality against. which means the number of docs
// matching a query is the true cardinality for each field
return sdoc(
@@ -141,8 +141,8 @@ public class TestDistributedStatsComponentCardinality extends BaseDistributedSea
for (int i = 0; i < NUM_QUERIES; i++) {
// testing shows that on random data, at the size we're dealing with,
- // MINIMUM_LOG2M_PARAM is just too absurdly small to give anything remotely close the
- // the theoretically expected relative error.
+ // MINIMUM_LOG2M_PARAM is just too absurdly small to give anything remotely close to the
+ // theoretically expected relative error.
//
// So we have to use a slightly higher lower bound on what log2m values we randomly test
final int log2m =
@@ -204,11 +204,11 @@ public class TestDistributedStatsComponentCardinality extends BaseDistributedSea
// WTF? - https://github.com/aggregateknowledge/java-hll/issues/15
//
- // aparently we can't rely on estimates always being more accurate with higher log2m values?
+ // apparently we can't rely on estimates always being more accurate with higher log2m values?
// so for now, just try testing accuracy values that differ by at least 0.5
//
// (that should give us a significant enough log2m diff that the "highAccuracy" is always
- // more accurate -- if, not then the entire premise of the float value is fundementally bogus)
+ // more accurate -- if, not then the entire premise of the float value is fundamentally bogus)
//
final double lowAccuracy = random().nextDouble() / 2;
// final double highAccuracy = Math.min(1.0D, lowAccuracy + (random().nextDouble() / 2));
@@ -222,8 +222,8 @@ public class TestDistributedStatsComponentCardinality extends BaseDistributedSea
// can't use STAT_FIELDS here ...
//
- // hueristic differences for regwidth on 32 bit values mean we get differences
- // between estimates for the normal field vs the prehashed (long) field
+ // heuristic differences for regwidth on 32 bit values mean we get differences
+ // between estimates for the normal field vs the prehashed (long) field,
//
// so we settle for only testing things where the regwidth is consistent
// w/the prehashed long...
diff --git a/solr/core/src/test/org/apache/solr/handler/component/TestExpandComponent.java b/solr/core/src/test/org/apache/solr/handler/component/TestExpandComponent.java
index 56a8f658d15..1b3cfebd67a 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/TestExpandComponent.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/TestExpandComponent.java
@@ -255,7 +255,7 @@ public class TestExpandComponent extends SolrTestCaseJ4 {
// Test with nullPolicy...
// Main result set should include the doc(s) with null value in the collapse field.
- // By default ExpandComponent should ignore docs with null values in the collapse fields....
+ // By default, ExpandComponent should ignore docs with null values in the collapse fields....
params = new ModifiableSolrParams();
params.add("q", "*:*");
params.add("defType", "edismax");
diff --git a/solr/core/src/test/org/apache/solr/handler/component/TestPivotHelperCode.java b/solr/core/src/test/org/apache/solr/handler/component/TestPivotHelperCode.java
index 384a2449334..0d39d2bd67e 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/TestPivotHelperCode.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/TestPivotHelperCode.java
@@ -23,7 +23,7 @@ import org.apache.lucene.tests.util.TestUtil;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.common.util.SuppressForbidden;
-/** A light weight test of various helper methods used in pivot faceting */
+/** A lightweight test of various helper methods used in pivot faceting */
public class TestPivotHelperCode extends SolrTestCaseJ4 {
/**
diff --git a/solr/core/src/test/org/apache/solr/handler/designer/TestSchemaDesignerAPI.java b/solr/core/src/test/org/apache/solr/handler/designer/TestSchemaDesignerAPI.java
index 26258d52ac0..b615bb2b907 100644
--- a/solr/core/src/test/org/apache/solr/handler/designer/TestSchemaDesignerAPI.java
+++ b/solr/core/src/test/org/apache/solr/handler/designer/TestSchemaDesignerAPI.java
@@ -316,7 +316,7 @@ public class TestSchemaDesignerAPI extends SolrCloudTestCase implements SchemaDe
assertNotNull(rsp.getValues().get("fieldTypes"));
List<String> docIds = (List<String>) rsp.getValues().get("docIds");
assertNotNull(docIds);
- assertEquals(100, docIds.size()); // designer limits doc ids to top 100
+ assertEquals(100, docIds.size()); // designer limits the doc ids to top 100
String idField = rsp.getValues()._getStr(UNIQUE_KEY_FIELD_PARAM, null);
assertNotNull(idField);
diff --git a/solr/core/src/test/org/apache/solr/handler/export/TestExportWriter.java b/solr/core/src/test/org/apache/solr/handler/export/TestExportWriter.java
index 8770407ed70..25dd2ca0e07 100644
--- a/solr/core/src/test/org/apache/solr/handler/export/TestExportWriter.java
+++ b/solr/core/src/test/org/apache/solr/handler/export/TestExportWriter.java
@@ -1080,7 +1080,7 @@ public class TestExportWriter extends SolrTestCaseJ4 {
addDouble(doc, random().nextDouble() * 3000 * (random().nextBoolean() ? 1 : -1), false);
addDate(doc, dateFormat.format(new Date()), false);
- // MV need to be unique in order to be the same in Trie vs Points
+ // MV needs to be unique in order to be the same in Trie vs Points
Set<Integer> ints = new HashSet<>();
Set<Long> longs = new HashSet<>();
Set<Float> floats = new HashSet<>();
diff --git a/solr/core/src/test/org/apache/solr/handler/tagger/Tagger2Test.java b/solr/core/src/test/org/apache/solr/handler/tagger/Tagger2Test.java
index b9576f66f35..096be4ee27b 100644
--- a/solr/core/src/test/org/apache/solr/handler/tagger/Tagger2Test.java
+++ b/solr/core/src/test/org/apache/solr/handler/tagger/Tagger2Test.java
@@ -66,8 +66,8 @@ public class Tagger2Test extends TaggerTestCase {
assertTags("He lived in Clayton North Carolina", "in", "Clayton", "North Carolina");
}
- // As of Lucene/Solr 4.9, StandardTokenizer never does this anymore (reported to Lucene dev-list,
- // Jan 26th 2015. Honestly it's not particularly important to us but it renders this test
+ // As of Lucene/Solr 4.9, StandardTokenizer never does this (reported to Lucene dev-list,
+ // Jan 26th 2015). Honestly it's not particularly important to us, but it renders this test
// pointless.
/** Orig issue https://github.com/OpenSextant/SolrTextTagger/issues/2 related: #13 */
@Test
diff --git a/solr/core/src/test/org/apache/solr/handler/tagger/TaggingAttributeTest.java b/solr/core/src/test/org/apache/solr/handler/tagger/TaggingAttributeTest.java
index a05842733ee..cb5b72930d8 100644
--- a/solr/core/src/test/org/apache/solr/handler/tagger/TaggingAttributeTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/tagger/TaggingAttributeTest.java
@@ -26,7 +26,7 @@ import org.junit.BeforeClass;
import org.junit.Test;
/**
- * Test the {@link TaggerRequestHandler} with a Analyzer chain that does use the {@link
+ * Test the {@link TaggerRequestHandler} with an Analyzer chain that does use the {@link
* TaggingAttribute}. See the test configuration under 'taggingattribute'.
*/
public class TaggingAttributeTest extends TaggerTestCase {
@@ -44,7 +44,7 @@ public class TaggingAttributeTest extends TaggerTestCase {
public void testTaggingAttribute() throws Exception {
baseParams.set(
"field", "name_tagAttribute"); // has WordLengthTaggingFilter using the TaggingAttribute
- // this test is based on the longest dominant right test, so we use the
+ // this test is based on the longest dominant right test, so we use
// the same TagClusterReducer setting
baseParams.set("overlaps", "LONGEST_DOMINANT_RIGHT");
@@ -62,8 +62,8 @@ public class TaggingAttributeTest extends TaggerTestCase {
assertTags(
"He lived in San Francisco.",
- // "in", "San Francisco"); //whis would be expected without taggable
- "Francisco"); // this are the expected results with taggable
+ // "in", "San Francisco"); //this would be expected without taggable
+ "Francisco"); // this is the expected result with taggable
assertTags(
"He enrolled in San Francisco State College of California",
diff --git a/solr/core/src/test/org/apache/solr/handler/tagger/WordLengthTaggingFilter.java b/solr/core/src/test/org/apache/solr/handler/tagger/WordLengthTaggingFilter.java
index 599954fb980..68b2f3671b9 100644
--- a/solr/core/src/test/org/apache/solr/handler/tagger/WordLengthTaggingFilter.java
+++ b/solr/core/src/test/org/apache/solr/handler/tagger/WordLengthTaggingFilter.java
@@ -31,7 +31,7 @@ import org.apache.lucene.analysis.tokenattributes.OffsetAttribute;
* Simple TokenFilter that lookup only Tokens with more as the parsed number of chars.
*
* <p><b>NOTE:</b>This implementation is only intended to be used as an example and for unit testing
- * the {@link TaggingAttribute} feature. Typically implementations will be based on NLP results
+ * the {@link TaggingAttribute} feature. Typically, implementations will be based on NLP results
* (e.g. using POS tags or detected Named Entities).
*
* <p><b>Example Usage:</b>
@@ -81,7 +81,7 @@ public class WordLengthTaggingFilter extends TokenFilter {
* minimum.
*
* @param input the TokenStream to consume tokens from
- * @param minLength The minimum length to lookup a Token. <code>null</code> or <= 0 to use the
+ * @param minLength The minimum length to look up a Token. <code>null</code> or <= 0 to use the
* #DEFAULT_MIN_LENGTH
*/
public WordLengthTaggingFilter(TokenStream input, Integer minLength) {
diff --git a/solr/core/src/test/org/apache/solr/highlight/HighlighterMaxOffsetTest.java b/solr/core/src/test/org/apache/solr/highlight/HighlighterMaxOffsetTest.java
index b5bdec0e6c8..7a3f49f3f6b 100644
--- a/solr/core/src/test/org/apache/solr/highlight/HighlighterMaxOffsetTest.java
+++ b/solr/core/src/test/org/apache/solr/highlight/HighlighterMaxOffsetTest.java
@@ -47,7 +47,7 @@ public class HighlighterMaxOffsetTest extends SolrTestCaseJ4 {
assertU(
adoc(
- "indexed_multiValued", REALY_LONG_TEXT,
+ "indexed_multiValued", REALLY_LONG_TEXT,
"indexed_multiValued", SHORT_TEXT,
"id", "DOC1"));
@@ -78,7 +78,7 @@ public class HighlighterMaxOffsetTest extends SolrTestCaseJ4 {
assertU(
adoc(
- "non_indexed_multiValued", REALY_LONG_TEXT,
+ "non_indexed_multiValued", REALLY_LONG_TEXT,
"non_indexed_multiValued", SHORT_TEXT,
"id", "DOC1"));
@@ -91,7 +91,7 @@ public class HighlighterMaxOffsetTest extends SolrTestCaseJ4 {
assertU(
adoc(
- "content", REALY_LONG_TEXT,
+ "content", REALLY_LONG_TEXT,
"content", SHORT_TEXT,
"id", "DOC1"));
@@ -115,7 +115,7 @@ public class HighlighterMaxOffsetTest extends SolrTestCaseJ4 {
+ "']/str[contains(., '<em>jpeg</em>')]");
}
- private static String REALY_LONG_TEXT =
+ private static String REALLY_LONG_TEXT =
"Green TRC=0.0, 0.0000763, 0.0001526, 0.0002289, 0.0003052, 0.0003815, 0.0004578, 0.0005341, 0.0006104, 0.0006867, 0.000763, 0.0008392, 0.0009003, 0.0009766, 0.0010529, 0.0011292, 0.0012055, 0.0012818, 0.0013581, 0.0014343, 0.0015106, 0.0015869, 0.0016632, 0.0017395, 0.0018158, 0.0018921, 0.0019684, 0.0020447, 0.002121, 0.0021973, 0.0022736, 0.0023499, 0.0024262, 0.0025025, 0.0025788, 0.0026551, 0.0027161, 0.0027924, 0.0028687, 0.002945, 0.0030213, 0.0030976, 0.0031739, 0.0032502, [...]
+ "Rewed TRC=0.0, 0.0000763, 0.0001526, 0.0002289, 0.0003052, 0.0003815, 0.0004578, 0.0005341, 0.0006104, 0.0006867, 0.000763, 0.0008392, 0.0009003, 0.0009766, 0.0010529, 0.0011292, 0.0012055, 0.0012818, 0.0013581, 0.0014343, 0.0015106, 0.0015869, 0.0016632, 0.0017395, 0.0018158, 0.0018921, 0.0019684, 0.0020447, 0.002121, 0.0021973, 0.0022736, 0.0023499, 0.0024262, 0.0025025, 0.0025788, 0.0026551, 0.0027161, 0.0027924, 0.0028687, 0.002945, 0.0030213, 0.0030976, 0.0031739, 0.003 [...]
diff --git a/solr/core/src/test/org/apache/solr/highlight/HighlighterTest.java b/solr/core/src/test/org/apache/solr/highlight/HighlighterTest.java
index 0a42d2e9f9a..3d1e5c24085 100644
--- a/solr/core/src/test/org/apache/solr/highlight/HighlighterTest.java
+++ b/solr/core/src/test/org/apache/solr/highlight/HighlighterTest.java
@@ -52,7 +52,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
"a long days night this should be a piece of text which is is is is is is is is is is is is is is is is is is is "
+ "is is is is is isis is is is is is is is is is is is is is is is is is is is is is is is is is is is is is is is is is is is is is is is is is "
+ "is is is is is is is is is is is is is "
- + "is is is is is is is is is is is is is is is is is is is is sufficiently lengthly to produce multiple fragments which are not concatenated "
+ + "is is is is is is is is is is is is is is is is is is is is sufficiently lengthily to produce multiple fragments which are not concatenated "
+ "at all--we want two disjoint long fragments.";
@BeforeClass
diff --git a/solr/core/src/test/org/apache/solr/internal/csv/CSVParserTest.java b/solr/core/src/test/org/apache/solr/internal/csv/CSVParserTest.java
index 7047b3ffe78..d7b5e0bcbd8 100644
--- a/solr/core/src/test/org/apache/solr/internal/csv/CSVParserTest.java
+++ b/solr/core/src/test/org/apache/solr/internal/csv/CSVParserTest.java
@@ -147,7 +147,7 @@ public class CSVParserTest extends TestCase {
assertEquals(CSVParser.TT_EOF + ";;", parser.testNextToken());
}
- // encapsulator tokenizer (sinle line)
+ // encapsulator tokenizer (single line)
public void testNextToken4() throws IOException {
/* file: a,"foo",b
* a, " foo",b
@@ -182,7 +182,7 @@ public class CSVParserTest extends TestCase {
assertEquals(CSVParser.TT_EOF + ";\n\t \n;", parser.testNextToken());
}
- // change delimiters, comment, encapsulater
+ // change delimiters, comment, encapsulator
public void testNextToken6() throws IOException {
/* file: a;'b and \' more
* '
@@ -403,7 +403,7 @@ public class CSVParserTest extends TestCase {
{"one", "t\\,wo"}, // backslash in quotes only escapes a delimiter (",")
{"one", "two", "th,ree"},
{"a\\\\"}, // backslash in quotes only escapes a delimiter (",")
- {"a\\", "b"}, // a backslash must be returnd
+ {"a\\", "b"}, // a backslash must be returned
{"a\\\\,b"} // backslash in quotes only escapes a delimiter (",")
};
CSVParser parser = new CSVParser(new StringReader(code));
diff --git a/solr/core/src/test/org/apache/solr/legacy/TestLegacyNumericUtils.java b/solr/core/src/test/org/apache/solr/legacy/TestLegacyNumericUtils.java
index f26b85f2bc4..81843565925 100644
--- a/solr/core/src/test/org/apache/solr/legacy/TestLegacyNumericUtils.java
+++ b/solr/core/src/test/org/apache/solr/legacy/TestLegacyNumericUtils.java
@@ -318,7 +318,7 @@ public class TestLegacyNumericUtils extends SolrTestCase {
}
}
- // INFO: Tests for trieCodeLong()/trieCodeInt() not needed because implicitely tested by range
+ // INFO: Tests for trieCodeLong()/trieCodeInt() not needed because implicitly tested by range
// filter tests
/** Note: The neededBounds Iterable must be unsigned (easier understanding what's happening) */
@@ -365,7 +365,8 @@ public class TestLegacyNumericUtils extends SolrTestCase {
if (useBitSet) {
// after flipping all bits in the range, the cardinality should be zero
bits.flip(0, upper - lower + 1);
- assertEquals("The sub-range concenated should match the whole range", 0, bits.cardinality());
+ assertEquals(
+ "The sub-range concatenated should match the whole range", 0, bits.cardinality());
}
}
@@ -576,7 +577,8 @@ public class TestLegacyNumericUtils extends SolrTestCase {
0x80000000000000L, 0x80000000000003L),
Arrays.asList(4, 8));
- // the full long range should only consist of a lowest precision range; no bitset testing here,
+ // the full long range should only consist of the lowest precision range; no bitset testing
+ // here,
// as too much memory needed :-)
assertLongRangeSplit(
Long.MIN_VALUE, Long.MAX_VALUE, 8, false, Arrays.asList(0x00L, 0xffL), Arrays.asList(56));
@@ -593,7 +595,7 @@ public class TestLegacyNumericUtils extends SolrTestCase {
assertLongRangeSplit(
Long.MIN_VALUE, Long.MAX_VALUE, 1, false, Arrays.asList(0x0L, 0x1L), Arrays.asList(63));
- // a inverse range should produce no sub-ranges
+ // the inverse range should produce no sub-ranges
assertLongRangeSplit(
9500L, -5000L, 4, false, Collections.<Long>emptyList(), Collections.<Integer>emptyList());
@@ -651,7 +653,8 @@ public class TestLegacyNumericUtils extends SolrTestCase {
if (useBitSet) {
// after flipping all bits in the range, the cardinality should be zero
bits.flip(0, upper - lower + 1);
- assertEquals("The sub-range concenated should match the whole range", 0, bits.cardinality());
+ assertEquals(
+ "The sub-range concatenated should match the whole range", 0, bits.cardinality());
}
}
@@ -688,7 +691,7 @@ public class TestLegacyNumericUtils extends SolrTestCase {
0x800000, 0x800003),
Arrays.asList(4, 8));
- // the full int range should only consist of a lowest precision range; no bitset testing here,
+ // the full int range should only consist of the lowest precision range; no bitset testing here,
// as too much memory needed :-)
assertIntRangeSplit(
Integer.MIN_VALUE,
@@ -710,7 +713,7 @@ public class TestLegacyNumericUtils extends SolrTestCase {
assertIntRangeSplit(
Integer.MIN_VALUE, Integer.MAX_VALUE, 1, false, Arrays.asList(0x0, 0x1), Arrays.asList(31));
- // a inverse range should produce no sub-ranges
+ // the inverse range should produce no sub-ranges
assertIntRangeSplit(
9500, -5000, 4, false, Collections.<Integer>emptyList(), Collections.<Integer>emptyList());
diff --git a/solr/core/src/test/org/apache/solr/logging/TestLogWatcher.java b/solr/core/src/test/org/apache/solr/logging/TestLogWatcher.java
index 6c7d9149647..11cdf8e627e 100644
--- a/solr/core/src/test/org/apache/solr/logging/TestLogWatcher.java
+++ b/solr/core/src/test/org/apache/solr/logging/TestLogWatcher.java
@@ -41,14 +41,14 @@ public class TestLogWatcher extends SolrTestCaseJ4 {
// Create several log watchers and ensure that new messages go to the new watcher.
// NOTE: Since the superclass logs messages, it's possible that there are one or more
- // messages in the queue at the start, especially with asynch logging.
+ // messages in the queue at the start, especially with async logging.
// All we really care about is that new watchers get the new messages, so test for that
// explicitly. See SOLR-12732.
@Test
public void testLog4jWatcher() throws InterruptedException {
LogWatcher<?> watcher = null;
int lim = random().nextInt(3) + 2;
- // Every time through this loop, insure that, of all the test messages that have been logged,
+ // Every time through this loop, ensure that, of all the test messages that have been logged,
// only the current test message is present. NOTE: there may be log messages from the superclass
// the first time around.
List<String> oldMessages = new ArrayList<>(lim);
diff --git a/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java b/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java
index d4334ba113b..a3c9e54b9eb 100644
--- a/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java
@@ -130,7 +130,7 @@ public class SolrMetricsIntegrationTest extends SolrTestCaseJ4 {
@After
public void afterTest() throws Exception {
if (null == metricManager) {
- return; // test failed to init, nothing to cleanup
+ return; // test failed to init, nothing to clean up
}
SolrCoreMetricManager coreMetricManager = h.getCore().getCoreMetricManager();
diff --git a/solr/core/src/test/org/apache/solr/metrics/reporters/SolrJmxReporterTest.java b/solr/core/src/test/org/apache/solr/metrics/reporters/SolrJmxReporterTest.java
index eaff106a42a..403b36dac78 100644
--- a/solr/core/src/test/org/apache/solr/metrics/reporters/SolrJmxReporterTest.java
+++ b/solr/core/src/test/org/apache/solr/metrics/reporters/SolrJmxReporterTest.java
@@ -142,7 +142,7 @@ public class SolrJmxReporterTest extends SolrTestCaseJ4 {
@After
public void afterTest() throws Exception {
if (null == metricManager) {
- return; // test failed to init, nothing to cleanup
+ return; // test failed to init, nothing to clean up
}
metricManager.closeReporters(coreMetricManager.getRegistryName());
diff --git a/solr/core/src/test/org/apache/solr/pkg/TestPackages.java b/solr/core/src/test/org/apache/solr/pkg/TestPackages.java
index 1b8ac54026c..2f0fb760927 100644
--- a/solr/core/src/test/org/apache/solr/pkg/TestPackages.java
+++ b/solr/core/src/test/org/apache/solr/pkg/TestPackages.java
@@ -582,7 +582,7 @@ public class TestPackages extends SolrCloudTestCase {
.withPayload(Collections.singletonMap("add", add))
.build();
- // the files is not yet there. The command should fail with error saying "No such file"
+ // the files are not yet there. The command should fail with error saying "No such file"
expectError(req, cluster.getSolrClient(), errPath, "No such file:");
// post the jar file. No signature is sent
@@ -593,7 +593,7 @@ public class TestPackages extends SolrCloudTestCase {
// now we upload the keys
byte[] derFile = readFile("cryptokeys/pub_key512.der");
uploadKey(derFile, PackageStoreAPI.KEYS_DIR + "/pub_key512.der", cluster);
- // and upload the same file with a different name but it has proper signature
+ // and upload the same file with a different name, but it has proper signature
postFileAndWait(
cluster,
"runtimecode/runtimelibs.jar.bin",
diff --git a/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java b/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java
index 5f1ea6d2ecb..99170a4d432 100644
--- a/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java
+++ b/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java
@@ -1128,7 +1128,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {
{
// an "uninvertible=false" field is not be facetable using the "default" method,
- // or any explicit method other then "enum".
+ // or any explicit method other than "enum".
//
// it should behave the same as any attempt (using any method) at faceting on
// and "indexed=false docValues=false" field -- returning no buckets.
@@ -1170,7 +1170,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {
{
// the only way to facet on an "uninvertible=false" field is to explicitly request
// facet.method=enum in which case it should behave consistently with it's copyField source &
- // equivilent docValues field (using any method for either of them)
+ // equivalent docValues field (using any method for either of them)
final List<SolrParams> paramSets = new ArrayList<>();
for (String min : Arrays.asList("0", "1")) {
diff --git a/solr/core/src/test/org/apache/solr/request/TestFacetMethods.java b/solr/core/src/test/org/apache/solr/request/TestFacetMethods.java
index 3694f029222..25744d09669 100644
--- a/solr/core/src/test/org/apache/solr/request/TestFacetMethods.java
+++ b/solr/core/src/test/org/apache/solr/request/TestFacetMethods.java
@@ -92,7 +92,7 @@ public class TestFacetMethods extends SolrTestCase {
for (int props : Arrays.asList(0 ^ UNINVERTIBLE, 0)) {
SchemaField field = new SchemaField("field", new TrieIntField(), props, null);
- // FCS is used by default for most requested methods other then UIF -- regardless of mincount
+ // FCS is used by default for most requested methods other than UIF -- regardless of mincount
for (int mincount : Arrays.asList(0, 1)) {
assertEquals(FacetMethod.FCS, SimpleFacets.selectFacetMethod(field, null, mincount));
assertEquals(
@@ -115,7 +115,7 @@ public class TestFacetMethods extends SolrTestCase {
for (int props : Arrays.asList(MULTIVALUED ^ UNINVERTIBLE, MULTIVALUED)) {
SchemaField field = new SchemaField("field", new TrieIntField(), props, null);
- // FC is used by default for most requested methods other then UIF -- regardless of mincount
+ // FC is used by default for most requested methods other than UIF -- regardless of mincount
for (int mincount : Arrays.asList(0, 1)) {
assertEquals(FacetMethod.FC, SimpleFacets.selectFacetMethod(field, null, mincount));
assertEquals(
diff --git a/solr/core/src/test/org/apache/solr/request/TestFaceting.java b/solr/core/src/test/org/apache/solr/request/TestFaceting.java
index 641b1bd86db..63df2a7052d 100644
--- a/solr/core/src/test/org/apache/solr/request/TestFaceting.java
+++ b/solr/core/src/test/org/apache/solr/request/TestFaceting.java
@@ -151,7 +151,7 @@ public class TestFaceting extends SolrTestCaseJ4 {
public void testFacets() {
StringBuilder sb = new StringBuilder();
- // go over 4096 to test some of the buffer resizing
+ // go over 4096 to test some buffer resizing
for (int i = 0; i < 5000; i++) {
sb.append(t(i));
sb.append(' ');
@@ -231,7 +231,7 @@ public class TestFaceting extends SolrTestCaseJ4 {
public void testRegularBig() {
StringBuilder sb = new StringBuilder();
- // go over 4096 to test some of the buffer resizing
+ // go over 4096 to test some buffer resizing
int nTerms = 7;
for (int i = 0; i < nTerms; i++) {
sb.append(t(i));
@@ -815,7 +815,7 @@ public class TestFaceting extends SolrTestCaseJ4 {
random().nextBoolean() ? new String[] {} : new String[] {"facet.method", "uif"};
// All I really care about here is the chance to fire off a bunch of threads to the
- // UnIninvertedField.get method to insure that we get into/out of the lock. Again, it's not
+ // UnInvertedField.get method to ensure that we get into/out of the lock. Again, it's not
// entirely deterministic, but it might catch bad stuff occasionally...
assertQ(
"check threading, more threads than fields",
diff --git a/solr/core/src/test/org/apache/solr/request/TestIntervalFaceting.java b/solr/core/src/test/org/apache/solr/request/TestIntervalFaceting.java
index d47b042ff8f..f32e504d84d 100644
--- a/solr/core/src/test/org/apache/solr/request/TestIntervalFaceting.java
+++ b/solr/core/src/test/org/apache/solr/request/TestIntervalFaceting.java
@@ -375,7 +375,7 @@ public class TestIntervalFaceting extends SolrTestCaseJ4 {
docFields[8] = "test_f";
docFields[9] = String.valueOf(randomFloat(cardinality));
docFields[10] = "test_d";
- docFields[11] = String.valueOf(raondomDouble(cardinality));
+ docFields[11] = String.valueOf(randomDouble(cardinality));
docFields[12] = "test_dt";
docFields[13] = dateFormat.format(new Date(randomMs(cardinality)));
for (int j = 14; j < docFields.length; ) {
@@ -388,7 +388,7 @@ public class TestIntervalFaceting extends SolrTestCaseJ4 {
docFields[j++] = "test_fs";
docFields[j++] = String.valueOf(randomFloat(cardinality));
docFields[j++] = "test_ds";
- docFields[j++] = String.valueOf(raondomDouble(cardinality));
+ docFields[j++] = String.valueOf(randomDouble(cardinality));
docFields[j++] = "test_dts";
docFields[j++] = dateFormat.format(new Date(randomMs(cardinality)));
}
@@ -409,7 +409,7 @@ public class TestIntervalFaceting extends SolrTestCaseJ4 {
+ random().nextInt(cardinality) * 1000 * (random().nextBoolean() ? 1 : -1);
}
- double raondomDouble(int cardinality) {
+ double randomDouble(int cardinality) {
if (rarely()) {
int num = random().nextInt(4);
if (num == 0) return Double.NEGATIVE_INFINITY;
@@ -564,8 +564,8 @@ public class TestIntervalFaceting extends SolrTestCaseJ4 {
} else {
switch (ft.getNumberType()) {
case DOUBLE:
- values[0] = raondomDouble(max);
- values[1] = raondomDouble(max);
+ values[0] = randomDouble(max);
+ values[1] = randomDouble(max);
break;
case FLOAT:
values[0] = randomFloat(max);
@@ -1032,13 +1032,13 @@ public class TestIntervalFaceting extends SolrTestCaseJ4 {
}
for (long l : lowerThanStart) {
assertEquals(
- "Value " + l + " should be LOWER_THAN_START for inteval " + interval,
+ "Value " + l + " should be LOWER_THAN_START for interval " + interval,
IntervalCompareResult.LOWER_THAN_START,
interval.includes(l));
}
for (long l : graterThanEnd) {
assertEquals(
- "Value " + l + " should be GRATER_THAN_END for inteval " + interval,
+ "Value " + l + " should be GRATER_THAN_END for interval " + interval,
IntervalCompareResult.GREATER_THAN_END,
interval.includes(l));
}
@@ -1524,7 +1524,7 @@ public class TestIntervalFaceting extends SolrTestCaseJ4 {
assertU(adoc("id", "3", "test_i_dv", "2"));
assertU(commit());
- // Don't close this client, it would shutdown the CoreContainer
+ // Don't close this client, it would shut down the CoreContainer
@SuppressWarnings("resource")
SolrClient client = new EmbeddedSolrServer(h.getCoreContainer(), h.coreName);
@@ -1641,7 +1641,7 @@ public class TestIntervalFaceting extends SolrTestCaseJ4 {
}
assertQ(
- "Unexpected facet iterval count. Field:"
+ "Unexpected facet interval count. Field:"
+ field
+ ", Intervals: "
+ Arrays.toString(intervals)
diff --git a/solr/core/src/test/org/apache/solr/request/TestRemoteStreaming.java b/solr/core/src/test/org/apache/solr/request/TestRemoteStreaming.java
index e4de7fe09dc..c860b4677ee 100644
--- a/solr/core/src/test/org/apache/solr/request/TestRemoteStreaming.java
+++ b/solr/core/src/test/org/apache/solr/request/TestRemoteStreaming.java
@@ -114,7 +114,7 @@ public class TestRemoteStreaming extends SolrJettyTestBase {
assertSame(ErrorCode.BAD_REQUEST, ErrorCode.getErrorCode(se.code()));
}
- /** Compose a url that if you get it, it will delete all the data. */
+ /** Compose an url that if you get it, it will delete all the data. */
private String makeDeleteAllUrl() throws UnsupportedEncodingException {
HttpSolrClient client = (HttpSolrClient) getSolrClient();
String deleteQuery = "<delete><query>*:*</query></delete>";
diff --git a/solr/core/src/test/org/apache/solr/request/TestWriterPerf.java b/solr/core/src/test/org/apache/solr/request/TestWriterPerf.java
index 4738017f3a9..72323e1cb96 100644
--- a/solr/core/src/test/org/apache/solr/request/TestWriterPerf.java
+++ b/solr/core/src/test/org/apache/solr/request/TestWriterPerf.java
@@ -152,7 +152,7 @@ public class TestWriterPerf extends SolrTestCaseJ4 {
t1,
"Great works are performed, not by strength, but by perseverance.",
tag,
- "herculese",
+ "hercules",
tag,
"strong",
tag,
diff --git a/solr/core/src/test/org/apache/solr/request/macro/TestMacroExpander.java b/solr/core/src/test/org/apache/solr/request/macro/TestMacroExpander.java
index d9a3f073a06..88e0b19efdf 100644
--- a/solr/core/src/test/org/apache/solr/request/macro/TestMacroExpander.java
+++ b/solr/core/src/test/org/apache/solr/request/macro/TestMacroExpander.java
@@ -168,9 +168,9 @@ public class TestMacroExpander extends SolrTestCase {
assertEquals("${${b}}", meSkipOnMissingParams.expand("${${b}}"));
assertNull(meFailOnMissingParams.expand("${${b}}"));
- // Does not register as a syntax failure, although may subjectively look like it.
- // Consequently, the expression is replaced with nothing in default mode.
- // It'd be nice if there was a mode to leave un-resolved macros as-is when they don't resolve.
+ // Does not register as a syntax failure, although it may subjectively look like it.
+ // Consequently, the expression is replaced with nothing in default mode.
+ // It'd be nice if there was a mode to leave un-resolved macros as-is when they don't resolve.
assertEquals("preamble ", meSkipOnMissingParams.expand("preamble ${exp${bad}"));
assertNull(meFailOnMissingParams.expand("preamble ${exp${bad}"));
}
diff --git a/solr/core/src/test/org/apache/solr/response/TestPHPSerializedResponseWriter.java b/solr/core/src/test/org/apache/solr/response/TestPHPSerializedResponseWriter.java
index df370c26ce4..de6339650a3 100644
--- a/solr/core/src/test/org/apache/solr/response/TestPHPSerializedResponseWriter.java
+++ b/solr/core/src/test/org/apache/solr/response/TestPHPSerializedResponseWriter.java
@@ -70,7 +70,7 @@ public class TestPHPSerializedResponseWriter extends SolrTestCaseJ4 {
// extremely odd edge case: value is a map
// we use LinkedHashMap because we are doing a string comparison
- // later and we need predictible ordering
+ // later, and we need predictable ordering
LinkedHashMap<String, String> nl = new LinkedHashMap<>();
nl.put("data4.1", "hashmap");
nl.put("data4.2", "hello");
diff --git a/solr/core/src/test/org/apache/solr/response/TestRetrieveFieldsOptimizer.java b/solr/core/src/test/org/apache/solr/response/TestRetrieveFieldsOptimizer.java
index 04741a1c51e..5d654d670b8 100644
--- a/solr/core/src/test/org/apache/solr/response/TestRetrieveFieldsOptimizer.java
+++ b/solr/core/src/test/org/apache/solr/response/TestRetrieveFieldsOptimizer.java
@@ -158,7 +158,7 @@ public class TestRetrieveFieldsOptimizer extends SolrTestCaseJ4 {
h.getCore().setLatestSchema(schema);
- // All that setup work and we're only going to add a very few docs!
+ // All that setup work, and we're only going to add a very few docs!
for (int idx = 0; idx < 10; ++idx) {
addDocWithAllFields(idx);
}
@@ -312,7 +312,7 @@ public class TestRetrieveFieldsOptimizer extends SolrTestCaseJ4 {
// 1> we got all the values from the place we expected.
// 2> all the values we expect are actually returned.
//
- // NOTE: multiValued fields are _NOT_ fetched from docValues by design so we don't have to worry
+ // NOTE: multiValued fields are _NOT_ fetched from docValues by design, so we don't have to worry
// about set semantics
//
private void check(String flIn, SolrReturnFields.FIELD_SOURCES source) throws Exception {
@@ -523,7 +523,7 @@ class RetrieveField {
FieldType fieldType = schemaField.getType();
- // Why do mutliValued date fields get here as Strings whereas single-valued fields are Dates?
+ // Why do multiValued date fields get here as Strings whereas single-valued fields are Dates?
// Why do BoolFields sometimes get here as "F" or "T"?
if (val instanceof String) {
if (fieldType instanceof TrieDateField || fieldType instanceof DatePointField) {
@@ -620,7 +620,7 @@ class RetrieveField {
break;
}
// There are tricky cases with multiValued fields that are sometimes fetched from docValues that
- // obey set semantics so be sure we include at least one duplicate in a multValued field
+ // obey set semantics so be sure we include at least one duplicate in a multiValued field
// sometimes
if (random().nextBoolean() && valsAsStrings.size() > 1) {
valsAsStrings.add(valsAsStrings.get(random().nextInt(valsAsStrings.size())));
diff --git a/solr/core/src/test/org/apache/solr/response/transform/TestChildDocTransformer.java b/solr/core/src/test/org/apache/solr/response/transform/TestChildDocTransformer.java
index 2d6dcc70841..f321049f820 100644
--- a/solr/core/src/test/org/apache/solr/response/transform/TestChildDocTransformer.java
+++ b/solr/core/src/test/org/apache/solr/response/transform/TestChildDocTransformer.java
@@ -102,7 +102,7 @@ public class TestChildDocTransformer extends SolrTestCaseJ4 {
assertQ(req("q", "*:*", "fq", "subject:\"parentDocument\" ", "fl", "*,[child]"), test1);
- // shows parentFilter specified (not necessary any more) and also child
+ // shows parentFilter specified (not necessary anymore) and also child
assertQ(
req(
"q",
diff --git a/solr/core/src/test/org/apache/solr/rest/TestManagedResource.java b/solr/core/src/test/org/apache/solr/rest/TestManagedResource.java
index c8afa16951d..3f9dc81d26a 100644
--- a/solr/core/src/test/org/apache/solr/rest/TestManagedResource.java
+++ b/solr/core/src/test/org/apache/solr/rest/TestManagedResource.java
@@ -100,7 +100,7 @@ public class TestManagedResource extends SolrTestCaseJ4 {
this.managedData = managedData;
}
- // NOTE: These methods are better tested from the REST API
+ // NOTE: These methods are better tested from the REST API,
// so they are stubbed out here and not used in this test
@Override
diff --git a/solr/core/src/test/org/apache/solr/rest/schema/TestBulkSchemaAPI.java b/solr/core/src/test/org/apache/solr/rest/schema/TestBulkSchemaAPI.java
index 44728128b02..61c8128dee0 100644
--- a/solr/core/src/test/org/apache/solr/rest/schema/TestBulkSchemaAPI.java
+++ b/solr/core/src/test/org/apache/solr/rest/schema/TestBulkSchemaAPI.java
@@ -1469,7 +1469,7 @@ public class TestBulkSchemaAPI extends RestTestBase {
Similarity mainSim = core.getLatestSchema().getSimilarity();
assertNotNull(mainSim);
- // sanity check simfac vs sim in use - also verify infom called on simfac, otherwise exception
+ // check simfac vs sim in use - also verify inform called on simfac, otherwise exception
assertEquals(mainSim, simfac.getSimilarity());
assertTrue(
diff --git a/solr/core/src/test/org/apache/solr/rest/schema/analysis/TestManagedSynonymFilterFactory.java b/solr/core/src/test/org/apache/solr/rest/schema/analysis/TestManagedSynonymFilterFactory.java
index a8374977095..4fb10d69e48 100644
--- a/solr/core/src/test/org/apache/solr/rest/schema/analysis/TestManagedSynonymFilterFactory.java
+++ b/solr/core/src/test/org/apache/solr/rest/schema/analysis/TestManagedSynonymFilterFactory.java
@@ -210,7 +210,7 @@ public class TestManagedSynonymFilterFactory extends RestTestBase {
restTestHarness.reload();
- // now query for mad and we should see our test doc
+ // now query for mad, and we should see our test doc
assertQ(
"/select?q=" + newFieldName + ":mad",
"/response/lst[@name='responseHeader']/int[@name='status'] = '0'",
@@ -240,15 +240,15 @@ public class TestManagedSynonymFilterFactory extends RestTestBase {
// test for SOLR-6878 - by default, expand is true, but only applies when sending in a list
List<String> m2mSyns = new ArrayList<>();
- m2mSyns.addAll(Arrays.asList("funny", "entertaining", "whimiscal", "jocular"));
+ m2mSyns.addAll(Arrays.asList("funny", "entertaining", "whimsical", "jocular"));
assertJPut(endpoint, toJSONString(m2mSyns), "/responseHeader/status==0");
- assertJQ(endpoint + "/funny", "/funny==['entertaining','funny','jocular','whimiscal']");
+ assertJQ(endpoint + "/funny", "/funny==['entertaining','funny','jocular','whimsical']");
assertJQ(
endpoint + "/entertaining",
- "/entertaining==['entertaining','funny','jocular','whimiscal']");
- assertJQ(endpoint + "/jocular", "/jocular==['entertaining','funny','jocular','whimiscal']");
- assertJQ(endpoint + "/whimiscal", "/whimiscal==['entertaining','funny','jocular','whimiscal']");
+ "/entertaining==['entertaining','funny','jocular','whimsical']");
+ assertJQ(endpoint + "/jocular", "/jocular==['entertaining','funny','jocular','whimsical']");
+ assertJQ(endpoint + "/whimsical", "/whimsical==['entertaining','funny','jocular','whimsical']");
}
/** Can we add and remove stopwords with umlauts */
diff --git a/solr/core/src/test/org/apache/solr/rest/schema/analysis/TestManagedSynonymGraphFilterFactory.java b/solr/core/src/test/org/apache/solr/rest/schema/analysis/TestManagedSynonymGraphFilterFactory.java
index dc2c23b83c0..e2fcbda70b2 100644
--- a/solr/core/src/test/org/apache/solr/rest/schema/analysis/TestManagedSynonymGraphFilterFactory.java
+++ b/solr/core/src/test/org/apache/solr/rest/schema/analysis/TestManagedSynonymGraphFilterFactory.java
@@ -213,7 +213,7 @@ public class TestManagedSynonymGraphFilterFactory extends RestTestBase {
restTestHarness.reload();
- // now query for mad and we should see our test doc
+ // now query for mad, and we should see our test doc
assertQ(
"/select?q=" + newFieldName + ":mad",
"/response/lst[@name='responseHeader']/int[@name='status'] = '0'",
@@ -243,15 +243,15 @@ public class TestManagedSynonymGraphFilterFactory extends RestTestBase {
// test for SOLR-6878 - by default, expand is true, but only applies when sending in a list
List<String> m2mSyns = new ArrayList<>();
- m2mSyns.addAll(Arrays.asList("funny", "entertaining", "whimiscal", "jocular"));
+ m2mSyns.addAll(Arrays.asList("funny", "entertaining", "whimsical", "jocular"));
assertJPut(endpoint, toJSONString(m2mSyns), "/responseHeader/status==0");
- assertJQ(endpoint + "/funny", "/funny==['entertaining','funny','jocular','whimiscal']");
+ assertJQ(endpoint + "/funny", "/funny==['entertaining','funny','jocular','whimsical']");
assertJQ(
endpoint + "/entertaining",
- "/entertaining==['entertaining','funny','jocular','whimiscal']");
- assertJQ(endpoint + "/jocular", "/jocular==['entertaining','funny','jocular','whimiscal']");
- assertJQ(endpoint + "/whimiscal", "/whimiscal==['entertaining','funny','jocular','whimiscal']");
+ "/entertaining==['entertaining','funny','jocular','whimsical']");
+ assertJQ(endpoint + "/jocular", "/jocular==['entertaining','funny','jocular','whimsical']");
+ assertJQ(endpoint + "/whimsical", "/whimsical==['entertaining','funny','jocular','whimsical']");
}
/** Can we add and remove stopwords with umlauts */
diff --git a/solr/core/src/test/org/apache/solr/schema/BooleanFieldTest.java b/solr/core/src/test/org/apache/solr/schema/BooleanFieldTest.java
index 824d13c45f6..fd183b29473 100644
--- a/solr/core/src/test/org/apache/solr/schema/BooleanFieldTest.java
+++ b/solr/core/src/test/org/apache/solr/schema/BooleanFieldTest.java
@@ -27,7 +27,7 @@ public class BooleanFieldTest extends SolrTestCaseJ4 {
initCore("solrconfig-basic.xml", "schema15.xml");
}
- // Note, docValues-based boolean tests are tested elsewhere refering to more appropriate schemas
+ // Note, docValues-based boolean tests are tested elsewhere referring to more appropriate schemas
@Test
public void testBoolField() {
diff --git a/solr/core/src/test/org/apache/solr/schema/ChangedSchemaMergeTest.java b/solr/core/src/test/org/apache/solr/schema/ChangedSchemaMergeTest.java
index 8f373922cf3..7906b6399ed 100644
--- a/solr/core/src/test/org/apache/solr/schema/ChangedSchemaMergeTest.java
+++ b/solr/core/src/test/org/apache/solr/schema/ChangedSchemaMergeTest.java
@@ -55,7 +55,7 @@ public class ChangedSchemaMergeTest extends SolrTestCaseJ4 {
// sanity check our test...
assertTrue(
- "Effectiveness of tets depends on SchemaSimilarityFactory being SolrCoreAware "
+ "Effectiveness of tests depends on SchemaSimilarityFactory being SolrCoreAware, "
+ "something changed in the impl and now major portions of this test are useless",
SolrCoreAware.class.isAssignableFrom(simfac2));
diff --git a/solr/core/src/test/org/apache/solr/schema/CurrencyFieldTypeTest.java b/solr/core/src/test/org/apache/solr/schema/CurrencyFieldTypeTest.java
index 9fcd2f57c10..58eb8ccfdab 100644
--- a/solr/core/src/test/org/apache/solr/schema/CurrencyFieldTypeTest.java
+++ b/solr/core/src/test/org/apache/solr/schema/CurrencyFieldTypeTest.java
@@ -220,31 +220,31 @@ public class CurrencyFieldTypeTest extends SolrTestCaseJ4 {
assertQ(
req("fl", "*,score", "q", fieldName + ":[24.99,EUR TO 25.01,EUR]"), "//*[@numFound='1']");
- // Open ended ranges without currency
+ // Open-ended ranges without currency
assertQ(
req("fl", "*,score", "q", fieldName + ":[* TO *]"),
"//*[@numFound='" + (2 + 10 + negDocs) + "']");
- // Open ended ranges without currency
+ // Open-ended ranges without currency
assertQ(
req("fl", "*,score", "q", fieldName + ":*"), "//*[@numFound='" + (2 + 10 + negDocs) + "']");
- // Open ended ranges with currency
+ // Open-ended ranges with currency
assertQ(
req("fl", "*,score", "q", fieldName + ":[*,EUR TO *,EUR]"),
"//*[@numFound='" + (2 + 10 + negDocs) + "']");
- // Open ended start range without currency
+ // Open-ended start range without currency
assertQ(
req("fl", "*,score", "q", fieldName + ":[* TO 5,USD]"),
"//*[@numFound='" + (2 + 5 + negDocs) + "']");
- // Open ended start range with currency (currency for the * won't matter)
+ // Open-ended start range with currency (currency for the * won't matter)
assertQ(
req("fl", "*,score", "q", fieldName + ":[*,USD TO 5,USD]"),
"//*[@numFound='" + (2 + 5 + negDocs) + "']");
- // Open ended end range
+ // Open-ended end range
assertQ(req("fl", "*,score", "q", fieldName + ":[3 TO *]"), "//*[@numFound='8']");
}
@@ -392,8 +392,8 @@ public class CurrencyFieldTypeTest extends SolrTestCaseJ4 {
assertU(commit());
- // direct value source usage, gets "raw" form od default currency
- // default==USD, so raw==penies
+ // direct value source usage, gets "raw" form of default currency
+ // default==USD, so raw==pennies
assertQ(
req(
"fl", "id,func:field($f)",
@@ -517,12 +517,12 @@ public class CurrencyFieldTypeTest extends SolrTestCaseJ4 {
public void testRangeFacet() {
assumeTrue(
"This test is only applicable to the XML file based exchange rate provider "
- + "because it excercies the asymetric exchange rates option it supports",
+ + "because it exercises the asymmetric exchange rates option it supports",
expectedProviderClass.equals(FileExchangeRateProvider.class));
clearIndex();
- // NOTE: in our test conversions EUR uses an asynetric echange rate
+ // NOTE: in our test conversions EUR uses an asymmetric exchange rate
// these are the equivalent values when converting to: USD EUR GBP
assertU(adoc("id", "" + 1, fieldName, "10.00,USD")); // 10.00,USD 25.00,EUR 5.00,GBP
assertU(adoc("id", "" + 2, fieldName, "15.00,EUR")); // 7.50,USD 15.00,EUR 7.50,GBP
@@ -650,7 +650,8 @@ public class CurrencyFieldTypeTest extends SolrTestCaseJ4 {
"//lst[@name='xxx']/lst[@name='after' ]/long[@name='count'][.='1']",
"//lst[@name='xxx']/lst[@name='between']/long[@name='count'][.='4']");
- // NOTE: because of asymetric EUR exchange rate, these buckets are diff then the similar looking
+ // NOTE: because of asymmetric EUR exchange rate, these buckets are diff from the similar
+ // looking
// USD based request above
// This request converts the values in each doc into EUR to decide what range buck it's in.
assertQ(
@@ -710,8 +711,8 @@ public class CurrencyFieldTypeTest extends SolrTestCaseJ4 {
"//lst[@name='xxx']/lst[@name='after' ]/long[@name='count'][.='1']",
"//lst[@name='xxx']/lst[@name='between']/long[@name='count'][.='2']");
- // GBP has a symetric echange rate with USD, so these counts are *similar* to the USD based
- // request above... but the asymetric EUR/USD rate means that when computing counts realtive to
+ // GBP has a symmetric exchange rate with USD, so these counts are *similar* to the USD based
+ // request above... but the asymmetric EUR/USD rate means that when computing counts relative to
// GBP the EUR based docs wind up in diff buckets
assertQ(
"Ensure that we get correct facet counts back in GBP (facet.range)",
diff --git a/solr/core/src/test/org/apache/solr/schema/CustomAnalyzerStrField.java b/solr/core/src/test/org/apache/solr/schema/CustomAnalyzerStrField.java
index a8cf134aed7..d2fbf11e3e7 100644
--- a/solr/core/src/test/org/apache/solr/schema/CustomAnalyzerStrField.java
+++ b/solr/core/src/test/org/apache/solr/schema/CustomAnalyzerStrField.java
@@ -24,11 +24,11 @@ import org.apache.lucene.analysis.TokenFilterFactory;
import org.apache.lucene.analysis.core.KeywordTokenizerFactory;
import org.apache.lucene.tests.util.LuceneTestCase;
import org.apache.solr.analysis.TokenizerChain;
-import org.apache.solr.handler.admin.LukeRequestHandlerTest; // jdoc
+import org.apache.solr.handler.admin.LukeRequestHandlerTest;
/**
* A Test only custom FieldType that specifies null for various params when constructing
- * TokenizerChain instances to ensure that they are still well behaved.
+ * TokenizerChain instances to ensure that they are still well-behaved.
*
* @see LukeRequestHandlerTest#testNullFactories
*/
diff --git a/solr/core/src/test/org/apache/solr/schema/DenseVectorFieldTest.java b/solr/core/src/test/org/apache/solr/schema/DenseVectorFieldTest.java
index d3acb4d3291..61980b4ded6 100644
--- a/solr/core/src/test/org/apache/solr/schema/DenseVectorFieldTest.java
+++ b/solr/core/src/test/org/apache/solr/schema/DenseVectorFieldTest.java
@@ -114,9 +114,9 @@ public class DenseVectorFieldTest extends AbstractBadConfigTestBase {
}
@Test
- public void fieldDefinition_advancedCodecHyperParamer_shouldLoadSchemaField() throws Exception {
+ public void fieldDefinition_advancedCodecHyperParameter_shouldLoadSchemaField() throws Exception {
try {
- initCore("solrconfig_codec.xml", "schema-densevector-codec-hyperparamer.xml");
+ initCore("solrconfig_codec.xml", "schema-densevector-codec-hyperparameter.xml");
IndexSchema schema = h.getCore().getLatestSchema();
SchemaField vector = schema.getField("vector");
@@ -247,7 +247,7 @@ public class DenseVectorFieldTest extends AbstractBadConfigTestBase {
}
/**
- * The inputValue is an ArrayList with a type that dipends on the loader used: - {@link
+ * The inputValue is an ArrayList with a type that depends on the loader used: - {@link
* org.apache.solr.handler.loader.XMLLoader}, {@link org.apache.solr.handler.loader.CSVLoader}
* produces an ArrayList of String
*/
@@ -260,7 +260,7 @@ public class DenseVectorFieldTest extends AbstractBadConfigTestBase {
}
/**
- * The inputValue is an ArrayList with a type that dipends on the loader used: - {@link
+ * The inputValue is an ArrayList with a type that depends on the loader used: - {@link
* org.apache.solr.handler.loader.JsonLoader} produces an ArrayList of Double
*/
@Test
@@ -272,7 +272,7 @@ public class DenseVectorFieldTest extends AbstractBadConfigTestBase {
}
/**
- * The inputValue is an ArrayList with a type that dipends on the loader used: - {@link
+ * The inputValue is an ArrayList with a type that depends on the loader used: - {@link
* org.apache.solr.handler.loader.JavabinLoader} produces an ArrayList of Float
*/
@Test
diff --git a/solr/core/src/test/org/apache/solr/schema/DocValuesMultiTest.java b/solr/core/src/test/org/apache/solr/schema/DocValuesMultiTest.java
index 7c51b0e2e56..29488cc5f09 100644
--- a/solr/core/src/test/org/apache/solr/schema/DocValuesMultiTest.java
+++ b/solr/core/src/test/org/apache/solr/schema/DocValuesMultiTest.java
@@ -682,7 +682,7 @@ public class DocValuesMultiTest extends SolrTestCaseJ4 {
"//lst[@name='stringdv']/int[@name='abc19'][.='1']",
"//lst[@name='stringdv']/int[@name='abc49'][.='1']");
- // Even though offseting by 33, the sort order is abc1 abc11....abc2 so it throws the position
+ // Even though offsetting by 33, the sort order is abc1 abc11....abc2, so it throws the position
// in the return list off.
assertQ(
req(
diff --git a/solr/core/src/test/org/apache/solr/schema/IndexSchemaRuntimeFieldTest.java b/solr/core/src/test/org/apache/solr/schema/IndexSchemaRuntimeFieldTest.java
index 504409ab6d0..1572dd13e6a 100644
--- a/solr/core/src/test/org/apache/solr/schema/IndexSchemaRuntimeFieldTest.java
+++ b/solr/core/src/test/org/apache/solr/schema/IndexSchemaRuntimeFieldTest.java
@@ -34,7 +34,7 @@ public class IndexSchemaRuntimeFieldTest extends SolrTestCaseJ4 {
@Test
public void testRuntimeFieldCreation() {
// any field manipulation needs to happen when you know the core will not
- // be accepting any requests. Typically this is done within the inform()
+ // be accepting any requests. Typically, this is done within the inform()
// method. Since this is a single threaded test, we can change the fields
// willi-nilly
diff --git a/solr/core/src/test/org/apache/solr/schema/NotRequiredUniqueKeyTest.java b/solr/core/src/test/org/apache/solr/schema/NotRequiredUniqueKeyTest.java
index 8ac363a8505..ee514700854 100644
--- a/solr/core/src/test/org/apache/solr/schema/NotRequiredUniqueKeyTest.java
+++ b/solr/core/src/test/org/apache/solr/schema/NotRequiredUniqueKeyTest.java
@@ -30,7 +30,7 @@ public class NotRequiredUniqueKeyTest extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeTests() throws Exception {
- System.setProperty("enable.update.log", "false"); // usecase doesn't work with updateLog
+ System.setProperty("enable.update.log", "false"); // use case doesn't work with updateLog
initCore("solrconfig.xml", "schema-not-required-unique-key.xml");
}
diff --git a/solr/core/src/test/org/apache/solr/schema/PolyFieldTest.java b/solr/core/src/test/org/apache/solr/schema/PolyFieldTest.java
index f7d50c0f81c..14401db3646 100644
--- a/solr/core/src/test/org/apache/solr/schema/PolyFieldTest.java
+++ b/solr/core/src/test/org/apache/solr/schema/PolyFieldTest.java
@@ -63,7 +63,7 @@ public class PolyFieldTest extends SolrTestCaseJ4 {
home = schema.getField("home");
assertNotNull(home);
- home = schema.getField("homed"); // sub field suffix
+ home = schema.getField("homed"); // subfield suffix
assertNotNull(home);
assertTrue(home.isPolyField());
}
@@ -83,16 +83,16 @@ public class PolyFieldTest extends SolrTestCaseJ4 {
String point = xy[0] + "," + xy[1];
List<IndexableField> fields = home.createFields(point);
assertNotNull(pt.getSubType());
- int expectdNumFields = 3; // If DV=false, we expect one field per dimension plus a stored field
+ int expectedNumFields = 3; // If DV=false, we expect one field per dimension plus a stored field
if (pt.subField(home, 0, schema).hasDocValues()) {
- expectdNumFields += 2; // If docValues=true, then we expect two more fields
+ expectedNumFields += 2; // If docValues=true, then we expect two more fields
}
assertEquals(
"Unexpected fields created: " + Arrays.toString(fields.toArray()),
- expectdNumFields,
+ expectedNumFields,
fields.size());
// first two/four fields contain the values, last one is just stored and contains the original
- for (int i = 0; i < expectdNumFields; i++) {
+ for (int i = 0; i < expectedNumFields; i++) {
boolean hasValue =
fields.get(i).binaryValue() != null
|| fields.get(i).stringValue() != null
@@ -107,7 +107,7 @@ public class PolyFieldTest extends SolrTestCaseJ4 {
assertNotNull(home);
fields = home.createFields(point);
// one less field than with "home", since we aren't storing
- assertEquals(expectdNumFields - 1, fields.size(), 2);
+ assertEquals(expectedNumFields - 1, fields.size(), 2);
home = schema.getField("home_ns");
assertNotNull(home);
diff --git a/solr/core/src/test/org/apache/solr/schema/RequiredFieldsTest.java b/solr/core/src/test/org/apache/solr/schema/RequiredFieldsTest.java
index 765a2f47fc9..f001a510b7a 100644
--- a/solr/core/src/test/org/apache/solr/schema/RequiredFieldsTest.java
+++ b/solr/core/src/test/org/apache/solr/schema/RequiredFieldsTest.java
@@ -45,10 +45,10 @@ public class RequiredFieldsTest extends SolrTestCaseJ4 {
assertTrue(uniqueKey.isRequired());
assertTrue(schema.getRequiredFields().contains(uniqueKey));
- // we specified one required field, but all devault valued fields are also required
+ // we specified one required field, but all default valued fields are also required
Collection<SchemaField> requiredFields = schema.getRequiredFields();
int numDefaultFields = schema.getFieldsWithDefaultValue().size();
- assertEquals(numDefaultFields + 1 + 1, requiredFields.size()); // also the uniqueKey
+ assertEquals(numDefaultFields + 1 + 1, requiredFields.size()); // also, the uniqueKey
}
@Test
@@ -68,7 +68,7 @@ public class RequiredFieldsTest extends SolrTestCaseJ4 {
"info"));
assertU(commit());
- // Check it it is in the index
+ // Check if it is in the index
assertQ("should find one", req("id:529"), "//result[@numFound=1]");
// Add another document without the required subject field, which
@@ -150,12 +150,12 @@ public class RequiredFieldsTest extends SolrTestCaseJ4 {
+ "</add>");
assertU(commit());
- // Since the missing field had a devault value,
+ // Since the missing field had a default value,
// All three should have made it into the index
assertQ("should find three", req("name:nosubject"), "//result[@numFound=3]");
// Add three documents at once, with the middle with a bad field definition,
- // to establish the baselinie behavior for errors in a multi-ad submission
+ // to establish the baseline behavior for errors in a multi-ad submission
assertFailedU(
"adding 3 documents, with 2nd one with undefined field",
"<add>"
diff --git a/solr/core/src/test/org/apache/solr/schema/SchemaVersionSpecificBehaviorTest.java b/solr/core/src/test/org/apache/solr/schema/SchemaVersionSpecificBehaviorTest.java
index 76c60f583ef..91cbfab85a5 100644
--- a/solr/core/src/test/org/apache/solr/schema/SchemaVersionSpecificBehaviorTest.java
+++ b/solr/core/src/test/org/apache/solr/schema/SchemaVersionSpecificBehaviorTest.java
@@ -106,7 +106,7 @@ public class SchemaVersionSpecificBehaviorTest extends SolrTestCaseJ4 {
} else {
// for fields where the property is explicit, make sure
// we aren't getting a false negative because someone changed the
- // schema and we're inheriting from fieldType
+ // schema, and we're inheriting from fieldType
assertEquals(
f + " field's type has wrong multiValued is wrong for ver=" + ver,
(v < 1.1F),
@@ -145,7 +145,7 @@ public class SchemaVersionSpecificBehaviorTest extends SolrTestCaseJ4 {
} else {
// for fields where the property is explicit, make sure
// we aren't getting a false negative because someone changed the
- // schema and we're inheriting from fieldType
+ // schema, and we're inheriting from fieldType
assertEquals(
f + " field's type has wrong useDocValuesAsStored for ver=" + ver,
(v < 1.6F ? false : true),
@@ -184,7 +184,7 @@ public class SchemaVersionSpecificBehaviorTest extends SolrTestCaseJ4 {
} else {
// for fields where the property is explicit, make sure
// we aren't getting a false negative because someone changed the
- // schema and we're inheriting from fieldType
+ // schema, and we're inheriting from fieldType
assertEquals(
f + " field's type has wrong omitTfP for ver=" + ver,
(v < 1.2F ? false : !(field.getType() instanceof TextField)),
@@ -241,7 +241,7 @@ public class SchemaVersionSpecificBehaviorTest extends SolrTestCaseJ4 {
} else {
// for fields where the property is explicit, make sure
// we aren't getting a false negative because someone changed the
- // schema and we're inheriting from fieldType
+ // schema, and we're inheriting from fieldType
assertEquals(
f + " field's type has wrong omitNorm for ver=" + ver,
(v < 1.5F ? false : !(field.getType() instanceof TextField)),
diff --git a/solr/core/src/test/org/apache/solr/schema/SpatialRPTFieldTypeTest.java b/solr/core/src/test/org/apache/solr/schema/SpatialRPTFieldTypeTest.java
index 042d4492ca9..5a466765d61 100644
--- a/solr/core/src/test/org/apache/solr/schema/SpatialRPTFieldTypeTest.java
+++ b/solr/core/src/test/org/apache/solr/schema/SpatialRPTFieldTypeTest.java
@@ -143,7 +143,7 @@ public class SpatialRPTFieldTypeTest extends AbstractBadConfigTestBase {
public void testMaxDistErrConversion() throws Exception {
deleteCore();
File managedSchemaFile = new File(tmpConfDir, "managed-schema.xml");
- // Delete managed-schema.xml so it won't block parsing a new schema
+ // Delete managed-schema.xml, so it won't block parsing a new schema
Files.delete(managedSchemaFile.toPath());
System.setProperty("managed.schema.mutable", "true");
initCore(
@@ -266,7 +266,7 @@ public class SpatialRPTFieldTypeTest extends AbstractBadConfigTestBase {
throws Exception {
deleteCore();
File managedSchemaFile = new File(tmpConfDir, "managed-schema.xml");
- // Delete managed-schema.xml so it won't block parsing a new schema
+ // Delete managed-schema.xml, so it won't block parsing a new schema
Files.delete(managedSchemaFile.toPath());
System.setProperty("managed.schema.mutable", "true");
initCore(
diff --git a/solr/core/src/test/org/apache/solr/schema/TestCloudSchemaless.java b/solr/core/src/test/org/apache/solr/schema/TestCloudSchemaless.java
index 01fbb11c8ac..295896cecd3 100644
--- a/solr/core/src/test/org/apache/solr/schema/TestCloudSchemaless.java
+++ b/solr/core/src/test/org/apache/solr/schema/TestCloudSchemaless.java
@@ -46,7 +46,7 @@ public class TestCloudSchemaless extends AbstractFullDistribZkTestBase {
"/response/lst[@name='responseHeader']/int[@name='status'][.='0']";
@After
- public void teardDown() throws Exception {
+ public void tearDown() throws Exception {
super.tearDown();
closeRestTestHarnesses();
}
diff --git a/solr/core/src/test/org/apache/solr/schema/TestCollationField.java b/solr/core/src/test/org/apache/solr/schema/TestCollationField.java
index aae742161a4..2a9b8d65142 100644
--- a/solr/core/src/test/org/apache/solr/schema/TestCollationField.java
+++ b/solr/core/src/test/org/apache/solr/schema/TestCollationField.java
@@ -105,7 +105,7 @@ public class TestCollationField extends SolrTestCaseJ4 {
}
/**
- * Test rangequery again with the DIN 5007-1 collator. We do a range query of tone .. tp, in
+ * Test rangequery again with the DIN 5007-1 collator. We do a range query of tone... tp, in
* binary order this would retrieve nothing due to case and accent differences.
*/
public void testBasicRangeQuery() {
diff --git a/solr/core/src/test/org/apache/solr/schema/TestCollationFieldDocValues.java b/solr/core/src/test/org/apache/solr/schema/TestCollationFieldDocValues.java
index 0187f60dfd6..c9d76693d08 100644
--- a/solr/core/src/test/org/apache/solr/schema/TestCollationFieldDocValues.java
+++ b/solr/core/src/test/org/apache/solr/schema/TestCollationFieldDocValues.java
@@ -105,7 +105,7 @@ public class TestCollationFieldDocValues extends SolrTestCaseJ4 {
}
/**
- * Test rangequery again with the DIN 5007-1 collator. We do a range query of tone .. tp, in
+ * Test rangequery again with the DIN 5007-1 collator. We do a range query of tone... tp, in
* binary order this would retrieve nothing due to case and accent differences.
*/
public void testBasicRangeQuery() {
diff --git a/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java b/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java
index 49f8212304a..7290192dafc 100644
--- a/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java
+++ b/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java
@@ -201,7 +201,7 @@ public class TestManagedSchema extends AbstractBadConfigTestBase {
File managedSchemaFile = new File(tmpConfDir, "managed-schema.xml");
Files.delete(
managedSchemaFile
- .toPath()); // Delete managed-schema.xml so it won't block parsing a new schema
+ .toPath()); // Delete managed-schema.xml, so it won't block parsing a new schema
System.setProperty("managed.schema.mutable", "true");
initCore(
@@ -235,7 +235,7 @@ public class TestManagedSchema extends AbstractBadConfigTestBase {
assertSchemaResource(collection, "managed-schema.xml");
deleteCore();
File managedSchemaFile = new File(tmpConfDir, "managed-schema.xml");
- // Delete managed-schema.xml so it won't block parsing a new schema
+ // Delete managed-schema.xml, so it won't block parsing a new schema
Files.delete(managedSchemaFile.toPath());
System.setProperty("managed.schema.mutable", "true");
initCore(
@@ -288,7 +288,7 @@ public class TestManagedSchema extends AbstractBadConfigTestBase {
public void testAddFieldWhenItAlreadyExists() throws Exception {
deleteCore();
File managedSchemaFile = new File(tmpConfDir, "managed-schema.xml");
- // Delete managed-schema.xml so it won't block parsing a new schema
+ // Delete managed-schema.xml, so it won't block parsing a new schema
Files.delete(managedSchemaFile.toPath());
System.setProperty("managed.schema.mutable", "true");
initCore(
@@ -329,7 +329,7 @@ public class TestManagedSchema extends AbstractBadConfigTestBase {
public void testAddSameFieldTwice() throws Exception {
deleteCore();
File managedSchemaFile = new File(tmpConfDir, "managed-schema.xml");
- // Delete managed-schema.xml so it won't block parsing a new schema
+ // Delete managed-schema.xml, so it won't block parsing a new schema
Files.delete(managedSchemaFile.toPath());
System.setProperty("managed.schema.mutable", "true");
initCore(
@@ -370,7 +370,7 @@ public class TestManagedSchema extends AbstractBadConfigTestBase {
public void testAddDynamicField() throws Exception {
deleteCore();
File managedSchemaFile = new File(tmpConfDir, "managed-schema.xml");
- // Delete managed-schema.xml so it won't block parsing a new schema
+ // Delete managed-schema.xml, so it won't block parsing a new schema
Files.delete(managedSchemaFile.toPath());
System.setProperty("managed.schema.mutable", "true");
initCore(
@@ -411,7 +411,7 @@ public class TestManagedSchema extends AbstractBadConfigTestBase {
public void testAddWithSchemaCodecFactory() throws Exception {
deleteCore();
File managedSchemaFile = new File(tmpConfDir, "managed-schema.xml");
- // Delete managed-schema.xml so it won't block parsing a new schema
+ // Delete managed-schema.xml, so it won't block parsing a new schema
Files.delete(managedSchemaFile.toPath());
System.setProperty("managed.schema.mutable", "true");
initCore("solrconfig-managed-schema.xml", "schema_codec.xml", tmpSolrHome.getPath());
@@ -442,7 +442,7 @@ public class TestManagedSchema extends AbstractBadConfigTestBase {
public void testAddWithSchemaSimilarityFactory() throws Exception {
deleteCore();
File managedSchemaFile = new File(tmpConfDir, "managed-schema.xml");
- // Delete managed-schema.xml so it won't block parsing a new schema
+ // Delete managed-schema.xml, so it won't block parsing a new schema
Files.delete(managedSchemaFile.toPath());
System.setProperty("managed.schema.mutable", "true");
initCore("solrconfig-managed-schema.xml", "schema-bm25.xml", tmpSolrHome.getPath());
@@ -474,7 +474,7 @@ public class TestManagedSchema extends AbstractBadConfigTestBase {
assertSchemaResource(collection, "managed-schema.xml");
deleteCore();
File managedSchemaFile = new File(tmpConfDir, "managed-schema.xml");
- // Delete managed-schema.xml so it won't block parsing a new schema
+ // Delete managed-schema.xml, so it won't block parsing a new schema
Files.delete(managedSchemaFile.toPath());
System.setProperty("managed.schema.mutable", "true");
initCore(
@@ -516,7 +516,7 @@ public class TestManagedSchema extends AbstractBadConfigTestBase {
public void testAddFieldThenReload() throws Exception {
deleteCore();
File managedSchemaFile = new File(tmpConfDir, "managed-schema.xml");
- // Delete managed-schema.xml so it won't block parsing a new schema
+ // Delete managed-schema.xml, so it won't block parsing a new schema
Files.delete(managedSchemaFile.toPath());
System.setProperty("managed.schema.mutable", "true");
initCore(
diff --git a/solr/core/src/test/org/apache/solr/schema/TestPointFields.java b/solr/core/src/test/org/apache/solr/schema/TestPointFields.java
index 19ed5ff9d5e..46c577ed96a 100644
--- a/solr/core/src/test/org/apache/solr/schema/TestPointFields.java
+++ b/solr/core/src/test/org/apache/solr/schema/TestPointFields.java
@@ -252,7 +252,7 @@ public class TestPointFields extends SolrTestCaseJ4 {
doTestPointFieldSort(field, sequential);
doTestPointFieldSort(field, randomInts);
- // value source (w/o field(...,min|max)) usuage should still error...
+ // value source (w/o field(...,min|max)) usage should still error...
int numValues = 2 * RANDOM_MULTIPLIER;
doTestPointFieldFunctionQueryError(
field, "multivalued", toStringArray(getRandomInts(1, false)));
@@ -1488,7 +1488,7 @@ public class TestPointFields extends SolrTestCaseJ4 {
doTestPointFieldSort(field, sequential);
doTestPointFieldSort(field, randomFloats);
- // value source (w/o field(...,min|max)) usuage should still error...
+ // value source (w/o field(...,min|max)) usage should still error...
doTestPointFieldFunctionQueryError(field, "multivalued", "42.34");
doTestPointFieldFunctionQueryError(field, "multivalued", "42.34", "66.6");
}
@@ -2065,7 +2065,7 @@ public class TestPointFields extends SolrTestCaseJ4 {
doTestPointFieldSort(field, vals);
doTestPointFieldSort(field, randomLongs);
- // value source (w/o field(...,min|max)) usuage should still error...
+ // value source (w/o field(...,min|max)) usage should still error...
int numValues = 2 * RANDOM_MULTIPLIER;
doTestPointFieldFunctionQueryError(
field, "multivalued", toStringArray(getRandomLongs(1, false)));
@@ -2625,7 +2625,7 @@ public class TestPointFields extends SolrTestCaseJ4 {
doTestPointFieldSort(field, sequential);
doTestPointFieldSort(field, randomDates);
- // value source (w/o field(...,min|max)) usuage should still error...
+ // value source (w/o field(...,min|max)) usage should still error...
doTestPointFieldFunctionQueryError(field, "multivalued", "1995-12-31T23:59:59Z");
doTestPointFieldFunctionQueryError(
field, "multivalued", "1995-12-31T23:59:59Z", "2000-12-31T23:59:59Z");
@@ -3904,7 +3904,7 @@ public class TestPointFields extends SolrTestCaseJ4 {
*
* @param field the field name to try and sort on
* @param errSubStr substring to look for in the error msg
- * @param values one or more values to put into the doc(s) in the index - may be more then one for
+ * @param values one or more values to put into the doc(s) in the index - may be more than one for
* multivalued fields
*/
private void doTestPointFieldFunctionQueryError(String field, String errSubStr, String... values)
@@ -4094,7 +4094,8 @@ public class TestPointFields extends SolrTestCaseJ4 {
String[] expected = new String[21];
expected[0] = "//*[@numFound='10']";
for (int i = 1; i <= 10; i++) {
- // checks for each doc's two values aren't next to eachother in array, but that doesn't matter
+ // checks for each doc's two values aren't next to each other in array, but that doesn't
+ // matter
// for correctness
expected[i] =
"//result/doc["
@@ -4862,7 +4863,7 @@ public class TestPointFields extends SolrTestCaseJ4 {
*
* @param field the field name to try and sort on
* @param errSubStr substring to look for in the error msg
- * @param values one or more values to put into the doc(s) in the index - may be more then one for
+ * @param values one or more values to put into the doc(s) in the index - may be more than one for
* multivalued fields
*/
private void doTestPointFieldSortError(String field, String errSubStr, String... values)
@@ -5872,19 +5873,19 @@ public class TestPointFields extends SolrTestCaseJ4 {
"count(//doc)=10", // exactly 10 docs in response
(shouldReturnFieldIfRequested
? RETURN_FIELD
- : DONT_RETURN_FIELD)); // no field in any doc other then 'id'
+ : DONT_RETURN_FIELD)); // no field in any doc other than 'id'
assertQ(
req("q", "*:*", "rows", "100", "fl", "*"),
"//*[@numFound='10']",
"count(//doc)=10", // exactly 10 docs in response
- DONT_RETURN_FIELD); // no field in any doc other then 'id'
+ DONT_RETURN_FIELD); // no field in any doc other than 'id'
assertQ(
req("q", "*:*", "rows", "100"),
"//*[@numFound='10']",
"count(//doc)=10", // exactly 10 docs in response
- DONT_RETURN_FIELD); // no field in any doc other then 'id'
+ DONT_RETURN_FIELD); // no field in any doc other than 'id'
clearIndex();
assertU(commit());
}
@@ -5928,7 +5929,7 @@ public class TestPointFields extends SolrTestCaseJ4 {
}
/**
- * Calls {@link #callAndCheckCreateFields} on each of the specified values. This is a convinience
+ * Calls {@link #callAndCheckCreateFields} on each of the specified values. This is a convenience
* method for testing the same fieldname with multiple inputs.
*
* @see #callAndCheckCreateFields
@@ -5948,7 +5949,7 @@ public class TestPointFields extends SolrTestCaseJ4 {
/**
* Calls {@link SchemaField#createFields} on the specified value for the specified field name, and
- * asserts that the results match the SchemaField propeties, with an additional check that the
+ * asserts that the results match the SchemaField properties, with an additional check that the
* <code>pointType</code> is included if and only if the SchemaField is "indexed"
*/
private List<IndexableField> callAndCheckCreateFields(
diff --git a/solr/core/src/test/org/apache/solr/schema/TestSchemalessBufferedUpdates.java b/solr/core/src/test/org/apache/solr/schema/TestSchemalessBufferedUpdates.java
index 9e3484b1dd4..d2aa64899b9 100644
--- a/solr/core/src/test/org/apache/solr/schema/TestSchemalessBufferedUpdates.java
+++ b/solr/core/src/test/org/apache/solr/schema/TestSchemalessBufferedUpdates.java
@@ -107,7 +107,7 @@ public class TestSchemalessBufferedUpdates extends SolrTestCaseJ4 {
// If the ParseDateField URP isn't ahead of the DUP, then the date won't be normalized in the
// buffered tlog entry, and the doc won't be indexed on the replaying replica - a warning is
// logged as follows:
- // WARN [...] o.a.s.u.UpdateLog REYPLAY_ERR: IOException reading log
+ // WARN [...] o.a.s.u.UpdateLog REPLAY_ERR: IOException reading log
// org.apache.solr.common.SolrException: Invalid Date String:'2017-01-05'
// at org.apache.solr.util.DateMathParser.parseMath(DateMathParser.java:234)
updateJ(
diff --git a/solr/core/src/test/org/apache/solr/schema/TestSortableTextField.java b/solr/core/src/test/org/apache/solr/schema/TestSortableTextField.java
index 79431931a81..23d48d9707b 100644
--- a/solr/core/src/test/org/apache/solr/schema/TestSortableTextField.java
+++ b/solr/core/src/test/org/apache/solr/schema/TestSortableTextField.java
@@ -76,7 +76,7 @@ public class TestSortableTextField extends SolrTestCaseJ4 {
sf.hasDocValues());
}
- { // this field should *NOT* have docValues .. should behave like a plain old TextField
+ { // this field should *NOT* have docValues... should behave like a plain old TextField
SchemaField sf = h.getCore().getLatestSchema().getField("whitespace_nodv_stxt");
assertFalse(
"field " + sf.getName() + " should not have docvalues - schema got changed?",
@@ -348,7 +348,7 @@ public class TestSortableTextField extends SolrTestCaseJ4 {
}
}
- // sorting on a maxChars limited fields should force tie breaker
+ // sorting on a maxChars limited fields should force tiebreaker
for (String dir : Arrays.asList("asc", "desc")) {
// for max3, dir shouldn't matter - should always tie..
assertQ(
@@ -401,7 +401,7 @@ public class TestSortableTextField extends SolrTestCaseJ4 {
assertU(adoc("id", "5", "whitespace_stxt", BIG_CONST + " aaa zzz"));
assertU(adoc("id", "6", "whitespace_stxt", BIG_CONST + " bbb zzz "));
assertU(commit());
- // for these fields, the tie breaker should be the only thing that matters, regardless of
+ // for these fields, the tiebreaker should be the only thing that matters, regardless of
// direction...
for (String sortF : Arrays.asList("whitespace_stxt", "whitespace_nois_stxt")) {
for (String dir : Arrays.asList("asc", "desc")) {
@@ -510,14 +510,14 @@ public class TestSortableTextField extends SolrTestCaseJ4 {
ex.getMessage().contains(expect));
}
} else {
- // otherwise (useDocValuesAsStored==false *OR* maxCharsForDocValues=0) any value
- // should be fine when adding a doc and we should be able to search for it later...
+ // otherwise, (useDocValuesAsStored==false *OR* maxCharsForDocValues=0) any value
+ // should be fine when adding a doc, and we should be able to search for it later...
final String val = docid + " apple pear orange " + BIG_CONST;
assertU(adoc("id", docid, name, val));
String doc_xpath = "//result/doc[str[@name='id'][.='" + docid + "']]";
if (usedvs) {
- // ...and if it *does* usedvs, then we should defnitely see our value when searching...
+ // ...and if it *does* usedvs, then we should definitely see our value when searching...
doc_xpath = doc_xpath + "[str[@name='" + name + "'][.='" + val + "']]";
} else {
// ...but if not, then we should definitely not see any value for our field...
@@ -539,8 +539,8 @@ public class TestSortableTextField extends SolrTestCaseJ4 {
}
/**
- * tests that a SortableTextField using KeywordTokenzier (w/docValues) behaves exactly the same as
- * StrFields that it's copied to for quering and sorting
+ * tests that a SortableTextField using KeywordTokenizer (with docValues) behaves exactly the same
+ * as StrFields that it's copied to for querying and sorting
*/
public void testRandomStrEquivalentBehavior() throws Exception {
final List<String> test_fields =
diff --git a/solr/core/src/test/org/apache/solr/schema/TestUseDocValuesAsStored.java b/solr/core/src/test/org/apache/solr/schema/TestUseDocValuesAsStored.java
index ed73527d150..f83dd87ee33 100644
--- a/solr/core/src/test/org/apache/solr/schema/TestUseDocValuesAsStored.java
+++ b/solr/core/src/test/org/apache/solr/schema/TestUseDocValuesAsStored.java
@@ -61,7 +61,7 @@ public class TestUseDocValuesAsStored extends AbstractBadConfigTestBase {
// http://www.w3.org/TR/2006/REC-xml-20060816/#charsets
private static final String NON_XML_CHARS = "\u0000-\u0008\u000B-\u000C\u000E-\u001F\uFFFE\uFFFF";
- // Avoid single quotes (problematic in XPath literals) and carriage returns (XML roundtripping
+ // Avoid single quotes (problematic in XPath literals) and carriage returns (XML round tripping
// fails)
private static final Pattern BAD_CHAR_PATTERN = Pattern.compile("[\'\r" + NON_XML_CHARS + "]");
private static final Pattern STORED_FIELD_NAME_PATTERN = Pattern.compile("_dv$");
diff --git a/solr/core/src/test/org/apache/solr/search/AnalyticsMergeStrategyTest.java b/solr/core/src/test/org/apache/solr/search/AnalyticsMergeStrategyTest.java
index 169dc249c51..fe59f104ff6 100644
--- a/solr/core/src/test/org/apache/solr/search/AnalyticsMergeStrategyTest.java
+++ b/solr/core/src/test/org/apache/solr/search/AnalyticsMergeStrategyTest.java
@@ -65,7 +65,7 @@ public class AnalyticsMergeStrategyTest extends BaseDistributedSearchTestCase {
/*
* The count qparser plugin is pointing to AnalyticsTestQParserPlugin. This class defines a simple AnalyticsQuery and
- * has two merge strategies. If the iterate local param is true then an InterativeMergeStrategy is used.
+ * has two merge strategies. If the "iterate" local param is true then an InteractiveMergeStrategy is used.
*/
ModifiableSolrParams params = new ModifiableSolrParams();
diff --git a/solr/core/src/test/org/apache/solr/search/CurrencyRangeFacetCloudTest.java b/solr/core/src/test/org/apache/solr/search/CurrencyRangeFacetCloudTest.java
index adfe99a89eb..221e379fa46 100644
--- a/solr/core/src/test/org/apache/solr/search/CurrencyRangeFacetCloudTest.java
+++ b/solr/core/src/test/org/apache/solr/search/CurrencyRangeFacetCloudTest.java
@@ -47,7 +47,7 @@ public class CurrencyRangeFacetCloudTest extends SolrCloudTestCase {
private static String FIELD = null; // randomized
private static final List<String> STR_VALS = Arrays.asList("x0", "x1", "x2");
- // NOTE: in our test conversions EUR uses an asynetric exchange rate
+ // NOTE: in our test conversions EUR uses an asymmetric exchange rate
// these are the equivalent values relative to: USD EUR GBP
private static final List<String> VALUES =
Arrays.asList(
@@ -96,13 +96,14 @@ public class CurrencyRangeFacetCloudTest extends SolrCloudTestCase {
assertEquals(0, cluster.getSolrClient().commit().getStatus());
}
- public void testSimpleRangeFacetsOfSymetricRates() throws Exception {
+ public void testSimpleRangeFacetsOfSymmetricRates() throws Exception {
for (boolean use_mincount : Arrays.asList(true, false)) {
// exchange rates relative to USD...
//
// for all of these permutations, the numDocs in each bucket that we get back should be the
- // same (regardless of the any asymetric echanges ranges, or the currency used for the 'gap')
+ // same (regardless of any asymmetric exchanges ranges, or the currency used for the
+ // 'gap')
// because the start & end are always in USD.
//
// NOTE:
@@ -244,11 +245,11 @@ public class CurrencyRangeFacetCloudTest extends SolrCloudTestCase {
}
}
- public void testFacetRangeOfAsymetricRates() throws Exception {
+ public void testFacetRangeOfAsymmetricRates() throws Exception {
// facet.range: exchange rates relative to EUR...
//
- // because of the asymetric echange rate, the counts for these buckets will be different
- // then if we just converted the EUR values to USD
+ // because of the asymmetric exchange rate, the counts for these buckets will be different
+ // from if we just converted the EUR values to USD
for (boolean use_mincount : Arrays.asList(true, false)) {
final SolrQuery solrQuery =
new SolrQuery(
@@ -310,11 +311,11 @@ public class CurrencyRangeFacetCloudTest extends SolrCloudTestCase {
}
}
- public void testJsonFacetRangeOfAsymetricRates() throws Exception {
- // json.facet: exchange rates relative to EUR (same as testFacetRangeOfAsymetricRates)
+ public void testJsonFacetRangeOfAsymmetricRates() throws Exception {
+ // json.facet: exchange rates relative to EUR (same as testFacetRangeOfAsymmetricRates)
//
- // because of the asymetric echange rate, the counts for these buckets will be different
- // then if we just converted the EUR values to USD
+ // because of the asymmetric exchange rate, the counts for these buckets will be different
+ // from if we just converted the EUR values to USD
for (boolean use_mincount : Arrays.asList(true, false)) {
final SolrQuery solrQuery =
new SolrQuery(
@@ -437,7 +438,7 @@ public class CurrencyRangeFacetCloudTest extends SolrCloudTestCase {
// backfill the top terms
final String filter = "id_i1:[" + VALUES.size() + " TO *]";
- // the *facet* results should be the same regardless of wether we filter via fq, or using a
+ // the *facet* results should be the same regardless of whether we filter via fq, or using a
// domain filter on the top facet
for (boolean use_domain : Arrays.asList(true, false)) {
final String domain = use_domain ? "domain: { filter:'" + filter + "'}," : "";
@@ -505,7 +506,7 @@ public class CurrencyRangeFacetCloudTest extends SolrCloudTestCase {
(0 == i ? "x2" : "x0"),
foo_buckets.get(0).get("val"));
assertEquals("bucket #" + i + " foo top count", 2L, foo_buckets.get(0).get("count"));
- // NOTE: we can't make any assertions about the 2nd val..
+ // NOTE: we can't make any assertions about the 2nd val...
// our limit + randomized sharding could result in either remaining term being picked.
// but for either term, the count should be exactly the same...
assertEquals("bucket #" + i + " foo 2nd count", 1L, foo_buckets.get(1).get("count"));
@@ -552,12 +553,12 @@ public class CurrencyRangeFacetCloudTest extends SolrCloudTestCase {
//
// So the filter also explicitly accepts all 'x2' docs -- ensuring we have enough matches
// containing that term for it to be enough of a candidate in phase#1, but for many shard
- // arrangements it won't be returned by all shards resulting in refinement being neccessary to
+ // arrangements it won't be returned by all shards resulting in refinement being necessary to
// get the x_s:x2 sub-shard ranges from shard(s) where x_s:x2 is only tied for the (shard local)
- // top term count and would lose the (index order) tie breaker with x_s:x0 or x_s:x1
+ // top term count and would lose the (index order) tiebreaker with x_s:x0 or x_s:x1
final String filter = "id_i1:[" + VALUES.size() + " TO *] OR x_s:x2";
- // the *facet* results should be the same regardless of wether we filter via fq, or using a
+ // the *facet* results should be the same regardless of whether we filter via fq, or using a
// domain filter on the top facet
for (boolean use_domain : Arrays.asList(true, false)) {
final String domain = use_domain ? "domain: { filter:'" + filter + "'}," : "";
diff --git a/solr/core/src/test/org/apache/solr/search/CursorMarkTest.java b/solr/core/src/test/org/apache/solr/search/CursorMarkTest.java
index e222689ab4c..74b2253db87 100644
--- a/solr/core/src/test/org/apache/solr/search/CursorMarkTest.java
+++ b/solr/core/src/test/org/apache/solr/search/CursorMarkTest.java
@@ -78,7 +78,7 @@ public class CursorMarkTest extends SolrTestCaseJ4 {
SolrException.class,
"didn't fail on next with incorrect num of sortvalues",
() -> {
- // append to our random sort string so we know it has wrong num clauses
+ // append to our random sort string, so we know it has wrong num clauses
final SortSpec otherSort =
SortSpecParsing.parseSortSpec(randomSortString + ",id asc", req);
CursorMark trash =
@@ -222,7 +222,7 @@ public class CursorMarkTest extends SolrTestCaseJ4 {
final String fieldName = sf.getName();
assertNotNull(fieldName);
- // Note: In some cases we build a human readable version of the sort value and then
+ // Note: In some cases we build a human-readable version of the sort value and then
// unmarshall it into the raw, real, sort values that are expected by the FieldTypes.
// In other cases we just build the raw value to begin with because it's easier
diff --git a/solr/core/src/test/org/apache/solr/search/DelayingSearchComponent.java b/solr/core/src/test/org/apache/solr/search/DelayingSearchComponent.java
index cff1bc6e396..f99cb9fa855 100644
--- a/solr/core/src/test/org/apache/solr/search/DelayingSearchComponent.java
+++ b/solr/core/src/test/org/apache/solr/search/DelayingSearchComponent.java
@@ -37,14 +37,14 @@ public class DelayingSearchComponent extends SearchComponent {
TimeUnit.NANOSECONDS.convert(totalSleepMillis, TimeUnit.MILLISECONDS);
final long startNanos = System.nanoTime();
try {
- // Thread.sleep() (and derivatives) are not garunteed to sleep the full amount:
+ // Thread.sleep() (and derivatives) are not guaranteed to sleep the full amount:
// "subject to the precision and accuracy of system timers and schedulers."
// This is particularly problematic on Windows VMs, so we do a retry loop
// to ensure we sleep a total of at least as long as requested
//
- // (Tests using this component do so explicitly to ensure 'timeAllowed'
+ // (Tests using this component are explicitly to ensure 'timeAllowed'
// has exceeded in order to get their expected results, we would rather over-sleep
- // then under sleep)
+ // than under sleep)
for (long sleepNanos = totalSleepNanos;
0 < sleepNanos;
sleepNanos = totalSleepNanos - (System.nanoTime() - startNanos)) {
diff --git a/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java b/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
index 0a5e42f40d8..bb0ccf5ff07 100644
--- a/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
+++ b/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
@@ -101,8 +101,8 @@ public class QueryEqualityTest extends SolrTestCaseJ4 {
}
public void testQueryLuceneAllDocsWithField() throws Exception {
- // for all "primative" types except for doubles/floats, 'foo:*' should be functionally
- // equivilent to "foo:[* TO *]" whatever implementation/optimizations exist for one syntax,
+ // for all "primitive" types except for doubles/floats, 'foo:*' should be functionally
+ // equivalent to "foo:[* TO *]" whatever implementation/optimizations exist for one syntax,
// should exist for the other syntax as well (regardless of docValues, multivalued, etc...)
for (String field :
Arrays.asList(
@@ -508,7 +508,7 @@ public class QueryEqualityTest extends SolrTestCaseJ4 {
"myField", "foo_i",
"myInner", "product(4,foo_i)");
try {
- // NOTE: unlike most queries, frange defaultsto cost==100
+ // NOTE: unlike most queries, frange defaults to cost==100
assertQueryEquals(
"frange",
req,
@@ -655,7 +655,7 @@ public class QueryEqualityTest extends SolrTestCaseJ4 {
QParser.getParser("{!parent which=foo_s:parent}", req).getQuery());
}
- // sanity check multiple ways of specifing _nest_path_ prefixes
+ // check multiple ways of specifying _nest_path_ prefixes
final String parent_path = "/aa/bb";
try (SolrQueryRequest req =
req(
@@ -672,7 +672,7 @@ public class QueryEqualityTest extends SolrTestCaseJ4 {
// using 'inline' prefix query syntax...
//
- // '/' has to be escaped other wise it will be treated as a regex query...
+ // '/' has to be escaped otherwise it will be treated as a regex query...
// ...and when used inside the 'which' param it has to be escaped *AGAIN* because of
// the "quoted" localparam evaluation layer...
// (and of course '\' escaping is the java syntax as well, we have to double it)
@@ -759,7 +759,7 @@ public class QueryEqualityTest extends SolrTestCaseJ4 {
"2",
"useAutn",
"false");
- // make sure all param subsitution works for all args to graph query.
+ // make sure all param substitution works for all args to graph query.
assertQueryEquals(
"graph", req, "{!graph from=node_s to=edge_s}*:*", "{!graph from=$from to=$to}*:*");
diff --git a/solr/core/src/test/org/apache/solr/search/QueryParsingTest.java b/solr/core/src/test/org/apache/solr/search/QueryParsingTest.java
index 76284cea64f..e880c4a8045 100644
--- a/solr/core/src/test/org/apache/solr/search/QueryParsingTest.java
+++ b/solr/core/src/test/org/apache/solr/search/QueryParsingTest.java
@@ -53,7 +53,7 @@ public class QueryParsingTest extends SolrTestCaseJ4 {
parser = QParser.getParser(qstr, defType, req);
} catch (Exception e) {
throw new RuntimeException(
- "getParser excep using defType=" + defType + " with qstr=" + qstr, e);
+ "getParser exception using defType=" + defType + " with qstr=" + qstr, e);
}
Query q = parser.parse();
diff --git a/solr/core/src/test/org/apache/solr/search/RankQParserPluginTest.java b/solr/core/src/test/org/apache/solr/search/RankQParserPluginTest.java
index 794a614457f..a73422ec4e3 100644
--- a/solr/core/src/test/org/apache/solr/search/RankQParserPluginTest.java
+++ b/solr/core/src/test/org/apache/solr/search/RankQParserPluginTest.java
@@ -317,12 +317,12 @@ public class RankQParserPluginTest extends SolrTestCaseJ4 {
params(FIELD, "rank_1"));
}
- private void assertValidRankQuery(String expctedToString, SolrParams localParams)
+ private void assertValidRankQuery(String expectedToString, SolrParams localParams)
throws IOException, SyntaxError {
QParser parser = getRankQParser(localParams, null, req());
Query q = parser.parse();
assertNotNull(q);
- assertThat(q.toString(), CoreMatchers.equalTo(expctedToString));
+ assertThat(q.toString(), CoreMatchers.equalTo(expectedToString));
}
private String expectedFeatureQueryToString(String fieldName, String function, float boost) {
diff --git a/solr/core/src/test/org/apache/solr/search/RankQueryTestPlugin.java b/solr/core/src/test/org/apache/solr/search/RankQueryTestPlugin.java
index 4caa028a1f0..58f928427ea 100644
--- a/solr/core/src/test/org/apache/solr/search/RankQueryTestPlugin.java
+++ b/solr/core/src/test/org/apache/solr/search/RankQueryTestPlugin.java
@@ -214,7 +214,7 @@ public class RankQueryTestPlugin extends QParserPlugin {
continue;
}
- if (docs == null) { // could have been initialized in the shards info block above
+ if (docs == null) { // could have been initialized in the 'shardInfo' block above
docs = (SolrDocumentList) srsp.getSolrResponse().getResponse().get("response");
}
@@ -287,7 +287,7 @@ public class RankQueryTestPlugin extends QParserPlugin {
ShardDoc shardDoc = shardDocs.get(i);
shardDoc.positionInResponse = i;
// Need the toString() for correlation with other lists that must
- // be strings (like keys in highlighting, explain, etc)
+ // be strings (like keys in highlighting, explain, etc.)
resultIds.put(shardDoc.id.toString(), shardDoc);
}
@@ -353,7 +353,7 @@ public class RankQueryTestPlugin extends QParserPlugin {
DocList docList = rb.getResults().docList;
- // sort ids from lowest to highest so we can access them in order
+ // sort ids from lowest to highest, so we can access them in order
int nDocs = docList.size();
final long[] sortedIds = new long[nDocs];
final float[] scores = new float[nDocs]; // doc scores, parallel to sortedIds
@@ -516,7 +516,7 @@ public class RankQueryTestPlugin extends QParserPlugin {
continue;
}
- if (docs == null) { // could have been initialized in the shards info block above
+ if (docs == null) { // could have been initialized in the 'shardInfo' block above
docs = (SolrDocumentList) srsp.getSolrResponse().getResponse().get("response");
}
@@ -596,7 +596,7 @@ public class RankQueryTestPlugin extends QParserPlugin {
ShardDoc shardDoc = shardDocs.get(i);
shardDoc.positionInResponse = i;
// Need the toString() for correlation with other lists that must
- // be strings (like keys in highlighting, explain, etc)
+ // be strings (like keys in highlighting, explain, etc.)
resultIds.put(shardDoc.id.toString(), shardDoc);
}
diff --git a/solr/core/src/test/org/apache/solr/search/ReturnFieldsTest.java b/solr/core/src/test/org/apache/solr/search/ReturnFieldsTest.java
index ecac1c6453f..247519af5ff 100644
--- a/solr/core/src/test/org/apache/solr/search/ReturnFieldsTest.java
+++ b/solr/core/src/test/org/apache/solr/search/ReturnFieldsTest.java
@@ -185,7 +185,7 @@ public class ReturnFieldsTest extends SolrTestCaseJ4 {
}
@Test
- public void testWilcards() {
+ public void testWildcards() {
ReturnFields rf = new SolrReturnFields(req("fl", "*"));
assertFalse(rf.wantsScore());
assertTrue(rf.wantsField("xxx"));
@@ -390,7 +390,7 @@ public class ReturnFieldsTest extends SolrTestCaseJ4 {
/**
* Whitebox verification that the conversion from lucene {@link Document} to {@link SolrDocument}
- * respects the {@link ReturnFields} and doesn't unneccessarily convert Fields that aren't needed.
+ * respects the {@link ReturnFields} and doesn't unnecessarily convert Fields that aren't needed.
*
* <p>This is important because {@link SolrDocumentFetcher} may return additional fields (lazy or
* otherwise) if the document has been cached.
@@ -450,7 +450,7 @@ public class ReturnFieldsTest extends SolrTestCaseJ4 {
// all source fields should be in the output
// behavior should be ultimately be consistent for all of these ReturnField instances
- // (globbing or requesting more fields then doc has)
+ // (globbing or requesting more fields than doc has)
for (ReturnFields rf :
Arrays.asList(
new SolrReturnFields(),
@@ -543,8 +543,8 @@ public class ReturnFieldsTest extends SolrTestCaseJ4 {
static {
// if the JVM/unicode can redefine whitespace once (LUCENE-6760), it might happen again
- // in the future. if that happens, fail early with a clera msg, even if java asserts
- // (used in randomWhitespace) are disbled
+ // in the future. if that happens, fail early with a clear msg, even if java asserts
+ // (used in randomWhitespace) are disabled
for (int offset = 0; offset < WHITESPACE_CHARACTERS.length; offset++) {
char c = WHITESPACE_CHARACTERS[offset];
diff --git a/solr/core/src/test/org/apache/solr/search/SortSpecParsingTest.java b/solr/core/src/test/org/apache/solr/search/SortSpecParsingTest.java
index 62074b3add7..b598849c3e1 100644
--- a/solr/core/src/test/org/apache/solr/search/SortSpecParsingTest.java
+++ b/solr/core/src/test/org/apache/solr/search/SortSpecParsingTest.java
@@ -130,7 +130,7 @@ public class SortSpecParsingTest extends SolrTestCaseJ4 {
flds = sort.getSort();
assertEquals(flds[0].getType(), SortField.Type.REWRITEABLE);
// Not thrilled about the fragility of string matching here, but...
- // the value sources get wrapped, so the out field is different than the input
+ // the value sources get wrapped, so the out field is different from the input
assertEquals(flds[0].getField(), "pow(float(weight),const(2))");
// test functions (more deep)
@@ -149,7 +149,7 @@ public class SortSpecParsingTest extends SolrTestCaseJ4 {
flds = sort.getSort();
assertEquals(flds[0].getType(), SortField.Type.REWRITEABLE);
// Not thrilled about the fragility of string matching here, but...
- // the value sources get wrapped, so the out field is different than the input
+ // the value sources get wrapped, so the out field is different from the input
assertEquals(flds[0].getField(), "pow(float(weight),const(2.0))");
spec =
@@ -161,7 +161,7 @@ public class SortSpecParsingTest extends SolrTestCaseJ4 {
assertEquals(flds[0].getType(), SortField.Type.REWRITEABLE);
// Not thrilled about the fragility of string matching here, but...
- // the value sources get wrapped, so the out field is different than the input
+ // the value sources get wrapped, so the out field is different from the input
assertEquals(flds[0].getField(), "pow(float(weight),const(2.0))");
assertNull(schemaFlds.get(0));
@@ -185,7 +185,7 @@ public class SortSpecParsingTest extends SolrTestCaseJ4 {
sort = SortSpecParsing.parseSortSpec("strdist(foo_s1, \"junk\", jw) desc", req).getSort();
flds = sort.getSort();
assertEquals(flds[0].getType(), SortField.Type.REWRITEABLE);
- // the value sources get wrapped, so the out field is different than the input
+ // the value sources get wrapped, so the out field is different from the input
assertEquals(
flds[0].getField(),
"strdist(str(foo_s1),literal(junk), dist=org.apache.lucene.search.spell.JaroWinklerDistance)");
diff --git a/solr/core/src/test/org/apache/solr/search/SpatialFilterTest.java b/solr/core/src/test/org/apache/solr/search/SpatialFilterTest.java
index a49d5d02aae..48a837cd3f9 100644
--- a/solr/core/src/test/org/apache/solr/search/SpatialFilterTest.java
+++ b/solr/core/src/test/org/apache/solr/search/SpatialFilterTest.java
@@ -66,8 +66,8 @@ public class SpatialFilterTest extends SolrTestCaseJ4 {
// Try some edge cases
checkHits(fieldName, "1,1", 175, 3, 5, 6, 7);
checkHits(fieldName, "0,179.8", 200, 2, 8, 9);
- checkHits(fieldName, "89.8, 50", 200, 2, 10, 11); // this goes over the north pole
- checkHits(fieldName, "-89.8, 50", 200, 2, 12, 13); // this goes over the south pole
+ checkHits(fieldName, "89.8, 50", 200, 2, 10, 11); // this goes over the North Pole
+ checkHits(fieldName, "-89.8, 50", 200, 2, 12, 13); // this goes over the South Pole
// try some normal cases
checkHits(fieldName, "33.0,-80.0", 300, 2);
// large distance
@@ -91,11 +91,11 @@ public class SpatialFilterTest extends SolrTestCaseJ4 {
checkHits(fieldName, "0,0", 3001, 3, 14, 15, 16);
checkHits(fieldName, "0,0", 3000.1, 3, 14, 15, 16);
- // really fine grained distance and reflects some of the vagaries of how we are calculating the
+ // really fine-grained distance and reflects some vagaries of how we are calculating the
// box
checkHits(fieldName, "43.517030,-96.789603", 109, 0);
- // falls outside of the real distance, but inside the bounding box
+ // falls outside the real distance, but inside the bounding box
checkHits(fieldName, true, "43.517030,-96.789603", 110, 0);
checkHits(fieldName, false, "43.517030,-96.789603", 110, 1, 17);
diff --git a/solr/core/src/test/org/apache/solr/search/TestBlockCollapse.java b/solr/core/src/test/org/apache/solr/search/TestBlockCollapse.java
index 0dbf5315937..7285a25d3b4 100644
--- a/solr/core/src/test/org/apache/solr/search/TestBlockCollapse.java
+++ b/solr/core/src/test/org/apache/solr/search/TestBlockCollapse.java
@@ -65,7 +65,7 @@ public class TestBlockCollapse extends SolrTestCaseJ4 {
params("qt", "/elevate", "elevateIds", "42"))) {
try (SolrQueryRequest req = req()) {
- // non-block based collapse sitautions, regardless of nullPolicy...
+ // non-block based collapse situations, regardless of nullPolicy...
for (String np :
Arrays.asList(
"",
@@ -540,7 +540,7 @@ public class TestBlockCollapse extends SolrTestCaseJ4 {
}
// queries are relevancy based, and score is used in collapse local param sort -- but not
- // in top fl/sort (ie: help prove we setup 'needScores' correctly for collapse, even
+ // in top fl/sort (ie: help prove we set up 'needScores' correctly for collapse, even
// though top level query doesn't care)
for (String selector :
Arrays.asList(
@@ -548,7 +548,7 @@ public class TestBlockCollapse extends SolrTestCaseJ4 {
" sort='score desc'",
// unused tie breaker after score
" sort='score desc, sum(num_i,42) desc'",
- // force score to be a tie breaker
+ // force score to be a tiebreaker
" sort='sum(1.5,2.5) asc, score desc'")) {
assertQ(
req(
@@ -563,7 +563,7 @@ public class TestBlockCollapse extends SolrTestCaseJ4 {
);
// same query, but boosting multiple skus from p3
// NOTE: this causes each boosted doc to be returned, but top level sort is not score,
- // so QEC doesn't hijak order
+ // so QEC doesn't hijack order
assertQ(
req(
"q", "*:* txt_t:XX",
@@ -756,7 +756,7 @@ public class TestBlockCollapse extends SolrTestCaseJ4 {
"//result/doc[7]/str[@name='id'][.='z100']");
// same query, but boosting multiple docs
// NOTE: this causes each boosted doc to be returned, but top level sort is not score, so
- // QEC doesn't hijak order
+ // QEC doesn't hijack order
assertQ(
req(
"q", "num_i:* txt_t:XX",
@@ -830,7 +830,7 @@ public class TestBlockCollapse extends SolrTestCaseJ4 {
"//result/doc[7][str[@name='id'][.='p3s3'] and float[@name='score'][.=1276.0]]");
// same query, but boosting multiple docs
// NOTE: this causes each boosted doc to be returned, but top level sort is not score, so
- // QEC doesn't hijak order
+ // QEC doesn't hijack order
assertQ(
req(
"q", "{!func}sum(42, num_i)",
@@ -870,7 +870,8 @@ public class TestBlockCollapse extends SolrTestCaseJ4 {
}
// queries are relevancy based, and score is used in collapse local param sort -- but not in
- // top fl/sort (ie: help prove we setup 'needScores' correctly for collapse, even though top
+ // top fl/sort (ie: help prove we set up 'needScores' correctly for collapse, even though
+ // top
// level query doesn't care)
for (String selector :
Arrays.asList(
@@ -878,7 +879,7 @@ public class TestBlockCollapse extends SolrTestCaseJ4 {
" sort='score desc'",
// unused tie breaker after score
" sort='score desc, sum(num_i,42) desc'",
- // force score to be a tie breaker
+ // force score to be a tiebreaker
" sort='sum(1.5,2.5) asc, score desc'")) {
assertQ(
@@ -898,7 +899,7 @@ public class TestBlockCollapse extends SolrTestCaseJ4 {
);
// same query, but boosting multiple docs
// NOTE: this causes each boosted doc to be returned, but top level sort is not score, so
- // QEC doesn't hijak order
+ // QEC doesn't hijack order
assertQ(
req(
"q", "*:* txt_t:XX",
@@ -948,8 +949,8 @@ public class TestBlockCollapse extends SolrTestCaseJ4 {
* to ExpandComponent of some side effect state that CollapseQParser should produce.
*
* <p>We don't bother testing _root_ field collapsing in this test, since it contains different
- * field values then our other collapse fields. (and the other tests should adequeately prove that
- * the block hueristics for _root_ collapsing work)
+ * field values then our other collapse fields. (and the other tests should adequately prove that
+ * the block heuristics for _root_ collapsing work)
*/
public void testBlockCollapseWithExpandComponent() {
diff --git a/solr/core/src/test/org/apache/solr/search/TestCollapseQParserPlugin.java b/solr/core/src/test/org/apache/solr/search/TestCollapseQParserPlugin.java
index ca05bae45d8..7030dbc90cc 100644
--- a/solr/core/src/test/org/apache/solr/search/TestCollapseQParserPlugin.java
+++ b/solr/core/src/test/org/apache/solr/search/TestCollapseQParserPlugin.java
@@ -660,7 +660,7 @@ public class TestCollapseQParserPlugin extends SolrTestCaseJ4 {
"//result/doc[3]/str[@name='id'][.='2']",
"//result/doc[4]/str[@name='id'][.='6']");
- // Non trivial sort local param for picking group head
+ // Non-trivial sort local param for picking group head
params = new ModifiableSolrParams();
params.add("q", "*:*");
params.add(
@@ -1346,8 +1346,8 @@ public class TestCollapseQParserPlugin extends SolrTestCaseJ4 {
// function based query for deterministic scores
final String q = "{!func}sum(asc_i,42)";
- // results should be the same regardless of wether we collapse on a string field or numeric
- // field (docs have identicle group identifiers in both fields)
+ // results should be the same regardless of whether we collapse on a string field or numeric
+ // field (docs have identical group identifiers in both fields)
for (String f : Arrays.asList("group_i", "group_s")) {
// these group head selectors should all result in identical group heads for our query...
diff --git a/solr/core/src/test/org/apache/solr/search/TestDocSet.java b/solr/core/src/test/org/apache/solr/search/TestDocSet.java
index a916fade515..6de3340689b 100644
--- a/solr/core/src/test/org/apache/solr/search/TestDocSet.java
+++ b/solr/core/src/test/org/apache/solr/search/TestDocSet.java
@@ -215,7 +215,7 @@ public class TestDocSet extends SolrTestCase {
}
public void testRandomDocSets() {
- // Make the size big enough to go over certain limits (such as one set
+ // Make the size big enough to go over certain limits, such as one set
// being 8 times the size of another in the int set, or going over 2 times
// 64 bits for the bit doc set. Smaller sets can hit more boundary conditions though.
@@ -235,7 +235,7 @@ public class TestDocSet extends SolrTestCase {
}
}
- if (n <= smallSetCuttoff) {
+ if (n <= smallSetCutoff) {
if (smallSetType == 0) {
Arrays.sort(a);
return new SortedIntDocSet(a);
@@ -260,7 +260,7 @@ public class TestDocSet extends SolrTestCase {
}
public static int smallSetType = 0; // 0==sortedint, 2==FixedBitSet
- public static int smallSetCuttoff = 3000;
+ public static int smallSetCutoff = 3000;
/*
public void testIntersectionSizePerformance() {
diff --git a/solr/core/src/test/org/apache/solr/search/TestFiltering.java b/solr/core/src/test/org/apache/solr/search/TestFiltering.java
index e193fb63e54..7cb020957c9 100644
--- a/solr/core/src/test/org/apache/solr/search/TestFiltering.java
+++ b/solr/core/src/test/org/apache/solr/search/TestFiltering.java
@@ -399,7 +399,7 @@ public class TestFiltering extends SolrTestCaseJ4 {
}
}
} else {
- // negative frange.. make it relatively small
+ // negative frange... make it relatively small
l = random().nextInt(model.indexSize);
u = Math.max(model.indexSize - 1, l + random().nextInt(Math.max(model.indexSize / 10, 2)));
diff --git a/solr/core/src/test/org/apache/solr/search/TestFoldingMultitermQuery.java b/solr/core/src/test/org/apache/solr/search/TestFoldingMultitermQuery.java
index 4bd048fbabd..e25ad83b9d9 100644
--- a/solr/core/src/test/org/apache/solr/search/TestFoldingMultitermQuery.java
+++ b/solr/core/src/test/org/apache/solr/search/TestFoldingMultitermQuery.java
@@ -81,7 +81,7 @@ public class TestFoldingMultitermQuery extends SolrTestCaseJ4 {
"content_keyword",
docs[i]));
}
- // Mixing and matching amongst various languages is probalby a bad thing, so add some tests for
+ // Mixing and matching amongst various languages is probably a bad thing, so add some tests for
// various special filters
int idx = docs.length;
// Greek
diff --git a/solr/core/src/test/org/apache/solr/search/TestGraphTermsQParserPlugin.java b/solr/core/src/test/org/apache/solr/search/TestGraphTermsQParserPlugin.java
index 03cd1cfbaf3..18a2824ef16 100644
--- a/solr/core/src/test/org/apache/solr/search/TestGraphTermsQParserPlugin.java
+++ b/solr/core/src/test/org/apache/solr/search/TestGraphTermsQParserPlugin.java
@@ -24,7 +24,7 @@ import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
-// We want codecs that support DocValues, and ones supporting blank/empty values.
+// We want codecs that support DocValues, and those supporting blank/empty values.
@SuppressCodecs({"Appending", "Lucene3x", "Lucene40", "Lucene41", "Lucene42"})
public class TestGraphTermsQParserPlugin extends SolrTestCaseJ4 {
diff --git a/solr/core/src/test/org/apache/solr/search/TestIndexSearcher.java b/solr/core/src/test/org/apache/solr/search/TestIndexSearcher.java
index fe256df9e42..d22213e0071 100644
--- a/solr/core/src/test/org/apache/solr/search/TestIndexSearcher.java
+++ b/solr/core/src/test/org/apache/solr/search/TestIndexSearcher.java
@@ -58,7 +58,7 @@ public class TestIndexSearcher extends SolrTestCaseJ4 {
public static void beforeClass() throws Exception {
// we need a consistent segmentation because reopen test validation
- // dependso n merges not happening when it doesn't expect
+ // depends on merges not happening when it doesn't expect
systemSetPropertySolrTestsMergePolicyFactory(LogDocMergePolicyFactory.class.getName());
initCore("solrconfig.xml", "schema.xml");
@@ -347,7 +347,7 @@ public class TestIndexSearcher extends SolrTestCaseJ4 {
break;
}
if (i == 1000) {
- fail("Query didn't succeed after 10 secoonds");
+ fail("Query didn't succeed after 10 seconds");
}
Thread.sleep(10);
}
@@ -408,7 +408,7 @@ public class TestIndexSearcher extends SolrTestCaseJ4 {
break;
}
if (i == 1000) {
- fail("Query didn't succeed after 10 secoonds");
+ fail("Query didn't succeed after 10 seconds");
}
Thread.sleep(10);
}
diff --git a/solr/core/src/test/org/apache/solr/search/TestLegacyNumericRangeQueryBuilder.java b/solr/core/src/test/org/apache/solr/search/TestLegacyNumericRangeQueryBuilder.java
index 140ece6680e..824b5961eea 100644
--- a/solr/core/src/test/org/apache/solr/search/TestLegacyNumericRangeQueryBuilder.java
+++ b/solr/core/src/test/org/apache/solr/search/TestLegacyNumericRangeQueryBuilder.java
@@ -112,7 +112,7 @@ public class TestLegacyNumericRangeQueryBuilder extends SolrTestCase {
LegacyNumericRangeQueryBuilder filterBuilder = new LegacyNumericRangeQueryBuilder();
String xml =
- "<LegacyNumericRangeQuery fieldName='AGE' type='doubLe' lowerTerm='-23.21' upperTerm='60000.00023'/>";
+ "<LegacyNumericRangeQuery fieldName='AGE' type='double' lowerTerm='-23.21' upperTerm='60000.00023'/>";
Document doc = getDocumentFromString(xml);
Query filter = filterBuilder.getQuery(doc.getDocumentElement());
@@ -126,7 +126,7 @@ public class TestLegacyNumericRangeQueryBuilder extends SolrTestCase {
assertTrue(numRangeFilter.includesMax());
String xml2 =
- "<LegacyNumericRangeQuery fieldName='AGE' type='doubLe' lowerTerm='-23.21' upperTerm='60000.00023' includeUpper='false'/>";
+ "<LegacyNumericRangeQuery fieldName='AGE' type='double' lowerTerm='-23.21' upperTerm='60000.00023' includeUpper='false'/>";
Document doc2 = getDocumentFromString(xml2);
Query filter2 = filterBuilder.getQuery(doc2.getDocumentElement());
assertTrue(filter2 instanceof LegacyNumericRangeQuery<?>);
diff --git a/solr/core/src/test/org/apache/solr/search/TestPayloadScoreQParserPlugin.java b/solr/core/src/test/org/apache/solr/search/TestPayloadScoreQParserPlugin.java
index 38161d88171..e49f82c9d78 100644
--- a/solr/core/src/test/org/apache/solr/search/TestPayloadScoreQParserPlugin.java
+++ b/solr/core/src/test/org/apache/solr/search/TestPayloadScoreQParserPlugin.java
@@ -88,7 +88,7 @@ public class TestPayloadScoreQParserPlugin extends SolrTestCaseJ4 {
"//float[@name='score']='2.0'");
// TODO: fix this includeSpanScore test to be less brittle - score result is score of "A" (via
- // BM25) multipled by 1.0 (payload value)
+ // BM25) multiplied by 1.0 (payload value)
assertQ(
req("fl", "*,score", "q", "{!payload_score f=vals_dpf v=A func=min}"),
"//float[@name='score']='1.0'");
diff --git a/solr/core/src/test/org/apache/solr/search/TestPseudoReturnFields.java b/solr/core/src/test/org/apache/solr/search/TestPseudoReturnFields.java
index f478b8ee4e0..5db8897cd09 100644
--- a/solr/core/src/test/org/apache/solr/search/TestPseudoReturnFields.java
+++ b/solr/core/src/test/org/apache/solr/search/TestPseudoReturnFields.java
@@ -64,7 +64,7 @@ public class TestPseudoReturnFields extends SolrTestCaseJ4 {
public void testMultiValued() throws Exception {
// the response writers used to consult isMultiValued on the field
// but this doesn't work when you alias a single valued field to
- // a multi valued field (the field value is copied first, then
+ // a multivalued field (the field value is copied first, then
// if the type lookup is done again later, we get the wrong thing). SOLR-4036
// score as pseudo field - precondition checks
diff --git a/solr/core/src/test/org/apache/solr/search/TestRandomCollapseQParserPlugin.java b/solr/core/src/test/org/apache/solr/search/TestRandomCollapseQParserPlugin.java
index d6fb1c6b215..13b62d28978 100644
--- a/solr/core/src/test/org/apache/solr/search/TestRandomCollapseQParserPlugin.java
+++ b/solr/core/src/test/org/apache/solr/search/TestRandomCollapseQParserPlugin.java
@@ -63,7 +63,7 @@ public class TestRandomCollapseQParserPlugin extends SolrTestCaseJ4 {
}
assertU(commit());
- // Don't close this client, it would shutdown the CoreContainer
+ // Don't close this client, it would shut down the CoreContainer
SOLR = new EmbeddedSolrServer(h.getCoreContainer(), h.coreName);
ALL_SORT_FIELD_NAMES =
@@ -92,7 +92,7 @@ public class TestRandomCollapseQParserPlugin extends SolrTestCaseJ4 {
for (String sortField : ALL_SORT_FIELD_NAMES) {
for (String dir : Arrays.asList(" asc", " desc")) {
- final String sort = sortField + dir + ", id" + dir; // need id for tie breaker
+ final String sort = sortField + dir + ", id" + dir; // need id for tiebreaker
final String q = random().nextBoolean() ? "*:*" : CursorPagingTest.buildRandomQuery();
final SolrParams sortedP = params("q", q, "rows", "1", "sort", sort);
@@ -108,9 +108,10 @@ public class TestRandomCollapseQParserPlugin extends SolrTestCaseJ4 {
for (String fq :
Arrays.asList(
p + "same_for_all_docs sort='" + sort + "'}",
- // nullPolicy=expand shouldn't change anything since every doc has field
+ // nullPolicy=expand shouldn't change anything since every doc has the field
p + "same_for_all_docs sort='" + sort + "' nullPolicy=expand}",
- // a field in no docs with nullPolicy=collapse should have same effect as
+ // a field in no docs with nullPolicy=collapse should have had the same effect
+ // as
// collapsing on a field in every doc
p + "not_in_any_docs sort='" + sort + "' nullPolicy=collapse}")) {
final SolrParams collapseP = params("q", q, "rows", "1", "fq", fq);
@@ -135,7 +136,7 @@ public class TestRandomCollapseQParserPlugin extends SolrTestCaseJ4 {
}
}
- public void testRandomCollpaseWithSort() {
+ public void testRandomCollapseWithSort() {
final int numMainQueriesPerCollapseField = atLeast(5);
diff --git a/solr/core/src/test/org/apache/solr/search/TestRangeQuery.java b/solr/core/src/test/org/apache/solr/search/TestRangeQuery.java
index d6e1dfac544..705ac0bb211 100644
--- a/solr/core/src/test/org/apache/solr/search/TestRangeQuery.java
+++ b/solr/core/src/test/org/apache/solr/search/TestRangeQuery.java
@@ -269,7 +269,7 @@ public class TestRangeQuery extends SolrTestCaseJ4 {
// wrap in a BQ
String field = randomKey(norm_fields);
String value = norm_fields.get(field)[1];
- // wraping shouldn't affect expected
+ // wrapping shouldn't affect expected
dbq = "(" + field + ":\"" + value + "\" OR " + dbq + ")";
}
@@ -288,7 +288,7 @@ public class TestRangeQuery extends SolrTestCaseJ4 {
// NOTE: foo_s supports ranges, but for the arrays below we are only
// interested in fields that support *equivalent* ranges -- strings
// are not ordered the same as ints/longs, so we can't test the ranges
- // for equivilence across diff fields.
+ // for equivalence across diff fields.
//
// fields that a normal range query will work correctly on
String[] norm_fields = {
diff --git a/solr/core/src/test/org/apache/solr/search/TestReRankQParserPlugin.java b/solr/core/src/test/org/apache/solr/search/TestReRankQParserPlugin.java
index d9e8869a401..06b41d7e2ac 100644
--- a/solr/core/src/test/org/apache/solr/search/TestReRankQParserPlugin.java
+++ b/solr/core/src/test/org/apache/solr/search/TestReRankQParserPlugin.java
@@ -372,7 +372,7 @@ public class TestReRankQParserPlugin extends SolrTestCaseJ4 {
"//result/doc[3]/str[@name='id'][.='6']",
"//result/doc[4]/str[@name='id'][.='5']",
"//result/doc[5]/str[@name='id'][.='3']",
- "//result/doc[6]/str[@name='id'][.='2']" // Not in reRankeDocs
+ "//result/doc[6]/str[@name='id'][.='2']" // Not in reRankDocs
);
// Test Elevation with start beyond the rerank docs
@@ -428,7 +428,7 @@ public class TestReRankQParserPlugin extends SolrTestCaseJ4 {
assertQ(req(params), "*[count(//doc)=0]");
- // Pass in reRankDocs lower then the length being collected.
+ // Pass in reRankDocs lower than the length being collected.
params = new ModifiableSolrParams();
params.add(
"rq",
@@ -636,9 +636,9 @@ public class TestReRankQParserPlugin extends SolrTestCaseJ4 {
+ "=$rqq "
+ ReRankQParserPlugin.RERANK_DOCS
+ "=6}");
- // function query for predictible scores (relative to id) independent of similarity
+ // function query for predictable scores (relative to id) independent of similarity
params.add("q", "{!func}id_i");
- // constant score for each clause (unique per doc) for predictible scores independent of
+ // constant score for each clause (unique per doc) for predictable scores independent of
// similarity
// NOTE: biased in favor of doc id == 2
params.add("rqq", "id:1^=10 id:2^=40 id:3^=30 id:4^=40 id:5^=50 id:6^=60");
@@ -731,7 +731,7 @@ public class TestReRankQParserPlugin extends SolrTestCaseJ4 {
assertU(delQ("*:*"));
assertU(commit());
- // Test the scenario that where we rank more documents then we return.
+ // Test the scenario that where we rank more documents than we return.
String[] doc = {
"id", "1", "term_s", "YYYY", "group_s", "group1", "test_ti", "5", "test_tl", "10", "test_tf",
@@ -912,13 +912,13 @@ public class TestReRankQParserPlugin extends SolrTestCaseJ4 {
assertU(commit());
final String preferredDocId;
- final String lessPreferrredDocId;
+ final String lessPreferredDocId;
if (random().nextBoolean()) {
preferredDocId = "1";
- lessPreferrredDocId = "2";
+ lessPreferredDocId = "2";
} else {
preferredDocId = "2";
- lessPreferrredDocId = "1";
+ lessPreferredDocId = "1";
}
for (final String defType :
@@ -941,7 +941,7 @@ public class TestReRankQParserPlugin extends SolrTestCaseJ4 {
req(params),
"*[count(//doc)=2]",
"//result/doc[1]/str[@name='id'][.='" + preferredDocId + "']",
- "//result/doc[2]/str[@name='id'][.='" + lessPreferrredDocId + "']");
+ "//result/doc[2]/str[@name='id'][.='" + lessPreferredDocId + "']");
}
}
diff --git a/solr/core/src/test/org/apache/solr/search/TestRealTimeGet.java b/solr/core/src/test/org/apache/solr/search/TestRealTimeGet.java
index 3ae14d3f363..1f842ea7025 100644
--- a/solr/core/src/test/org/apache/solr/search/TestRealTimeGet.java
+++ b/solr/core/src/test/org/apache/solr/search/TestRealTimeGet.java
@@ -276,7 +276,7 @@ public class TestRealTimeGet extends TestRTGBase {
assertU(adoc("id", "14"));
assertU(adoc("id", "15"));
- // id list, with some in index and some not, first id from index. Also test mutiple fq params.
+ // id list, with some in index and some not, first id from index. Also test multiple fq params.
assertJQ(
req(
"qt",
@@ -341,7 +341,7 @@ public class TestRealTimeGet extends TestRTGBase {
// test version is there from rtg
assertJQ(req("qt", "/get", "id", "1"), "=={'doc':{'id':'1','_version_':" + version + "}}");
- // simulate reordering: test that a version less than that does not take affect
+ // simulate reordering: test that a version less than that does not take effect
updateJ(
jsonAdd(sdoc("id", "1", "_version_", Long.toString(version - 1))),
params(DISTRIB_UPDATE_PARAM, FROM_LEADER));
@@ -361,7 +361,7 @@ public class TestRealTimeGet extends TestRTGBase {
// make sure reordering detection also works after a commit
assertU(commit());
- // simulate reordering: test that a version less than that does not take affect
+ // simulate reordering: test that a version less than that does not take effect
updateJ(
jsonAdd(sdoc("id", "1", "_version_", Long.toString(version - 1))),
params(DISTRIB_UPDATE_PARAM, FROM_LEADER));
@@ -369,7 +369,8 @@ public class TestRealTimeGet extends TestRTGBase {
// test that version hasn't changed
assertJQ(req("qt", "/get", "id", "1"), "=={'doc':{'id':'1','_version_':" + version + "}}");
- // simulate reordering: test that a delete w/ version less than that does not take affect
+ // simulate reordering: test that a delete operation w/ version less than that does not take
+ // effect
updateJ(
jsonDelId("1"),
params(DISTRIB_UPDATE_PARAM, FROM_LEADER, "_version_", Long.toString(version - 1)));
@@ -383,7 +384,7 @@ public class TestRealTimeGet extends TestRTGBase {
jsonDelId("1"),
params(DISTRIB_UPDATE_PARAM, FROM_LEADER, "_version_", Long.toString(version)));
- // make sure a reordered add doesn't take affect.
+ // make sure a reordered add doesn't take effect.
updateJ(
jsonAdd(sdoc("id", "1", "_version_", Long.toString(version - 1))),
params(DISTRIB_UPDATE_PARAM, FROM_LEADER));
@@ -391,10 +392,10 @@ public class TestRealTimeGet extends TestRTGBase {
// test that it's still deleted
assertJQ(req("qt", "/get", "id", "1"), "=={'doc':null}");
- // test that we can remember the version of a delete after a commit
+ // test that we can remember the version of a delete operation after a commit
assertU(commit());
- // make sure a reordered add doesn't take affect.
+ // make sure a reordered add doesn't take effect.
long version2 = deleteByQueryAndGetVersion("id:2", null);
// test that it's still deleted
@@ -485,7 +486,7 @@ public class TestRealTimeGet extends TestRTGBase {
// deletes
//
- // try a delete with version on the request
+ // try a delete operation with version on the request
se =
expectThrows(
SolrException.class,
@@ -493,7 +494,7 @@ public class TestRealTimeGet extends TestRTGBase {
() -> deleteAndGetVersion("1", params("_version_", Long.toString(version - 1))));
assertEquals("version should cause a conflict", 409, se.code());
- // try a delete with a negative version
+ // try a delete operation with a negative version
se =
expectThrows(
SolrException.class,
@@ -501,7 +502,7 @@ public class TestRealTimeGet extends TestRTGBase {
() -> deleteAndGetVersion("1", params("_version_", Long.toString(-version))));
assertEquals("version should cause a conflict", 409, se.code());
- // try a delete with a greater version
+ // try a delete operation with a greater version
se =
expectThrows(
SolrException.class,
@@ -511,7 +512,7 @@ public class TestRealTimeGet extends TestRTGBase {
"1", params("_version_", Long.toString(version + random().nextInt(1000) + 1))));
assertEquals("version should cause a conflict", 409, se.code());
- // try a delete of a document that doesn't exist, specifying a specific version
+ // try a delete operation of a document that doesn't exist, specifying a specific version
se =
expectThrows(
SolrException.class,
@@ -520,7 +521,7 @@ public class TestRealTimeGet extends TestRTGBase {
deleteAndGetVersion("I_do_not_exist", params("_version_", Long.toString(version))));
assertEquals("version should cause a conflict", 409, se.code());
- // try a delete of a document that doesn't exist, specifying that it should not
+ // try a delete operation of a document that doesn't exist, specifying that it should not
version2 = deleteAndGetVersion("I_do_not_exist", params("_version_", Long.toString(-1)));
assertTrue(version2 < 0);
@@ -901,7 +902,8 @@ public class TestRealTimeGet extends TestRTGBase {
@SuppressWarnings({"rawtypes"})
List doclist = (List) (((Map) rsp.get("response")).get("docs"));
if (doclist.size() == 0) {
- // there's no info we can get back with a delete, so not much we can check
+ // there's no info we can get back with a delete operation, so not much we can
+ // check
// without further synchronization. This is also correct when filteredOut==true
} else {
assertEquals(1, doclist.size());
diff --git a/solr/core/src/test/org/apache/solr/search/TestRecovery.java b/solr/core/src/test/org/apache/solr/search/TestRecovery.java
index f2e5fe69aca..7708889bd9f 100644
--- a/solr/core/src/test/org/apache/solr/search/TestRecovery.java
+++ b/solr/core/src/test/org/apache/solr/search/TestRecovery.java
@@ -129,7 +129,7 @@ public class TestRecovery extends SolrTestCaseJ4 {
int kindOfUpdate = random().nextInt(100);
if (docIdToVal.size() < 10) kindOfUpdate = 0;
if (kindOfUpdate <= 50) {
- // add a new document update, may by duplicate with the current one
+ // add a new document update, may be a duplicate with the current one
int val = random().nextInt(1000);
int docId = random().nextInt(10000);
addAndGetVersion(sdoc("id", String.valueOf(docId), "val_i_dvo", val), null);
@@ -293,7 +293,7 @@ public class TestRecovery extends SolrTestCaseJ4 {
assertJQ(req("q", "*:*"), "/response/numFound==5");
assertJQ(req("q", "id:A2"), "/response/numFound==0");
- // no updates, so insure that recovery does not run
+ // no updates, so ensure that recovery does not run
h.close();
int permits = logReplay.availablePermits();
createCore();
@@ -306,7 +306,7 @@ public class TestRecovery extends SolrTestCaseJ4 {
"/response/numFound==1"); // assert that in-place update is retained
Thread.sleep(100);
assertEquals(
- permits, logReplay.availablePermits()); // no updates, so insure that recovery didn't run
+ permits, logReplay.availablePermits()); // no updates, so ensure that recovery didn't run
assertEquals(
UpdateLog.State.ACTIVE, h.getCore().getUpdateHandler().getUpdateLog().getState());
@@ -349,13 +349,13 @@ public class TestRecovery extends SolrTestCaseJ4 {
updateJ(jsonAdd(sdoc("id", "B1")), params()); // should be deleted by subsequent DBQ in tlog
updateJ(
jsonAdd(sdoc("id", "B2")),
- params()); // should be deleted by DBQ that arives during tlog replay
+ params()); // should be deleted by DBQ that arrives during tlog replay
updateJ(jsonDelQ("id:B1 OR id:B3 OR id:B6"), params());
updateJ(
jsonAdd(sdoc("id", "B3")), params()); // should *NOT* be deleted by previous DBQ in tlog
updateJ(
jsonAdd(sdoc("id", "B4")),
- params()); // should be deleted by DBQ that arives during tlog replay
+ params()); // should be deleted by DBQ that arrives during tlog replay
updateJ(jsonAdd(sdoc("id", "B5")), params());
// sanity check no updates have been applied yet (just in tlog)
@@ -384,7 +384,7 @@ public class TestRecovery extends SolrTestCaseJ4 {
// wait until recovery has finished
assertTrue(logReplayFinish.tryAcquire(timeout, TimeUnit.SECONDS));
- // verify only the expected docs are found, even with out of order DBQ and DBQ that arived
+ // verify only the expected docs are found, even with out-of-order DBQ and DBQ that arrived
// during recovery
assertJQ(
req("q", "*:*", "fl", "id", "sort", "id asc"),
@@ -717,7 +717,7 @@ public class TestRecovery extends SolrTestCaseJ4 {
// updates should be buffered, so we should not see any results yet.
assertJQ(req("q", "*:*"), "/response/numFound==0");
- // real-time get should also not show anything (this could change in the future,
+ // real-time get should also not show anything (this could change in the future),
// but it's currently used for validating version numbers too, so it would
// be bad for updates to be visible if we're just buffering.
assertJQ(req("qt", "/get", "id", "B3"), "=={'doc':null}");
@@ -761,7 +761,7 @@ public class TestRecovery extends SolrTestCaseJ4 {
DISTRIB_UPDATE_PARAM,
FROM_LEADER,
"_version_",
- v940_del)); // this update should not take affect
+ v940_del)); // this update should not take effect
updateJ(
jsonAdd(sdoc("id", "B6", "_version_", v1060)), params(DISTRIB_UPDATE_PARAM, FROM_LEADER));
updateJ(
@@ -769,7 +769,8 @@ public class TestRecovery extends SolrTestCaseJ4 {
updateJ(
jsonAdd(sdoc("id", "B8", "_version_", v1080)), params(DISTRIB_UPDATE_PARAM, FROM_LEADER));
- // test that delete by query is at least buffered along with everything else so it will delete
+ // test that delete by query is at least buffered along with everything else, so it will
+ // delete
// the currently buffered id:8 (even if it doesn't currently support versioning)
updateJ(
"{\"delete\": { \"query\":\"id:B2 OR id:B8\" }}",
@@ -1157,9 +1158,9 @@ public class TestRecovery extends SolrTestCaseJ4 {
assertU(commit());
- // if we try the optimistic concurrency again, the tlog lookup maps should be clear
+ // if we try the optimistic concurrency again, the tlog lookup maps should be clear,
// and we should go to the index to check the version. This indirectly tests that
- // the update log was informed of the reload. See SOLR-4858
+ // the update log was informed of the reload operation. See SOLR-4858
version = addAndGetVersion(sdoc("id", "reload1", "_version_", Long.toString(version)), null);
@@ -1171,7 +1172,7 @@ public class TestRecovery extends SolrTestCaseJ4 {
version = addAndGetVersion(sdoc("id", "reload1", "_version_", Long.toString(version)), null);
// if the update log was not informed of the new update handler, then the old core will
- // incorrectly be used for some of the operations above and opened searchers will never be
+ // incorrectly be used for some operations above and opened searchers will never be
// closed. This used to cause the test framework to fail because of unclosed directory checks.
// SolrCore.openNewSearcher was modified to throw an error if the core is closed, resulting in a
// faster fail.
@@ -1565,7 +1566,7 @@ public class TestRecovery extends SolrTestCaseJ4 {
assertJQ(req("q", "*:*"), "/response/numFound==3");
//
- // Now test that the bad log file doesn't mess up retrieving latest versions
+ // Now test that the bad log file doesn't mess up retrieving the latest versions
//
String v104 = getNextVersion();
@@ -1630,7 +1631,7 @@ public class TestRecovery extends SolrTestCaseJ4 {
assertJQ(req("q", "*:*"), "/response/numFound==0");
//
- // Now test that the bad log file doesn't mess up retrieving latest versions
+ // Now test that the bad log file doesn't mess up retrieving the latest versions
//
String v104 = getNextVersion();
String v105 = getNextVersion();
@@ -1653,7 +1654,7 @@ public class TestRecovery extends SolrTestCaseJ4 {
assertJQ(req("q", "*:*"), "/response/numFound==3");
- // This messes up some other tests (on windows) if we don't remove the bad log.
+ // This test messes up some other tests (on Windows) if we don't remove the bad log.
// This *should* hopefully just be because the tests are too fragile and not because of real
// bugs - but it should be investigated further.
deleteLogs();
@@ -1862,7 +1863,7 @@ public class TestRecovery extends SolrTestCaseJ4 {
assertJQ(req("q", "id:A5"), "/response/numFound==0");
assertJQ(req("q", "id:A10"), "/response/numFound==1");
- // no updates, so insure that recovery does not run
+ // no updates, so ensure that recovery does not run
h.close();
int permits = logReplay.availablePermits();
createCore();
@@ -1880,7 +1881,7 @@ public class TestRecovery extends SolrTestCaseJ4 {
assertJQ(req("q", "id:A10"), "/response/numFound==1");
Thread.sleep(100);
assertEquals(
- permits, logReplay.availablePermits()); // no updates, so insure that recovery didn't run
+ permits, logReplay.availablePermits()); // no updates, so ensure that recovery didn't run
assertEquals(
UpdateLog.State.ACTIVE, h.getCore().getUpdateHandler().getUpdateLog().getState());
@@ -1929,7 +1930,7 @@ public class TestRecovery extends SolrTestCaseJ4 {
assertEquals(0, ulog.getLogList(logDir).length);
} finally {
- // make sure we create the core again, even if the assert fails so it won't mess
+ // make sure we create the core again, even if the assert operation fails, so it won't mess
// up the next test.
createCore();
assertJQ(req("q", "*:*"), "/response/numFound=="); // ensure it works
diff --git a/solr/core/src/test/org/apache/solr/search/TestSearcherReuse.java b/solr/core/src/test/org/apache/solr/search/TestSearcherReuse.java
index 235f5531390..efdf09e3b7d 100644
--- a/solr/core/src/test/org/apache/solr/search/TestSearcherReuse.java
+++ b/solr/core/src/test/org/apache/solr/search/TestSearcherReuse.java
@@ -42,7 +42,7 @@ public class TestSearcherReuse extends SolrTestCaseJ4 {
private static final String confPath = collection + "/conf";
/**
- * We're using a Managed schema so we can confirm that opening a new searcher after a schema
+ * We're using a Managed schema, so we can confirm that opening a new searcher after a schema
* modification results in getting a new searcher with the new schema linked to it.
*/
@BeforeClass
@@ -225,8 +225,8 @@ public class TestSearcherReuse extends SolrTestCaseJ4 {
/**
* Given an existing searcher, creates a new SolrRequest, and verifies that the searcher in that
- * request is <b>not</b> the same as the previous searcher -- cleaningly closing the new
- * SolrRequest either way.
+ * request is <b>not</b> the same as the previous searcher -- cleaning closes the new SolrRequest
+ * either way.
*/
public static void assertSearcherHasChanged(SolrIndexSearcher previous) {
SolrQueryRequest req = req("*:*");
@@ -240,8 +240,7 @@ public class TestSearcherReuse extends SolrTestCaseJ4 {
/**
* Given an existing searcher, creates a new SolrRequest, and verifies that the searcher in that
- * request is the same as the expected searcher -- cleaningly closing the new SolrRequest either
- * way.
+ * request is the same as the expected searcher -- cleaning closes the new SolrRequest either way.
*/
public static void assertSearcherHasNotChanged(SolrIndexSearcher expected) {
SolrQueryRequest req = req("*:*");
diff --git a/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial.java b/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial.java
index 2649d760420..de4612281ce 100644
--- a/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial.java
+++ b/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial.java
@@ -163,7 +163,7 @@ public class TestSolr4Spatial extends SolrTestCaseJ4 {
DistanceUtils.EARTH_MEAN_RADIUS_KM,
2,
10,
- 11); // this goes over the north pole
+ 11); // this goes over the North Pole
checkHits(
fieldName,
"-89.8, 50",
@@ -171,7 +171,7 @@ public class TestSolr4Spatial extends SolrTestCaseJ4 {
DistanceUtils.EARTH_MEAN_RADIUS_KM,
2,
12,
- 13); // this goes over the south pole
+ 13); // this goes over the South Pole
// try some normal cases
checkHits(fieldName, "33.0,-80.0", 300, DistanceUtils.EARTH_MEAN_RADIUS_KM, 2);
// large distance
@@ -196,11 +196,11 @@ public class TestSolr4Spatial extends SolrTestCaseJ4 {
checkHits(fieldName, "0,0", 3001, DistanceUtils.EARTH_MEAN_RADIUS_KM, 3, 14, 15, 16);
checkHits(fieldName, "0,0", 3000.1, DistanceUtils.EARTH_MEAN_RADIUS_KM, 3, 14, 15, 16);
- // really fine grained distance and reflects some of the vagaries of how we are calculating the
+ // really fine-grained distance and reflects some vagaries of how we are calculating the
// box
checkHits(fieldName, "43.517030,-96.789603", 109, DistanceUtils.EARTH_MEAN_RADIUS_KM, 0);
- // falls outside of the real distance, but inside the bounding box
+ // falls outside the real distance, but inside the bounding box
checkHits(fieldName, true, "43.517030,-96.789603", 110, DistanceUtils.EARTH_MEAN_RADIUS_KM, 0);
checkHits(
fieldName, false, "43.517030,-96.789603", 110, DistanceUtils.EARTH_MEAN_RADIUS_KM, 1, 17);
@@ -276,7 +276,7 @@ public class TestSolr4Spatial extends SolrTestCaseJ4 {
// Test using the Lucene spatial syntax
{
- // never actually need the score but lets test
+ // we never actually need the score but let's test anyway
String score = randomScoreMode();
double distDEG = DistanceUtils.dist2Degrees(distKM, DistanceUtils.EARTH_MEAN_RADIUS_KM);
@@ -358,7 +358,7 @@ public class TestSolr4Spatial extends SolrTestCaseJ4 {
int docId = 1;
int count = 1;
- String score = randomScoreMode(); // never actually need the score but lets test
+ String score = randomScoreMode(); // we never actually need the score but let's test anyway
assertQ(
req(
"fl",
@@ -444,7 +444,7 @@ public class TestSolr4Spatial extends SolrTestCaseJ4 {
req(
"q", radiusQuery(3, 4, 9, "distance", null),
"fl", "id,score",
- "sort", "score asc"), // want ascending due to increasing distance
+ "sort", "score asc"), // want ascending due to increasing 'distance' values
1e-3,
"/response/docs/[0]/id=='100'",
"/response/docs/[0]/score==2.827493",
@@ -551,7 +551,7 @@ public class TestSolr4Spatial extends SolrTestCaseJ4 {
@Test
public void testSortMultiVal() throws Exception {
assumeTrue("dist sorting not supported on field " + fieldName, canCalcDistance);
- assumeFalse("Multivalue not supported for this field", isBBoxField(fieldName));
+ assumeFalse("Multivalued not supported for this field", isBBoxField(fieldName));
assertU(adoc("id", "100", fieldName, "1,2")); // 1 point
assertU(
diff --git a/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2.java b/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2.java
index e8683b0bd75..4456934937c 100644
--- a/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2.java
+++ b/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2.java
@@ -222,8 +222,8 @@ public class TestSolr4Spatial2 extends SolrTestCaseJ4 {
deltaCentimetersMax,
0.0); // just so that we see it in black & white in the test
- // max found by trial & error. If we used 8 decimal places then we could get down to 1.04cm
- // accuracy but then we lose the ability to round-trip -- 40 would become 39.99999997 (ugh).
+ // max found by trial & error. If we used 8 decimal places then we could get down to 1.04 cm
+ // accuracy, but then we lose the ability to round-trip -- 40 would become 39.99999997 (ugh).
assertTrue("deltaCm too high: " + deltaCentimeters, deltaCentimeters < 1.41);
// Pt(x=105.29894270124083,y=-0.4371673760042398) to Pt(x=105.2989428,y=-0.4371673) is 1.38568
}
@@ -398,7 +398,7 @@ public class TestSolr4Spatial2 extends SolrTestCaseJ4 {
assertJQ(sameReq, "/response/numFound==1", "/response/docs/[0]/id=='1'");
// When there are new segments, we accumulate another hit. This tests the cache was not blown
- // away on commit. (i.e. the cache instance is new but it should've been regenerated from the
+ // away on commit. (i.e. the cache instance is new, but it should've been regenerated from the
// old one). Checking equality for the first reader's cache key indicates whether the cache
// should still be valid.
Object leafKey2 = getFirstLeafReaderKey();
diff --git a/solr/core/src/test/org/apache/solr/search/TestSolrQueryParser.java b/solr/core/src/test/org/apache/solr/search/TestSolrQueryParser.java
index 49f0cd872d3..d46ff1ebbdb 100644
--- a/solr/core/src/test/org/apache/solr/search/TestSolrQueryParser.java
+++ b/solr/core/src/test/org/apache/solr/search/TestSolrQueryParser.java
@@ -111,7 +111,7 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {
doc.addField(nanField, "NaN");
HAS_NAN_FIELDS.add(nanField);
- // Add a NaN & non-NaN value for multivalue fields, these should match :* and :[* TO *]
+ // Add a NaN & non-NaN value for multivalued fields, these should match :* and :[* TO *]
// equivalently
if (s.startsWith("s")) {
String bothField = "both_val_" + t + s;
@@ -150,11 +150,11 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {
41,
HAS_VAL_FIELDS.size());
for (String f : HAS_VAL_FIELDS) {
- // for all of these fields, these 2 syntaxes should be functionally equivilent
+ // for all of these fields, these 2 query forms should be functionally equivalent
// in matching the one doc that contains these fields
for (String q : Arrays.asList(f + ":*", f + ":[* TO *]")) {
assertJQ(req("q", q), "/response/numFound==1", "/response/docs/[0]/id=='999'");
- // the same syntaxes should be valid even if no doc has the field...
+ // the same syntax should be valid even if no doc has the field...
assertJQ(req("q", "bogus___" + q), "/response/numFound==0");
}
}
@@ -171,7 +171,7 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {
assertJQ(req("q", f + ":[* TO *]"), "/response/numFound==0");
assertJQ(req("q", f + ":[-Infinity TO Infinity]"), "/response/numFound==0");
for (String q : Arrays.asList(f + ":*", f + ":[* TO *]", f + ":[-Infinity TO Infinity]")) {
- // the same syntaxes should be valid even if no doc has the field...
+ // the same syntax should be valid even if no doc has the field...
assertJQ(req("q", "bogus___" + q), "/response/numFound==0");
}
}
@@ -477,7 +477,7 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {
sb.append(")");
// this should trip the lucene level global BooleanQuery.getMaxClauseCount() limit,
- // causing a parsing error, before Solr even get's a chance to enforce it's lower level limit
+ // causing a parsing error, before Solr even gets a chance to enforce its lower level limit
final String way_too_long = sb.toString();
final String expectedMsg = "too many boolean clauses";
diff --git a/solr/core/src/test/org/apache/solr/search/TestStressLucene.java b/solr/core/src/test/org/apache/solr/search/TestStressLucene.java
index a5178b9c5cf..9db05f76598 100644
--- a/solr/core/src/test/org/apache/solr/search/TestStressLucene.java
+++ b/solr/core/src/test/org/apache/solr/search/TestStressLucene.java
@@ -89,7 +89,8 @@ public class TestStressLucene extends TestRTGBase {
final FieldType ft2 = new FieldType();
ft2.setStored(true);
- // model how solr does locking - only allow one thread to do a hard commit at once, and only one
+ // model how solr handles locking - only allow one thread to do a hard commit at once, and only
+ // one
// thread to do a soft commit, but
// a hard commit in progress does not stop a soft commit.
final Lock hardCommitLock = syncCommits ? new ReentrantLock() : null;
diff --git a/solr/core/src/test/org/apache/solr/search/TestStressRecovery.java b/solr/core/src/test/org/apache/solr/search/TestStressRecovery.java
index fe55018d5f8..0f0c9209128 100644
--- a/solr/core/src/test/org/apache/solr/search/TestStressRecovery.java
+++ b/solr/core/src/test/org/apache/solr/search/TestStressRecovery.java
@@ -131,8 +131,8 @@ public class TestStressRecovery extends TestRTGBase {
}
synchronized (stateChangeLock) {
- // These commits won't take affect if we are in recovery mode,
- // so change the version to -1 so we won't update our model.
+ // These commits won't take effect if we are in recovery mode,
+ // so change the version to -1, so we won't update our model.
if (uLog.getState() != UpdateLog.State.ACTIVE) version = -1;
if (rand.nextInt(100) < softCommitPercent) {
verbose("softCommit start");
@@ -337,7 +337,8 @@ public class TestStressRecovery extends TestRTGBase {
@SuppressWarnings({"rawtypes"})
List doclist = (List) (((Map) rsp.get("response")).get("docs"));
if (doclist.size() == 0) {
- // there's no info we can get back with a delete, so not much we can check
+ // there's no info we can get back with a delete operation, so not much we can
+ // check
// without further synchronization
} else {
assertEquals(1, doclist.size());
@@ -417,7 +418,7 @@ public class TestStressRecovery extends TestRTGBase {
writePermissions[writeThreadNumber].release(random().nextInt(2) + 1);
}
- // throttle readers so they don't steal too much CPU from the recovery thread
+ // throttle readers, so they don't steal too much CPU from the recovery thread
readPermission.drainPermits();
}
if (cnt == 0) {
diff --git a/solr/core/src/test/org/apache/solr/search/TestStressReorder.java b/solr/core/src/test/org/apache/solr/search/TestStressReorder.java
index 7d214c411ef..8c5dedb7f10 100644
--- a/solr/core/src/test/org/apache/solr/search/TestStressReorder.java
+++ b/solr/core/src/test/org/apache/solr/search/TestStressReorder.java
@@ -336,7 +336,8 @@ public class TestStressReorder extends TestRTGBase {
@SuppressWarnings({"rawtypes"})
List doclist = (List) (((Map) rsp.get("response")).get("docs"));
if (doclist.size() == 0) {
- // there's no info we can get back with a delete, so not much we can check
+ // there's no info we can get back with a delete operation, so not much we can
+ // check
// without further synchronization
} else {
assertEquals(1, doclist.size());
diff --git a/solr/core/src/test/org/apache/solr/search/TestStressUserVersions.java b/solr/core/src/test/org/apache/solr/search/TestStressUserVersions.java
index e4a8fb29202..430fce5606b 100644
--- a/solr/core/src/test/org/apache/solr/search/TestStressUserVersions.java
+++ b/solr/core/src/test/org/apache/solr/search/TestStressUserVersions.java
@@ -300,7 +300,8 @@ public class TestStressUserVersions extends TestRTGBase {
@SuppressWarnings({"rawtypes"})
List doclist = (List) (((Map) rsp.get("response")).get("docs"));
if (doclist.size() == 0) {
- // there's no info we can get back with a delete, so not much we can check
+ // there's no info we can get back with a delete operation, so not much we can
+ // check
// without further synchronization
} else {
assertEquals(1, doclist.size());
diff --git a/solr/core/src/test/org/apache/solr/search/TestStressVersions.java b/solr/core/src/test/org/apache/solr/search/TestStressVersions.java
index 497ab1e0bb4..cb2649fe73e 100644
--- a/solr/core/src/test/org/apache/solr/search/TestStressVersions.java
+++ b/solr/core/src/test/org/apache/solr/search/TestStressVersions.java
@@ -247,7 +247,8 @@ public class TestStressVersions extends TestRTGBase {
@SuppressWarnings({"rawtypes"})
List doclist = (List) (((Map) rsp.get("response")).get("docs"));
if (doclist.size() == 0) {
- // there's no info we can get back with a delete, so not much we can check
+ // there's no info we can get back with a delete operation, so not much we can
+ // check
// without further synchronization
} else {
assertEquals(1, doclist.size());
diff --git a/solr/core/src/test/org/apache/solr/search/TestValueSourceCache.java b/solr/core/src/test/org/apache/solr/search/TestValueSourceCache.java
index 3737e81de0a..ea593b3f748 100644
--- a/solr/core/src/test/org/apache/solr/search/TestValueSourceCache.java
+++ b/solr/core/src/test/org/apache/solr/search/TestValueSourceCache.java
@@ -87,7 +87,7 @@ public class TestValueSourceCache extends SolrTestCaseJ4 {
}
}
- // This test should will fail because q1 and q3 evaluate as equal unless
+ // This test should fail because q1 and q3 evaluate as equal unless
// fixes for bug 2829 are in place.
void tryQuerySameTypes(String template, String numbers, String type) throws SyntaxError {
String s1 = template;
diff --git a/solr/core/src/test/org/apache/solr/search/facet/DistributedFacetSimpleRefinementLongTailTest.java b/solr/core/src/test/org/apache/solr/search/facet/DistributedFacetSimpleRefinementLongTailTest.java
index 39f850b07b5..d12ec011172 100644
--- a/solr/core/src/test/org/apache/solr/search/facet/DistributedFacetSimpleRefinementLongTailTest.java
+++ b/solr/core/src/test/org/apache/solr/search/facet/DistributedFacetSimpleRefinementLongTailTest.java
@@ -26,7 +26,7 @@ import org.apache.solr.common.util.NamedList;
import org.junit.Test;
/**
- * A test the demonstrates some of the expected behavior fo "long tail" terms when using <code>
+ * A test that demonstrates some expected behavior for "long tail" terms when using <code>
* refine:simple</code>
*
* <p><b>NOTE:</b> This test ignores the control collection (in single node mode, there is no need
@@ -248,7 +248,7 @@ public class DistributedFacetSimpleRefinementLongTailTest extends BaseDistribute
}
// even if we enable refinement, we still won't find the long 'tail' ...
- // regardless of wether we use either the default overrequest, or disable overrequesting...
+ // regardless of whether we use either the default overrequest, or disable overrequesting...
for (String over : Arrays.asList("", "overrequest:0,")) {
List<NamedList> foo_buckets =
(List<NamedList>)
diff --git a/solr/core/src/test/org/apache/solr/search/facet/RangeFacetCloudTest.java b/solr/core/src/test/org/apache/solr/search/facet/RangeFacetCloudTest.java
index e2103b1ca5c..4cb9584050c 100644
--- a/solr/core/src/test/org/apache/solr/search/facet/RangeFacetCloudTest.java
+++ b/solr/core/src/test/org/apache/solr/search/facet/RangeFacetCloudTest.java
@@ -107,7 +107,7 @@ public class RangeFacetCloudTest extends SolrCloudTestCase {
// clear the RANGE_MODEL
Arrays.fill(RANGE_MODEL, 0);
- // seed the TERM_MODEL Maps so we don't have null check later
+ // seed the TERM_MODEL Maps, so we don't have null check later
for (int i = 0; i < NUM_RANGE_VALUES; i++) {
TERM_MODEL[i] = new LinkedHashMap<>();
}
@@ -410,7 +410,7 @@ public class RangeFacetCloudTest extends SolrCloudTestCase {
assertBucket("bucket#0", 1, modelVals(1), subFacetLimit, buckets.get(0));
- // middle bucket doesn't include lower or upper so it's empty
+ // middle bucket doesn't include lower or upper, so it's empty
assertBucket("bucket#1", 2, emptyVals(), subFacetLimit, buckets.get(1));
assertBucket("bucket#2", 3, modelVals(4), subFacetLimit, buckets.get(2));
@@ -1110,8 +1110,8 @@ public class RangeFacetCloudTest extends SolrCloudTestCase {
/**
* A little helper struct to make the method sig of {@link #assertBucket} more readable. If lower
- * (or upper) is negative, then both must be negative and upper must be less then lower -- this
- * indicate that the bucket should be empty.
+ * (or upper) is negative, then both must be negative and upper must be less than lower -- this
+ * indicates that the bucket should be empty.
*
* @see #modelVals
* @see #emptyVals
@@ -1161,12 +1161,12 @@ public class RangeFacetCloudTest extends SolrCloudTestCase {
}
final StringBuilder result =
new StringBuilder(", facet:{ bar:{ type:terms, refine:true, field:" + STR_FIELD);
- // constrain overrequesting to stress refiement, but still test those codepaths
+ // constrain overrequesting to stress refinement, but still test those code paths
final String overrequest = random().nextBoolean() ? "0" : "1";
result.append(", overrequest:").append(overrequest).append(", limit:").append(subFacetLimit);
- // order should have no affect on our testing
+ // order should have no effect on our testing
if (random().nextBoolean()) {
result.append(", sort:'").append(SORTS.get(random().nextInt(SORTS.size()))).append("'");
}
@@ -1191,7 +1191,7 @@ public class RangeFacetCloudTest extends SolrCloudTestCase {
// we're not overly concerned about testing *EVERY* permutation,
// we just want to make sure we test multiple code paths (some, all, "ALL", none)
//
- // NOTE: Don't mix "ALL" or "NONE" with other options so we don't have to make
+ // NOTE: Don't mix "ALL" or "NONE" with other options, so we don't have to make
// assertBeforeAfterBetween overly complicated
ArrayList<EnumSet<FacetRangeOther>> results = new ArrayList<>(5);
results.add(EnumSet.of(FacetRangeOther.ALL));
diff --git a/solr/core/src/test/org/apache/solr/search/facet/SpatialHeatmapFacetsTest.java b/solr/core/src/test/org/apache/solr/search/facet/SpatialHeatmapFacetsTest.java
index 3ff77ef9434..185e9693860 100644
--- a/solr/core/src/test/org/apache/solr/search/facet/SpatialHeatmapFacetsTest.java
+++ b/solr/core/src/test/org/apache/solr/search/facet/SpatialHeatmapFacetsTest.java
@@ -87,7 +87,7 @@ public class SpatialHeatmapFacetsTest extends BaseDistributedSearchTestCase {
}
// Monkeying with these params changes the gridLevel in different directions. We don't test the
// exact
- // computation here; that's not _that_ relevant, and is Lucene spatial's job (not Solr) any way.
+ // computation here; that's not _that_ relevant, and is Lucene Spatial's job (not Solr) anyway.
assertEquals(
7,
getHmObj(query(params(baseParams, FacetParams.FACET_HEATMAP_GEOM, testBox)))
@@ -317,8 +317,8 @@ public class SpatialHeatmapFacetsTest extends BaseDistributedSearchTestCase {
assertEquals(SolrException.ErrorCode.BAD_REQUEST.code, e.code());
}
// Monkeying with these params changes the gridLevel in different directions. We don't test the
- // exact computation here; that's not _that_ relevant, and is Lucene spatial's job (not Solr)
- // any way.
+ // exact computation here; that's not _that_ relevant, and is Lucene Spatial's job (not Solr)
+ // anyway.
assertEquals(
7,
getHmObj(
@@ -525,7 +525,7 @@ public class SpatialHeatmapFacetsTest extends BaseDistributedSearchTestCase {
for (int i = 0; i < counts.length; i++) {
final int ri = random().nextInt(10);
if (ri >= 0 && ri <= 3) {
- counts[i] = ri; // 0 thru 3 will be made common
+ counts[i] = ri; // 0 through 3 will be made common
} else if (ri > 3) {
counts[i] = random().nextInt(Integer.MAX_VALUE); // lots of other possible values up to max
}
diff --git a/solr/core/src/test/org/apache/solr/search/facet/TestCloudJSONFacetJoinDomain.java b/solr/core/src/test/org/apache/solr/search/facet/TestCloudJSONFacetJoinDomain.java
index 344f1e25870..877e44bbfba 100644
--- a/solr/core/src/test/org/apache/solr/search/facet/TestCloudJSONFacetJoinDomain.java
+++ b/solr/core/src/test/org/apache/solr/search/facet/TestCloudJSONFacetJoinDomain.java
@@ -135,7 +135,7 @@ public class TestCloudJSONFacetJoinDomain extends SolrCloudTestCase {
for (int v = 0; v < numValsThisDoc; v++) {
final String fieldValue = randFieldValue(fieldNum);
- // for each fieldNum, there are actaully two fields: one string, and one integer
+ // for each fieldNum, there are actually two fields: one string, and one integer
doc.addField(field(STR_FIELD_SUFFIXES, fieldNum), fieldValue);
doc.addField(field(INT_FIELD_SUFFIXES, fieldNum), fieldValue);
}
@@ -153,7 +153,7 @@ public class TestCloudJSONFacetJoinDomain extends SolrCloudTestCase {
/**
* Given a (random) number, and a (static) array of possible suffixes returns a consistent field
- * name that uses that number and one of hte specified suffixes in it's name.
+ * name that uses that number and one of the specified suffixes in its name.
*
* @see #STR_FIELD_SUFFIXES
* @see #INT_FIELD_SUFFIXES
@@ -325,9 +325,9 @@ public class TestCloudJSONFacetJoinDomain extends SolrCloudTestCase {
}
/**
- * Test some small, hand crafted, but non-trivial queries that are easier to trace/debug then a
+ * Test some small, handcrafted, but non-trivial queries that are easier to trace/debug then a
* pure random monstrosity. (ie: if something obvious gets broken, this test may fail faster and
- * in a more obvious way then testRandom)
+ * in a more obvious way than testRandom)
*/
public void testBespoke() throws Exception {
@@ -563,7 +563,7 @@ public class TestCloudJSONFacetJoinDomain extends SolrCloudTestCase {
// relatively small facets, so be it, but if we get a really big one early on, we can test as
// much as possible, skip other iterations.
//
- // (deeply nested facets may contain more buckets then the max, but we won't *check* all of
+ // (deeply nested facets may contain more buckets than the max, but we won't *check* all of
// them)
final int maxBucketsAllowed = atLeast(2000);
final AtomicInteger maxBucketsToCheck = new AtomicInteger(maxBucketsAllowed);
@@ -703,7 +703,7 @@ public class TestCloudJSONFacetJoinDomain extends SolrCloudTestCase {
}
assertTrue(
"facets have unexpected keys left over: " + actualFacetResponse,
- // should alwasy be a count, maybe a 'val' if we're a subfacet
+ // should always be a count, maybe a 'val' if we're a subfacet
(actualFacetResponse.size() == expected.size() + 1)
|| (actualFacetResponse.size() == expected.size() + 2));
}
@@ -811,7 +811,7 @@ public class TestCloudJSONFacetJoinDomain extends SolrCloudTestCase {
/**
* Factory method for generating some random (nested) facets.
*
- * <p>For simplicity, each facet will have a unique key name, regardless of it's depth under
+ * <p>For simplicity, each facet will have a unique key name, regardless of its depth under
* other facets
*
* @see JoinDomain
@@ -859,16 +859,16 @@ public class TestCloudJSONFacetJoinDomain extends SolrCloudTestCase {
return r.nextInt(UNIQUE_FIELD_VALS); // 20% ask for less them what's needed
case 6:
return r.nextInt(
- Integer.MAX_VALUE); // 10%: completley random value, statisticaly more then enough
+ Integer.MAX_VALUE); // 10%: completely random value, statistically more than enough
default:
break;
}
- // else.... either leave param unspecified (or redundently specify the -1 default)
+ // else.... either leave param unspecified (or redundantly specify the -1 default)
return r.nextBoolean() ? null : -1;
}
/**
- * picks a random value for the "refine" param, that is garunteed to be suitable for the
+ * picks a random value for the "refine" param, that is guaranteed to be suitable for the
* specified limit & overrequest params.
*
* @return a value to specify in the request, or null to specify nothing (trigger default
@@ -893,7 +893,7 @@ public class TestCloudJSONFacetJoinDomain extends SolrCloudTestCase {
/**
* Deterministicly identifies if the specified limit & overrequest params <b>require</b> a
- * "refine:true" param be used in the the request, in order for the counts to be 100% accurate.
+ * "refine:true" param be used in the request, in order for the counts to be 100% accurate.
*
* @see #UNIQUE_FIELD_VALS
*/
@@ -918,7 +918,7 @@ public class TestCloudJSONFacetJoinDomain extends SolrCloudTestCase {
* recursive helper method for building random facets
*
* @param keyCounter used to ensure every generated facet has a unique key name
- * @param maxDepth max possible depth allowed for the recusion, a lower value may be used
+ * @param maxDepth max possible depth allowed for the recursion, a lower value may be used
* depending on how many facets are returned at the current level.
*/
private static Map<String, TermFacet> buildRandomFacets(
@@ -956,7 +956,7 @@ public class TestCloudJSONFacetJoinDomain extends SolrCloudTestCase {
private static final class JoinDomain {
public final String from;
public final String to;
- public final String filter; // not bothering with more then 1 filter, not the point of the test
+ public final String filter; // not bothering with more than 1 filter, not the point of the test
/**
* @param from left side of join field name, null if domain involves no joining
@@ -1032,7 +1032,8 @@ public class TestCloudJSONFacetJoinDomain extends SolrCloudTestCase {
if (noJoin) break;
from = field(suffixes, random().nextInt(MAX_FIELD_NUM));
to = field(suffixes, random().nextInt(MAX_FIELD_NUM));
- // HACK: joined numeric point fields need docValues.. for now just skip _is fields if we are
+ // HACK: joined numeric point fields need docValues... for now just skip _is fields if we
+ // are
// dealing with points.
if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)
&& (from.endsWith("_is") || to.endsWith("_is"))) {
diff --git a/solr/core/src/test/org/apache/solr/search/facet/TestCloudJSONFacetSKG.java b/solr/core/src/test/org/apache/solr/search/facet/TestCloudJSONFacetSKG.java
index 1d7114ed8e0..a693ddff545 100644
--- a/solr/core/src/test/org/apache/solr/search/facet/TestCloudJSONFacetSKG.java
+++ b/solr/core/src/test/org/apache/solr/search/facet/TestCloudJSONFacetSKG.java
@@ -160,7 +160,7 @@ public class TestCloudJSONFacetSKG extends SolrCloudTestCase {
SolrInputDocument doc = sdoc("id", "" + id);
for (int fieldNum = 0; fieldNum < MAX_FIELD_NUM; fieldNum++) {
// NOTE: we ensure every doc has at least one value in each field that way, if a term is
- // returned for a parent there there is guaranteed to be at least one one term in the child
+ // returned for a parent there is guaranteed to be at least one term in the child
// facet as well.
//
// otherwise, we'd face the risk of a single shardX returning parentTermX as a top term for
@@ -199,7 +199,7 @@ public class TestCloudJSONFacetSKG extends SolrCloudTestCase {
/**
* Given a (random) number, and a (static) array of possible suffixes returns a consistent field
- * name that uses that number and one of hte specified suffixes in it's name.
+ * name that uses that number and one of the specified suffixes in its name.
*
* @see #MULTI_STR_FIELD_SUFFIXES
* @see #MULTI_INT_FIELD_SUFFIXES
@@ -212,11 +212,11 @@ public class TestCloudJSONFacetSKG extends SolrCloudTestCase {
final String suffix = suffixes[fieldNum % suffixes.length];
return "field_" + fieldNum + suffix;
}
- /** Given a (random) number, returns a consistent field name for a multi valued string field */
+ /** Given a (random) number, returns a consistent field name for a multivalued string field */
private static String multiStrField(final int fieldNum) {
return field(MULTI_STR_FIELD_SUFFIXES, fieldNum);
}
- /** Given a (random) number, returns a consistent field name for a multi valued int field */
+ /** Given a (random) number, returns a consistent field name for a multivalued int field */
private static String multiIntField(final int fieldNum) {
return field(MULTI_INT_FIELD_SUFFIXES, fieldNum);
}
@@ -255,9 +255,9 @@ public class TestCloudJSONFacetSKG extends SolrCloudTestCase {
}
/**
- * Test some small, hand crafted, but non-trivial queries that are easier to trace/debug then a
+ * Test some small, handcrafted, but non-trivial queries that are easier to trace/debug then a
* pure random monstrosity. (ie: if something obvious gets broken, this test may fail faster and
- * in a more obvious way then testRandom)
+ * in a more obvious way than testRandom)
*/
public void testBespoke() throws Exception {
{ // trivial single level facet
@@ -284,7 +284,7 @@ public class TestCloudJSONFacetSKG extends SolrCloudTestCase {
// to sanity check refinement of buckets missing from other shard in both cases
// NOTE that these two queries & facets *should* effectively identical given that the
- // very large limit value is big enough no shard will ever return that may terms,
+ // very large limit value is big enough no shard will ever return that many terms,
// but the "limit=-1" case it actually triggers slightly different code paths
// because it causes FacetField.returnsPartial() to be "true"
for (int limit : new int[] {999999999, -1}) {
@@ -436,7 +436,7 @@ public class TestCloudJSONFacetSKG extends SolrCloudTestCase {
assertNotNull(facetKey + " key missing from: " + actualFacetResponse, results);
if (null != results.get("allBuckets")) {
- // if the response includes an allBuckets bucket, then there must not be an skg value
+ // if the response includes an allBuckets bucket, then there must not be a skg value
// 'skg' key must not exist in th allBuckets bucket
assertEquals(
@@ -504,7 +504,7 @@ public class TestCloudJSONFacetSKG extends SolrCloudTestCase {
}
/**
- * Verifies that the popularity & relatedness values containined in a single SKG bucket match
+ * Verifies that the popularity & relatedness values contained in a single SKG bucket match
* the expected values based on the facet field & bucket value, as well the existing
* filterParams.
*
@@ -580,8 +580,8 @@ public class TestCloudJSONFacetSKG extends SolrCloudTestCase {
public final String field;
/**
- * @param field must be non null
- * @param options can set any of options used in a term facet other then field or (sub) facets
+ * @param field must be non-null
+ * @param options can set any of options used in a term facet other than field or (sub) facets
*/
public TermFacet(final String field, final Map<String, Object> options) {
assert null != field;
@@ -807,11 +807,11 @@ public class TestCloudJSONFacetSKG extends SolrCloudTestCase {
return r.nextInt(UNIQUE_FIELD_VALS); // 20% ask for less them what's needed
case 6:
return r.nextInt(
- Integer.MAX_VALUE); // 10%: completley random value, statisticaly more then enough
+ Integer.MAX_VALUE); // 10%: completely random value, statisticaly more than enough
default:
break;
}
- // else.... either leave param unspecified (or redundently specify the -1 default)
+ // else.... either leave param unspecified (or redundantly specify the -1 default)
return r.nextBoolean() ? null : -1;
}
@@ -843,7 +843,7 @@ public class TestCloudJSONFacetSKG extends SolrCloudTestCase {
* recursive helper method for building random facets
*
* @param keyCounter used to ensure every generated facet has a unique key name
- * @param maxDepth max possible depth allowed for the recusion, a lower value may be used
+ * @param maxDepth max possible depth allowed for the recursion, a lower value may be used
* depending on how many facets are returned at the current level.
*/
private static Map<String, TermFacet> buildRandomFacets(
@@ -894,7 +894,7 @@ public class TestCloudJSONFacetSKG extends SolrCloudTestCase {
}
/**
- * Uses a random SolrClient to execture a request and returns only the numFound
+ * Uses a random SolrClient to execute a request and returns only the numFound
*
* @see #getRandClient
*/
@@ -915,7 +915,7 @@ public class TestCloudJSONFacetSKG extends SolrCloudTestCase {
for (int i = 0; i < pairs.length; i += 2) {
final Object key = pairs[i];
final Object val = pairs[i + 1];
- if (null == key) throw new NullPointerException("arguemnt " + i);
+ if (null == key) throw new NullPointerException("argument " + i);
if (null == val) continue;
map.put(key.toString(), val);
diff --git a/solr/core/src/test/org/apache/solr/search/facet/TestCloudJSONFacetSKGEquiv.java b/solr/core/src/test/org/apache/solr/search/facet/TestCloudJSONFacetSKGEquiv.java
index 0437321921f..5dbbf2a2063 100644
--- a/solr/core/src/test/org/apache/solr/search/facet/TestCloudJSONFacetSKGEquiv.java
+++ b/solr/core/src/test/org/apache/solr/search/facet/TestCloudJSONFacetSKGEquiv.java
@@ -188,7 +188,7 @@ public class TestCloudJSONFacetSKGEquiv extends SolrCloudTestCase {
/**
* Given a (random) number, and a (static) array of possible suffixes returns a consistent field
- * name that uses that number and one of hte specified suffixes in it's name.
+ * name that uses that number and one of the specified suffixes in its name.
*
* @see #MULTI_STR_FIELD_SUFFIXES
* @see #MULTI_INT_FIELD_SUFFIXES
@@ -201,11 +201,11 @@ public class TestCloudJSONFacetSKGEquiv extends SolrCloudTestCase {
final String suffix = suffixes[fieldNum % suffixes.length];
return "field_" + fieldNum + suffix;
}
- /** Given a (random) number, returns a consistent field name for a multi valued string field */
+ /** Given a (random) number, returns a consistent field name for a multivalued string field */
private static String multiStrField(final int fieldNum) {
return field(MULTI_STR_FIELD_SUFFIXES, fieldNum);
}
- /** Given a (random) number, returns a consistent field name for a multi valued int field */
+ /** Given a (random) number, returns a consistent field name for a multivalued int field */
private static String multiIntField(final int fieldNum) {
return field(MULTI_INT_FIELD_SUFFIXES, fieldNum);
}
@@ -257,7 +257,7 @@ public class TestCloudJSONFacetSKGEquiv extends SolrCloudTestCase {
// - only inspect the "first" debug NamedList in the results
//
- // simple individual facet that sorts on an skg stat...
+ // simple individual facet that sorts on a skg stat...
final TermFacet f = new TermFacet(soloStrField(9), 10, 0, "skg desc", null);
final Map<String, TermFacet> facets = new LinkedHashMap<>();
facets.put("str", f);
@@ -267,7 +267,7 @@ public class TestCloudJSONFacetSKGEquiv extends SolrCloudTestCase {
"rows", "0",
"debug", "true", // SOLR-14451
// *:* is the only "safe" query for this test,
- // to ensure we always have at least one bucket for every facet
+ // to ensure we always have at least one bucket for every facet,
// so we can be confident in getting the debug we expect...
"q", "*:*",
"fore", multiStrField(7) + ":11",
@@ -307,18 +307,18 @@ public class TestCloudJSONFacetSKGEquiv extends SolrCloudTestCase {
"rows", "0",
"debug", "true", // SOLR-14451
// *:* is the only "safe" query for this test,
- // to ensure we always have at least one bucket for every facet
+ // to ensure we always have at least one bucket for every facet,
// so we can be confident in getting the debug we expect...
"q", "*:*",
"fore", multiStrField(7) + ":11",
"back", "*:*");
- // simple individual facet that sorts on an skg stat...
+ // simple individual facet that sorts on a skg stat...
//
// all results we test should be the same even if there is another 'skg_extra' stat,
// it shouldn't be involved in the sweeping at all.
for (Facet extra : Arrays.asList(null, new RelatednessFacet(multiStrField(2) + ":9", null))) {
- // choose a single value string so we know both 'dv' (sweep) and 'dvhash' (no sweep) can be
+ // choose a single value string, so we know both 'dv' (sweep) and 'dvhash' (no sweep) can be
// specified
final TermFacet f = new TermFacet(soloStrField(9), 10, 0, "skg desc", null);
if (null != extra) {
@@ -380,12 +380,12 @@ public class TestCloudJSONFacetSKGEquiv extends SolrCloudTestCase {
}
}
- // simple facet that sorts on an skg stat but uses prelim_sort on count
+ // simple facet that sorts on a skg stat but uses prelim_sort on count
//
// all results we test should be the same even if there is another 'skg_extra' stat,
// neither skg should be involved in the sweeping at all.
for (Facet extra : Arrays.asList(null, new RelatednessFacet(multiStrField(2) + ":9", null))) {
- // choose a single value string so we know both 'dv' (sweep) and 'dvhash' (no sweep) can be
+ // choose a single value string, so we know both 'dv' (sweep) and 'dvhash' (no sweep) can be
// specified
final TermFacet f =
new TermFacet(
@@ -462,14 +462,14 @@ public class TestCloudJSONFacetSKGEquiv extends SolrCloudTestCase {
}
}
- // nested facets that both sort on an skg stat
- // (set limit + overrequest tiny to keep multishard response managable)
+ // nested facets that both sort on a skg stat
+ // (set limit + overrequest tiny to keep multishard response manageable)
//
// all results we test should be the same even if there is another 'skg_extra' stat,
// in each term facet. they shouldn't be involved in the sweeping at all.
for (Facet extra : Arrays.asList(null, new RelatednessFacet(multiStrField(2) + ":9", null))) {
- // choose single value strings so we know both 'dv' (sweep) and 'dvhash' (no sweep) can be
- // specified choose 'id' for the parent facet so we are garunteed some child facets
+ // choose single value strings, so we know both 'dv' (sweep) and 'dvhash' (no sweep) can be
+ // specified choose 'id' for the parent facet, so we are guaranteed some child facets
final TermFacet parent = new TermFacet("id", 1, 0, "skg desc", false);
final TermFacet child = new TermFacet(soloStrField(7), 1, 0, "skg desc", false);
parent.subFacets.put("child", child);
@@ -500,7 +500,7 @@ public class TestCloudJSONFacetSKGEquiv extends SolrCloudTestCase {
((List<NamedList<Object>>) parentDebug.get("sub-facet")).get(0);
assertEquals(soloStrField(7), childDebug.get("field"));
- // these should all be true for both the parent and the child debug..
+ // these should all be true for both the parent and the child debug...
for (NamedList<Object> debug : Arrays.asList(parentDebug, childDebug)) {
assertEquals(FacetFieldProcessorByArrayDV.class.getSimpleName(), debug.get("processor"));
@SuppressWarnings("unchecked")
@@ -540,9 +540,9 @@ public class TestCloudJSONFacetSKGEquiv extends SolrCloudTestCase {
}
/**
- * Test some small, hand crafted, but non-trivial queries that are easier to trace/debug then a
+ * Test some small, handcrafted, but non-trivial queries that are easier to trace/debug then a
* pure random monstrosity. (ie: if something obvious gets broken, this test may fail faster and
- * in a more obvious way then testRandom)
+ * in a more obvious way than testRandom)
*/
public void testBespoke() {
{ // two trivial single level facets
@@ -580,8 +580,8 @@ public class TestCloudJSONFacetSKGEquiv extends SolrCloudTestCase {
// to sanity check refinement of buckets missing from other shard in both cases
// NOTE that these two queries & facets *should* effectively identical given that the
- // very large limit value is big enough no shard will ever return that may terms,
- // but the "limit=-1" case it actaully triggers slightly different code paths
+ // very large limit value is big enough no shard will ever return that many terms,
+ // but the "limit=-1" case it actually triggers slightly different code paths
// because it causes FacetField.returnsPartial() to be "true"
for (int limit : new int[] {999999999, -1}) {
Map<String, TermFacet> facets = new LinkedHashMap<>();
@@ -641,11 +641,12 @@ public class TestCloudJSONFacetSKGEquiv extends SolrCloudTestCase {
/**
* Given a few explicit "structures" of requests, test many permutations of various
- * params/options. This is more complex then {@link #testBespoke} but should still be easier to
+ * params/options. This is more complex than {@link #testBespoke} but should still be easier to
* trace/debug then a pure random monstrosity.
*/
public void testBespokeStructures() {
- // we don't need to test every field, just make sure we test enough fields to hit every suffix..
+ // we don't need to test every field, just make sure we test enough fields to hit every
+ // suffix...
final int maxFacetFieldNum =
Collections.max(
Arrays.asList(
@@ -794,7 +795,7 @@ public class TestCloudJSONFacetSKGEquiv extends SolrCloudTestCase {
// start by recording the results of the purely "default" behavior...
final NamedList<?> expected = getFacetResponse(basicParams);
- // now loop over all permutations of processors and sweep values and and compare them to the
+ // now loop over all permutations of processors and sweep values and compare them to the
// "default"...
for (FacetMethod method : EnumSet.allOf(FacetMethod.class)) {
for (Boolean sweep : Arrays.asList(true, false, null)) {
@@ -874,7 +875,7 @@ public class TestCloudJSONFacetSKGEquiv extends SolrCloudTestCase {
}
/**
- * trivial facet that is not SKG (and doesn't have any of it's special behavior) for the purposes
+ * trivial facet that is not SKG (and doesn't have any of its special behavior) for the purposes
* of testing how TermFacet behaves with a mix of sub-facets.
*/
private static final class SumFacet implements Facet {
@@ -906,7 +907,7 @@ public class TestCloudJSONFacetSKGEquiv extends SolrCloudTestCase {
* <p>The specified fore/back queries will be wrapped in localparam syntax in the resulting json,
* unless they are 'null' in which case <code>$fore</code> and <code>$back</code> refs will be
* used in their place, and must be set as request params (this allows "random" facets to still
- * easily trigger the "nested facets re-using the same fore/back set for SKG situation)
+ * easily trigger the nested facets re-using the same fore/back set for SKG situation)
*
* <p>The JSON for all of these facets includes a <code>${sweep_key:xxx}</code> (which will be
* ignored by default) and <code>${sweep_val:yyy}</code> which may be set as params on each
@@ -977,8 +978,8 @@ public class TestCloudJSONFacetSKGEquiv extends SolrCloudTestCase {
public final Map<String, Facet> subFacets = new LinkedHashMap<>();
/**
- * @param field must be non null
- * @param options can set any of options used in a term facet other then field or (sub) facets
+ * @param field must be non-null
+ * @param options can set any of options used in a term facet other than field or (sub) facets
*/
public TermFacet(final String field, final Map<String, Object> options) {
assert null != field;
@@ -1007,8 +1008,8 @@ public class TestCloudJSONFacetSKGEquiv extends SolrCloudTestCase {
}
/**
- * Generates a random TermFacet that does not contai nany random sub-facets beyond a single
- * consistent "skg" stat)
+ * Generates a random TermFacet that does not contain any random sub-facets beyond a single
+ * consistent "skg" stat
*/
public static TermFacet buildRandom() {
final String sort = randomSortParam(random());
@@ -1233,11 +1234,11 @@ public class TestCloudJSONFacetSKGEquiv extends SolrCloudTestCase {
return r.nextInt(UNIQUE_FIELD_VALS); // 20% ask for less them what's needed
case 6:
return r.nextInt(
- Integer.MAX_VALUE); // 10%: completley random value, statisticaly more then enough
+ Integer.MAX_VALUE); // 10%: completely random value, statisticaly more than enough
default:
break;
}
- // else.... either leave param unspecified (or redundently specify the -1 default)
+ // else.... either leave param unspecified (or redundantly specify the -1 default)
return r.nextBoolean() ? null : -1;
}
@@ -1245,7 +1246,7 @@ public class TestCloudJSONFacetSKGEquiv extends SolrCloudTestCase {
* recursive helper method for building random facets
*
* @param keyCounter used to ensure every generated facet has a unique key name
- * @param maxDepth max possible depth allowed for the recusion, a lower value may be used
+ * @param maxDepth max possible depth allowed for the recursion, a lower value may be used
* depending on how many facets are returned at the current level.
*/
private static Map<String, TermFacet> buildRandomFacets(
@@ -1271,7 +1272,7 @@ public class TestCloudJSONFacetSKGEquiv extends SolrCloudTestCase {
// randomly add 1 or 2 more ... 3/5th chance of being '0'
final int numExtraSKGStats = Math.max(0, TestUtil.nextInt(random(), -2, 2));
for (int skgId = 0; skgId < numExtraSKGStats; skgId++) {
- // sometimes we overwrite the trivial defualt "skg" with this one...
+ // sometimes we overwrite the trivial default "skg" with this one...
final String key =
(0 == skgId && 0 == TestUtil.nextInt(random(), 0, 5)) ? "skg" : "skg" + skgId;
facet.subFacets.put(key, RelatednessFacet.buildRandom());
@@ -1299,7 +1300,7 @@ public class TestCloudJSONFacetSKGEquiv extends SolrCloudTestCase {
}
/**
- * Uses a random SolrClient to execture a request and returns only the numFound
+ * Uses a random SolrClient to execute a request and returns only the numFound
*
* @see #getRandClient
*/
@@ -1320,7 +1321,7 @@ public class TestCloudJSONFacetSKGEquiv extends SolrCloudTestCase {
for (int i = 0; i < pairs.length; i += 2) {
final Object key = pairs[i];
final Object val = pairs[i + 1];
- if (null == key) throw new NullPointerException("arguemnt " + i);
+ if (null == key) throw new NullPointerException("argument " + i);
if (null == val) continue;
map.put(key.toString(), val);
diff --git a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacetRefinement.java b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacetRefinement.java
index 245fb7ee2f8..d696c923b00 100644
--- a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacetRefinement.java
+++ b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacetRefinement.java
@@ -334,7 +334,7 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
@Test
public void testMergeWithOverrefine() throws Exception {
- // overrefine hueristic should use explicit overrequest as default
+ // overrefine heuristic should use explicit overrequest as default
doTestRefine(
"{x : {type:terms, field:X, limit:1, overrequest:1, sort:'count asc', refine:true} }",
//
@@ -352,7 +352,7 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
null,
"=={x:{_l:[x1]}}");
- // completely implicit hueristic when no explicit overrequest
+ // completely implicit heuristic when no explicit overrequest
// limit=1 + 10% + 4 =~ 5 total, but x2 is fully populated so only the other 4 "lowest" should
// be refined
doTestRefine(
@@ -381,7 +381,7 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
"=={x:{_l:[x1]}}");
}
- // with 1<mincount, even sort="count desc" should trigger hueristic overrefinement
+ // with 1<mincount, even sort="count desc" should trigger heuristic overrefinement
// limit=1 + 10% + 4 =~ 5 total, but x2 is fully populated so only the other 4 "highest" should
// be refined
doTestRefine(
@@ -416,14 +416,14 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
"=={x:{_l:[x3]}}",
"=={x:{_l:[x1,x9]}}");
- // hueristic refinement of nested facets
+ // heuristic refinement of nested facets
// limit=1 + 10% + 4 =~ 5 total (at each level)
// -> x2 is fully populated and child buckets are consistent - no refinement needed at all
// -> x4 has counts from both shards, but child buckets don't align perfectly
//
// For (test) simplicity, only x3 and x4 have enough (total) y buckets to prove that the
// sub-facet
- // overrefine hueristic is finite...
+ // overrefine heuristic is finite...
// -> x3 has 6 total sub-facet buckets, only "lowest 5" should be refined on missing shard
// -> x4 also has 6 total sub-facet buckets, but only 3 need refined since 2 already fully
// populated
@@ -569,7 +569,7 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
+ " ] },"
+ " cat_2:{ buckets:[ "
+ " {val:X,count:4,sum_p:4.0}," // count desc
- + " {val:A,count:1,sum_p:1.0}," // index order tie break
+ + " {val:A,count:1,sum_p:1.0}," // index order tiebreak
+ " {val:B,count:1,sum_p:1.0},"
+ " ] }"
+ "}");
@@ -625,7 +625,7 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
// all_ss is only used for sub-faceting...
// every doc will be in all_ss:z_all, (most c1 docs will be in all_ss:some
- // (with index order tie breaker, c1 should return "some" when limit:1
+ // (with index order tiebreaker, c1 should return "some" when limit:1
// but "z_all" should have a higher count from c0)
// client 0 // shard1: A=1,B=1,C=2 ...
@@ -697,10 +697,10 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
client.commit();
// In an ideal world, 'Z:2' would be returned as the 3rd value,
- // but neither C or Z make the topN cut in phase#1, so only A,B,X get refined.
+ // but neither C nor Z make the topN cut in phase#1, so only A,B,X get refined.
// After refinement, X's increased values should *NOT* push it out of the (original) topN
// to let "C" bubble back up into the topN, with incomplete/inaccurate count/stats
- // (NOTE: hueristic for num buckets refined is based on 'overrequest' unless explicit
+ // (NOTE: heuristic for num buckets refined is based on 'overrequest' unless explicit
// 'overrefine')
client.testJQ(
params(
@@ -847,7 +847,7 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
+ "} ] } }");
// With any overrequest param > 0 on the parent facet, both shards will return "z_all" as a
- // viable candidate and the merge logic should recoginize that X is a better choice,
+ // viable candidate and the merge logic should recognize that X is a better choice,
// even though the (single shard) stats for "C" will be lower
final int top_over = TestUtil.nextInt(random(), 1, 999);
client.testJQ(
@@ -969,9 +969,9 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
// all terms will tie on the sort criteria, and "Ax" should win the tiebreaker.
//
// When Ax is refined against c1, it's 'debug' sort value will increase, but regardless of the
- // value of processEmpty, no other term should be returned in it's place (because if they are
- // also correctly refined, then their 'debug' sort values will also increase and Ax will stll
- // win the tie breaker -- and if they are not refined they shouldn't be returned)
+ // value of processEmpty, no other term should be returned in its place (because if they are
+ // also correctly refined, then their 'debug' sort values will also increase and Ax will still
+ // win the tiebreaker -- and if they are not refined they shouldn't be returned)
for (int overrequest = 0; overrequest < 5; overrequest++) {
for (boolean pe : Arrays.asList(false, true)) {
ModifiableSolrParams p =
@@ -1131,15 +1131,15 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
// initially, or during refinement)
//
// The problem comes in with how "empty" bucket lists are dealt with...
- // - child debug counts never get higher then '2' because even with the forced "_l" refinement
+ // - child debug counts never get higher than '2' because even with the forced "_l" refinement
// of the parent buckets against the "empty" shards we don't explicitly ask those shards to
// evaluate the child buckets
// - perhaps we should reconsider the value of "_l" ?
// - why aren't we just specifying all the buckets (and child buckets) chosen in phase#1 using
// "_p" ?
// - or at the very least, if the purpose of "_l" is to give other buckets a chance to "bubble
- // up" in phase#2, then shouldn't a "_l" refinement requests still include the buckets choosen
- // in phase#1, and request that the shard fill them in in addition to returning its own top
+ // up" in phase#2, then shouldn't a "_l" refinement requests still include the buckets chosen
+ // in phase#1, and request that the shard fill them in addition to returning its own top
// buckets?
client.testJQ(
params(
diff --git a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java
index bba388161c9..619164100b9 100644
--- a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java
+++ b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java
@@ -355,7 +355,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
"facets/f=={buckets:[{ val:999, count:2, x:180.0, z:42 }]}");
}
- public void testBehaviorEquivilenceOfUninvertibleFalse() throws Exception {
+ public void testBehaviorEquivalenceOfUninvertibleFalse() throws Exception {
Client client = Client.localClient();
indexSimple(client);
@@ -381,7 +381,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
&& !f.contains("multi")) {
// DVHASH is (currently) weird...
//
- // it's ignored for multi valued fields -- but for single valued fields, it explicitly
+ // it's ignored for multivalued fields -- but for single valued fields, it explicitly
// checks the *FieldInfos* on the reader to see if the DocVals type is ok.
//
// Which means that unlike most other facet method:xxx options, it fails hard if you try to
@@ -401,7 +401,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
// regardless of the facet method (parameterized via default at test class level)
// faceting on an "uninvertible=false docValues=true" field should work,
//
- // it should behave equivilently to it's copyField source...
+ // it should behave equivalently to its copyField source...
for (String f :
Arrays.asList(
"where_s", "where_s_multi_not_uninvert_dv", "where_s_single_not_uninvert_dv")) {
@@ -421,7 +421,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
// faceting on an "uninvertible=false docValues=false" field should be possible
// when using method:enum w/sort:index
//
- // it should behave equivilent to it's copyField source...
+ // it should behave equivalent to its copyField source...
for (String f :
Arrays.asList("where_s", "where_s_multi_not_uninvert", "where_s_single_not_uninvert")) {
assertJQ(
@@ -445,7 +445,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
{ // simple 'query' domain
- // the facet buckets for all of the requests below should be identical
+ // the facet buckets for all the requests below should be identical
// only the numFound & top level facet count should differ
final String expectedFacets =
"facets/w=={ buckets:[" + " { val:'NJ', count:2}, " + " { val:'NY', count:1} ] }";
@@ -498,7 +498,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
{ // a nested explicit query domain
- // for all of the "top" buckets, the subfacet should have identical sub-buckets
+ // for all the "top" buckets, the subfacet should have identical sub-buckets
final String expectedSubBuckets = "{ buckets:[ { val:'B', count:3}, { val:'A', count:2} ] }";
assertJQ(
req(
@@ -579,7 +579,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
"prelim_sort:'count desc', sort:'y desc'",
"prelim_sort:'count desc', sort:'z desc'",
"prelim_sort:'count desc', sort:'skg desc'")) {
- // the relatedness score of each of our cat_s values is (conviniently) also alphabetical
+ // the relatedness score of each of our cat_s values is (conveniently) also alphabetical
// order, (and the same order as 'sum(num_i) desc' & 'min(num_i) desc')
//
// So all of these re/sort options should produce identical output (since the num buckets is <
@@ -587,9 +587,9 @@ public class TestJsonFacets extends SolrTestCaseHS {
// - Testing "index" sort allows the randomized use of "stream" processor as default to be
// tested.
// - Testing (re)sorts on other stats sanity checks code paths where relatedness() is a
- // "defered" Agg
+ // "deferred" Agg
for (String limit : Arrays.asList(", ", ", limit:5, ", ", limit:-1, ")) {
- // results shouldn't change regardless of our limit param"
+ // results shouldn't change regardless of our limit param
assertJQ(
req(
"q",
@@ -617,7 +617,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
+ " background_popularity: 0.33333, },"
+ " }, "
+ " { val:'B', count:3, y:-3.0, z:-5, "
- + " skg : { relatedness: 0.0, " // perfectly average and uncorrolated
+ + " skg : { relatedness: 0.0, " // perfectly average and uncorrelated
// + " foreground_count: 1, "
// + " foreground_size: 2, "
// + " background_count: 3, "
@@ -645,7 +645,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
+ " facet: { skg: 'relatedness($fore,$back)', y:'sum(num_i)', z:'min(num_i)' } } }"),
"facets=={count:5, x:{ buckets:["
+ " { val:'B', count:3, y:-3.0, z:-5, "
- + " skg : { relatedness: 0.0, " // perfectly average and uncorrolated
+ + " skg : { relatedness: 0.0, " // perfectly average and uncorrelated
// + " foreground_count: 1, "
// + " foreground_size: 2, "
// + " background_count: 3, "
@@ -674,7 +674,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
// - Testing (re)sorts on other stats sanity checks code paths where relatedness() is a
// "deferred" Agg
for (String limit : Arrays.asList(", ", ", limit:5, ", ", limit:-1, ")) {
- // results shouldn't change regardless of our limit param"
+ // results shouldn't change regardless of our limit param
assertJQ(
req(
"q",
@@ -823,7 +823,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
+ " background_popularity: 0.33333, "
+ " } }, "
+ " { val:'NJ', count: 2, "
- + " skg : { relatedness: 0.0, " // perfectly average and uncorrolated
+ + " skg : { relatedness: 0.0, " // perfectly average and uncorrelated
// + " foreground_count: 1, "
// + " foreground_size: 2, "
// + " background_count: 3, "
@@ -843,7 +843,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
+ " background_popularity: 0.33333 },"
+ " y : { buckets:["
+ " { val:'NJ', count: 1, "
- + " skg : { relatedness: 0.0, " // perfectly average and uncorrolated
+ + " skg : { relatedness: 0.0, " // perfectly average and uncorrelated
// + " foreground_count: 0, "
// + " foreground_size: 0, "
// + " background_count: 3, "
@@ -852,7 +852,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
+ " background_popularity: 0.5, "
+ " } }, "
+ " { val:'NY', count: 1, "
- + " skg : { relatedness: 0.0, " // perfectly average and uncorrolated
+ + " skg : { relatedness: 0.0, " // perfectly average and uncorrelated
// + " foreground_count: 0, "
// + " foreground_size: 0, "
// + " background_count: 2, "
@@ -1014,14 +1014,14 @@ public class TestJsonFacets extends SolrTestCaseHS {
"prelim_sort:'count desc', sort:'y desc'",
"prelim_sort:'count desc', sort:'z desc'",
"prelim_sort:'count desc', sort:'skg desc'")) {
- // the relatedness score of each of our cat_s values is (conviniently) also alphabetical
+ // the relatedness score of each of our cat_s values is (conveniently) also alphabetical
// order, (and the same order as 'sum(num_i) desc' & 'min(num_i) desc')
//
// So all of these re/sort options should produce identical output
// - Testing "index" sort allows the randomized use of "stream" processor as default to be
// tested.
// - Testing (re)sorts on other stats sanity checks code paths where relatedness() is a
- // "defered" Agg
+ // "deferred" Agg
for (String sweep : Arrays.asList("true", "false")) {
// results should be the same even if we disable sweeping...
@@ -1055,7 +1055,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
+ " background_popularity: 0.33333, },"
+ " }, "
+ " { val:'B', count:3, y:-3.0, z:-5, "
- + " skg : { relatedness: 0.0, " // perfectly average and uncorrolated
+ + " skg : { relatedness: 0.0, " // perfectly average and uncorrelated
+ " foreground_popularity: 0.16667,"
+ " background_popularity: 0.5 },"
+ " } ] } } ");
@@ -2046,9 +2046,8 @@ public class TestJsonFacets extends SolrTestCaseHS {
+ ", f2:{ 'buckets':[{ val:'B', count:3, n1:-3.0}, { val:'A', count:2, n1:6.0 }]} }");
// test trivial re-sorting by stats
- // (there are other more indepth tests of this in doTestPrelimSorting, but this let's us sanity
- // check
- // small responses with multiple templatized params of diff real types)
+ // (there are other more in depth tests of this in doTestPrelimSorting, but this lets us check
+ // small responses with multiple templated params of diff real types)
client.testJQ(
params(
p,
@@ -3743,7 +3742,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
*/
public void doTestPrelimSortingDistrib(final boolean extraAgg, final boolean extraSubFacet)
throws Exception {
- // we only use 2 shards, but we also want to to sanity check code paths if one (additional)
+ // we only use 2 shards, but we also want to check code paths if one (additional)
// shard is empty
final int totalShards = random().nextBoolean() ? 2 : 3;
@@ -3787,8 +3786,8 @@ public class TestJsonFacets extends SolrTestCaseHS {
// carefully craft two balanced shards (assuming we have at least two) and leave any other
// shards empty to help check the code paths of some shards returning no buckets.
//
- // if we are in a single node sitaution, these clients will be the same, and we'll have the same
- // total docs in our collection, but the numShardsWithData will be diff
+ // if we are in a single node situation, these clients will be the same, and we'll have the same
+ // total docs in our collection, but the numShardsWithData will be different
// (which will affect some assertions)
final SolrClient shardA = clients.get(0);
final SolrClient shardB = clients.get(clients.size() - 1);
@@ -4079,7 +4078,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
// the only difference from a white box perspective, is when/if we are
// optimized to use the sort SlotAcc during collection instead of the prelim_sort
- // SlotAcc..
+ // SlotAcc...
// (ie: sub facet preventing single pass (re)sort in single node mode)
if (((0 < limit || extraSubFacet) && snippet.contains("prelim_sort"))
&& !(indexSortDebugAggFudge && snippet.contains("index asc"))) {
@@ -4103,7 +4102,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
// complex, typically better to just ignore the prelim_sort, but we're testing it for
// completeness (and because you *might* want to prelim_sort by some function, for the purpose
// of "sampling" the top results and then (re)sorting by count/index)
- for (String numSort : Arrays.asList("count", "x")) { // equivilent ordering
+ for (String numSort : Arrays.asList("count", "x")) { // equivalent ordering
client.testJQ(
params(
"q",
@@ -4191,7 +4190,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
+ "}");
// since these behave differently, defer DebugAgg counter checks until all are done...
}
- // These 3 permutations defer the compuation of x as docsets,
+ // These 3 permutations defer the computation of x as docsets,
// so it's 3 x (10 buckets on each shard) (but 0 direct docs)
// prelim_sort:count, sort:index
// prelim_sort:index, sort:x
@@ -4204,7 +4203,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
// prelim_sort:x, sort:index
// ...but the (2) prelim_sort:index streaming situations above will also cause all the docs in
// the first
- // 10+1 buckets to be collected (enum checks limit+1 to know if there are "more"...
+ // 10+1 buckets to be collected (enum checks limit+1) to know if there are "more"...
assertEqualsAndReset(
420
+ (indexSortDebugAggFudge
@@ -4247,19 +4246,19 @@ public class TestJsonFacets extends SolrTestCaseHS {
+ " },"
+ "}");
// the prelim_sort should prevent 'sum(bar_i)' from being computed for every doc
- // only the choosen buckets should be collected (as a set) once per node...
+ // only the chosen buckets should be collected (as a set) once per node...
assertEqualsAndReset(0, DebugAgg.Acc.collectDocs);
// 5 bucket, on each shard
assertEqualsAndReset(numShardsWithData * 5, DebugAgg.Acc.collectDocSets);
- { // sanity check how defered stats are handled
+ { // check how deferred stats are handled
// here we'll prelim_sort & sort on things that are both "not x" and using the debug()
- // counters (wrapping x) to assert that 'x' is correctly defered and only collected for the
+ // counters (wrapping x) to assert that 'x' is correctly deferred and only collected for the
// final top buckets
final List<String> sorts = new ArrayList<String>(Arrays.asList("index asc", "count asc"));
if (extraAgg) {
- sorts.add("y asc"); // same for every bucket, but index order tie breaker should kick in
+ sorts.add("y asc"); // same for every bucket, but index order tiebreaker should kick in
}
for (String s : sorts) {
client.testJQ(
@@ -4294,7 +4293,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
+ "x:40.0},"
+ "] } }");
// Neither prelim_sort nor sort should need 'sum(bar_i)' to be computed for every doc
- // only the choosen buckets should be collected (as a set) once per node...
+ // only the chosen buckets should be collected (as a set) once per node...
assertEqualsAndReset(0, DebugAgg.Acc.collectDocs);
// 5 bucket, on each shard
assertEqualsAndReset(numShardsWithData * 5, DebugAgg.Acc.collectDocSets);
@@ -5076,12 +5075,12 @@ public class TestJsonFacets extends SolrTestCaseHS {
hll.addRaw(987654321);
}
- /** atomicly resets the acctual AtomicLong value matches the expected and resets it to 0 */
+ /** atomically resets the actual AtomicLong value matches the expected and resets it to 0 */
private static final void assertEqualsAndReset(String msg, long expected, AtomicLong actual) {
final long current = actual.getAndSet(0);
assertEquals(msg, expected, current);
}
- /** atomicly resets the acctual AtomicLong value matches the expected and resets it to 0 */
+ /** atomically resets the actual AtomicLong value matches the expected and resets it to 0 */
private static final void assertEqualsAndReset(long expected, AtomicLong actual) {
final long current = actual.getAndSet(0);
assertEquals(expected, current);
diff --git a/solr/core/src/test/org/apache/solr/search/facet/TestJsonRangeFacets.java b/solr/core/src/test/org/apache/solr/search/facet/TestJsonRangeFacets.java
index 31e7726ff87..2c70de0c25e 100644
--- a/solr/core/src/test/org/apache/solr/search/facet/TestJsonRangeFacets.java
+++ b/solr/core/src/test/org/apache/solr/search/facet/TestJsonRangeFacets.java
@@ -205,7 +205,7 @@ public class TestJsonRangeFacets extends SolrTestCaseHS {
+ nohardend
+ " other:all, facet:{ x:{ type:terms, field:cat_s, limit:1, refine:true } } } }";
- // the behavior should be the same, regardless of wether we pass actual_end to the shards
+ // the behavior should be the same, regardless of whether we pass actual_end to the shards
// because in a "mixed mode" rolling update, the shards should be smart enough to re-compute
// if the merging node is running an older version that doesn't send it
for (String actual_end : Arrays.asList(", _actual_end:'9'", "")) {
diff --git a/solr/core/src/test/org/apache/solr/search/function/SortByFunctionTest.java b/solr/core/src/test/org/apache/solr/search/function/SortByFunctionTest.java
index c65f03cb2ea..85d5ea02e8c 100644
--- a/solr/core/src/test/org/apache/solr/search/function/SortByFunctionTest.java
+++ b/solr/core/src/test/org/apache/solr/search/function/SortByFunctionTest.java
@@ -187,7 +187,7 @@ public class SortByFunctionTest extends SolrTestCaseJ4 {
/**
* Sort by function normally compares the double value, but if a function is specified that
* identifies a single field, we should use the underlying field's SortField to save of a lot of
- * type converstion (and RAM), and keep the sort precision as high as possible
+ * type conversion (and RAM), and keep the sort precision as high as possible
*
* @see #getFieldFunctionClausesToTest
*/
@@ -200,9 +200,9 @@ public class SortByFunctionTest extends SolrTestCaseJ4 {
final long Y = Z - 1L;
final long X = Y - 1L;
- // test is predicated on the idea that if long -> double converstion is happening under the hood
+ // test is predicated on the idea that if long -> double conversion is happening under the hood
// then we lose precision in sorting; so lets sanity check that our JVM isn't doing something
- // wacky in converstion that violates the principle of the test
+ // wacky in conversion that violates the principle of the test
assertEquals(
"WTF? small longs cast to double aren't equivalent?", (double) A, (double) B, 0.0D);
diff --git a/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java b/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java
index 22f4de8dbe2..c16ba0d4731 100644
--- a/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java
+++ b/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java
@@ -220,7 +220,7 @@ public class TestFunctionQuery extends SolrTestCaseJ4 {
createIndex(null, ids);
- // Unsorted field, largest first
+ // Unsorted field, the largest first
makeExternalFile(field, "54321=543210\n0=-999\n25=250");
// test identity (straight field value)
singleTest(field, "\0", 54321, 543210, 0, 0, 25, 250, 100, 1);
@@ -942,7 +942,7 @@ public class TestFunctionQuery extends SolrTestCaseJ4 {
"//float[@name='score']='0.875'");
// strdist on a missing valuesource should itself by missing, so the ValueSourceAugmenter
- // should supress it...
+ // should suppress it...
assertQ(
req(
"q", "id:1",
@@ -1037,7 +1037,7 @@ public class TestFunctionQuery extends SolrTestCaseJ4 {
createIndex(null, ids);
- // Unsorted field, largest first
+ // Unsorted field, the largest first
makeExternalFile(field, "54321=543210\n0=-999\n25=250");
// test identity (straight field value)
singleTest(fieldAsFunc, "\0", 54321, 543210, 0, 0, 25, 250, 100, 1);
diff --git a/solr/core/src/test/org/apache/solr/search/function/TestMinMaxOnMultiValuedField.java b/solr/core/src/test/org/apache/solr/search/function/TestMinMaxOnMultiValuedField.java
index 31434bf907f..7aaf7e9d57a 100644
--- a/solr/core/src/test/org/apache/solr/search/function/TestMinMaxOnMultiValuedField.java
+++ b/solr/core/src/test/org/apache/solr/search/function/TestMinMaxOnMultiValuedField.java
@@ -36,8 +36,8 @@ import org.junit.Before;
import org.junit.BeforeClass;
/**
- * Tests the behavior of <code>field(foo,min|max)</code> on numerious types of multivalued 'foo'
- * fields, as well as the beahvior of sorting on <code>foo asc|desc</code> to implicitly choose the
+ * Tests the behavior of <code>field(foo,min|max)</code> on numerous types of multivalued 'foo'
+ * fields, as well as the behavior of sorting on <code>foo asc|desc</code> to implicitly choose the
* min|max.
*/
@SuppressCodecs({"SimpleText"}) // see TestSortedSetSelector
@@ -102,7 +102,7 @@ public class TestMinMaxOnMultiValuedField extends SolrTestCaseJ4 {
if (f.contains("miss")) {
// if name contains "miss" assert that the missing first/last props match
// but don't make any asserts about fields w/o that in name
- // (schema11.xml's strings has some preexisting silliness that don't affect us)
+ // (schema11.xml's strings have some preexisting silliness that don't affect us)
assertEquals(
f + " sortMissingFirst is wrong", f.contains("missf"), sf.sortMissingFirst());
assertEquals(f + " sortMissingLast is wrong", f.contains("missl"), sf.sortMissingLast());
@@ -713,9 +713,9 @@ public class TestMinMaxOnMultiValuedField extends SolrTestCaseJ4 {
* Tests sort order of min/max realtive to other docs w/o any values.
*
* @param fieldname The field to test
- * @param negative a "negative" value for this field (ie: in a function context, is less then the
+ * @param negative a "negative" value for this field (ie: in a function context, is less than the
* "0")
- * @param positive a "positive" value for this field (ie: in a function context, is more then the
+ * @param positive a "positive" value for this field (ie: in a function context, is more than the
* "0")
*/
protected void testSimpleSort(
@@ -1069,7 +1069,7 @@ public class TestMinMaxOnMultiValuedField extends SolrTestCaseJ4 {
* <li>If a document has a value in the field, then some random number of values that come
* <em>after</em> that value in the original list may also be included in the specified
* field.
- * <li>Every document in the result will have a randomly asssigned 'id', unique realitive to all
+ * <li>Every document in the result will have a randomly assigned 'id', unique relative to all
* other documents in the result.
* </ul>
*/
diff --git a/solr/core/src/test/org/apache/solr/search/function/TestOrdValues.java b/solr/core/src/test/org/apache/solr/search/function/TestOrdValues.java
index d522ad64234..16322184b97 100644
--- a/solr/core/src/test/org/apache/solr/search/function/TestOrdValues.java
+++ b/solr/core/src/test/org/apache/solr/search/function/TestOrdValues.java
@@ -171,7 +171,7 @@ public class TestOrdValues extends SolrTestCase {
}
/**
- * Actual score computation order is slightly different than assumptios this allows for a small
+ * Actual score computation order is slightly different from assumed, this allows for a small
* amount of variation
*/
protected static float TEST_SCORE_TOLERANCE_DELTA = 0.001f;
@@ -204,7 +204,7 @@ public class TestOrdValues extends SolrTestCase {
};
protected static Directory dir;
- protected static Analyzer anlzr;
+ protected static Analyzer analyzer;
@AfterClass
public static void afterClassFunctionTestSetup() throws Exception {
@@ -212,7 +212,7 @@ public class TestOrdValues extends SolrTestCase {
dir.close();
}
dir = null;
- anlzr = null;
+ analyzer = null;
}
protected static void createIndex(boolean doMultiSegment) throws Exception {
@@ -221,8 +221,8 @@ public class TestOrdValues extends SolrTestCase {
}
// prepare a small index with just a few documents.
dir = newDirectory();
- anlzr = new MockAnalyzer(random());
- IndexWriterConfig iwc = newIndexWriterConfig(anlzr).setMergePolicy(newLogMergePolicy());
+ analyzer = new MockAnalyzer(random());
+ IndexWriterConfig iwc = newIndexWriterConfig(analyzer).setMergePolicy(newLogMergePolicy());
if (doMultiSegment) {
iwc.setMaxBufferedDocs(TestUtil.nextInt(random(), 2, 7));
}
diff --git a/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java b/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java
index ec0d54d435c..54ba67fc3e4 100644
--- a/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java
+++ b/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java
@@ -640,7 +640,7 @@ public class BJQParserTest extends SolrTestCaseJ4 {
assertU(commit());
assertQ(
- "here we rely on autowarming for cathing cache leak", // cache=false
+ "here we rely on autowarming for catching cache leak", // cache=false
req(elFilterQuery),
"//*[@numFound='2']");
diff --git a/solr/core/src/test/org/apache/solr/search/join/CrossCollectionJoinQueryTest.java b/solr/core/src/test/org/apache/solr/search/join/CrossCollectionJoinQueryTest.java
index 07464a67227..1ede697205b 100644
--- a/solr/core/src/test/org/apache/solr/search/join/CrossCollectionJoinQueryTest.java
+++ b/solr/core/src/test/org/apache/solr/search/join/CrossCollectionJoinQueryTest.java
@@ -101,7 +101,7 @@ public class CrossCollectionJoinQueryTest extends SolrCloudTestCase {
}
}
- // some extra docs in each collection (not counded in NUM_PRODUCTS) that should drop out of the
+ // some extra docs in each collection (not counted in NUM_PRODUCTS) that should drop out of the
// joins because they don't have the join key
productDocs.add(
new SolrInputDocument(
@@ -282,7 +282,7 @@ public class CrossCollectionJoinQueryTest extends SolrCloudTestCase {
"{!join method=crossCollection solrUrl=\"%s\" fromIndex=products from=product_id_i to=product_id_i}size_s:M",
"http://bogus.example.com:8983/solr"),
true);
- fail("The query invovling bogus.example.com should not succeed");
+ fail("The query involving bogus.example.com should not succeed");
} catch (Exception e) {
// should get here.
String message = e.getMessage();
diff --git a/solr/core/src/test/org/apache/solr/search/join/TestCloudNestedDocsSort.java b/solr/core/src/test/org/apache/solr/search/join/TestCloudNestedDocsSort.java
index aaae5cdc517..5f5a03362c4 100644
--- a/solr/core/src/test/org/apache/solr/search/join/TestCloudNestedDocsSort.java
+++ b/solr/core/src/test/org/apache/solr/search/join/TestCloudNestedDocsSort.java
@@ -177,11 +177,11 @@ public class TestCloudNestedDocsSort extends SolrCloudTestCase {
fl)
: new SolrQuery( // same bjq as a subordinate clause
"q",
- "+type_s:parent " + parentFilter + " +{!v=$parentcaluse}",
- "parentcaluse",
+ "+type_s:parent " + parentFilter + " +{!v=$parentclause}",
+ "parentclause",
"{!parent which=type_s:parent v='" + (childFilter).replace("+", "") + "'}",
"sort",
- sortClause.replace("val_s1", "childfield(val_s1,$parentcaluse)"),
+ sortClause.replace("val_s1", "childfield(val_s1,$parentclause)"),
"rows",
"" + maxDocs,
"fl",
diff --git a/solr/core/src/test/org/apache/solr/search/join/TestNestedDocsSort.java b/solr/core/src/test/org/apache/solr/search/join/TestNestedDocsSort.java
index 448f8943bad..0ba318c8449 100644
--- a/solr/core/src/test/org/apache/solr/search/join/TestNestedDocsSort.java
+++ b/solr/core/src/test/org/apache/solr/search/join/TestNestedDocsSort.java
@@ -86,7 +86,7 @@ public class TestNestedDocsSort extends SolrTestCaseJ4 {
}
@Test
- public void testOmitSpaceinFrontOfOrd() {
+ public void testOmitSpaceInFrontOfOrd() {
parseAssertEq("childfield(name_s1,$q)asc", "childfield(name_s1,$q) asc");
}
@@ -124,7 +124,7 @@ public class TestNestedDocsSort extends SolrTestCaseJ4 {
}
}
- public void testCachehits() {
+ public void testCacheHits() {
final SolrQueryRequest req = req();
try {
@SuppressWarnings({"rawtypes"})
diff --git a/solr/core/src/test/org/apache/solr/search/join/TestScoreJoinQPNoScore.java b/solr/core/src/test/org/apache/solr/search/join/TestScoreJoinQPNoScore.java
index 7bfce58210e..420cd5d3b0b 100644
--- a/solr/core/src/test/org/apache/solr/search/join/TestScoreJoinQPNoScore.java
+++ b/solr/core/src/test/org/apache/solr/search/join/TestScoreJoinQPNoScore.java
@@ -174,7 +174,7 @@ public class TestScoreJoinQPNoScore extends SolrTestCaseJ4 {
davesDepartments);
// find people that develop stuff - but limit via filter query to a name of "john"
- // this tests filters being pushed down to queries (SOLR-3062)
+ // this tests filters being pushed down to the queries (SOLR-3062)
assertJQ(
req(
"q",
diff --git a/solr/core/src/test/org/apache/solr/search/join/TestScoreJoinQPScore.java b/solr/core/src/test/org/apache/solr/search/join/TestScoreJoinQPScore.java
index 9ef3b75635a..fea1a151158 100644
--- a/solr/core/src/test/org/apache/solr/search/join/TestScoreJoinQPScore.java
+++ b/solr/core/src/test/org/apache/solr/search/join/TestScoreJoinQPScore.java
@@ -119,7 +119,7 @@ public class TestScoreJoinQPScore extends SolrTestCaseJ4 {
}
public void testDeleteByScoreJoinQuery() throws Exception {
- indexDataForScorring();
+ indexDataForScoring();
String joinQuery = "{!join from=" + toField + " to=" + idField + " score=Max}title:random";
assertJQ(
req("q", joinQuery, "fl", "id"),
@@ -132,7 +132,7 @@ public class TestScoreJoinQPScore extends SolrTestCaseJ4 {
}
public void testSimpleWithScoring() throws Exception {
- indexDataForScorring();
+ indexDataForScoring();
// Search for movie via subtitle
assertJQ(
@@ -210,7 +210,7 @@ public class TestScoreJoinQPScore extends SolrTestCaseJ4 {
@Ignore("SOLR-7814, also don't forget cover boost at testCacheHit()")
public void testBoost() throws Exception {
- indexDataForScorring();
+ indexDataForScoring();
ScoreMode score = ScoreMode.values()[random().nextInt(ScoreMode.values().length)];
final SolrQueryRequest req =
@@ -234,7 +234,7 @@ public class TestScoreJoinQPScore extends SolrTestCaseJ4 {
}
public void testCacheHit() throws Exception {
- indexDataForScorring();
+ indexDataForScoring();
Map<String, Metric> metrics =
h.getCoreContainer()
@@ -346,8 +346,8 @@ public class TestScoreJoinQPScore extends SolrTestCaseJ4 {
"true"),
SolrException.ErrorCode.BAD_REQUEST);
}
- // this queries are not overlap, with other in this test case.
- // however it might be better to extract this method into the separate suite
+ // these queries are not overlapping with others in this test case.
+ // however, it might be better to extract this method into a separate suite
// for a while let's nuke a cache content, in case of repetitions
@SuppressWarnings("rawtypes")
SolrCache cache = (SolrCache) h.getCore().getInfoRegistry().get("queryResultCache");
@@ -384,7 +384,7 @@ public class TestScoreJoinQPScore extends SolrTestCaseJ4 {
return (Long) a.get(key) - (Long) b.get(key);
}
- private void indexDataForScorring() {
+ private void indexDataForScoring() {
clearIndex();
// 0
assertU(add(doc("t_description", "A random movie", "name", "Movie 1", idField, "1")));
diff --git a/solr/core/src/test/org/apache/solr/search/similarities/TestPerFieldSimilarity.java b/solr/core/src/test/org/apache/solr/search/similarities/TestPerFieldSimilarity.java
index 4b0a5a9412e..58ca85121ca 100644
--- a/solr/core/src/test/org/apache/solr/search/similarities/TestPerFieldSimilarity.java
+++ b/solr/core/src/test/org/apache/solr/search/similarities/TestPerFieldSimilarity.java
@@ -57,7 +57,6 @@ public class TestPerFieldSimilarity extends BaseSimilarityTestCase {
public void testDefaults() throws Exception {
Similarity sim = getSimilarity("sim3text");
assertEquals(BM25Similarity.class, sim.getClass());
- ;
}
/** ... and for a dynamic field */
diff --git a/solr/core/src/test/org/apache/solr/search/similarities/TestSweetSpotSimilarityFactory.java b/solr/core/src/test/org/apache/solr/search/similarities/TestSweetSpotSimilarityFactory.java
index 81228d1d369..d930cf37127 100644
--- a/solr/core/src/test/org/apache/solr/search/similarities/TestSweetSpotSimilarityFactory.java
+++ b/solr/core/src/test/org/apache/solr/search/similarities/TestSweetSpotSimilarityFactory.java
@@ -97,7 +97,7 @@ public class TestSweetSpotSimilarityFactory extends BaseSimilarityTestCase {
for (int i = 1; i <= 6; i++) {
assertEquals("tf i=" + i, 1.5F, sim.tf(i), 0.0F);
}
- // less then default sim above 6
+ // less than default sim above 6
for (int i = 6; i <= 1000; i++) {
assertTrue("tf: i=" + i + " : s=" + sim.tf(i) + " < d=" + d.tf(i), sim.tf(i) < d.tf(i));
}
diff --git a/solr/core/src/test/org/apache/solr/security/AllowListUrlCheckerTest.java b/solr/core/src/test/org/apache/solr/security/AllowListUrlCheckerTest.java
index 15d9284a59f..f129be79179 100644
--- a/solr/core/src/test/org/apache/solr/security/AllowListUrlCheckerTest.java
+++ b/solr/core/src/test/org/apache/solr/security/AllowListUrlCheckerTest.java
@@ -134,7 +134,7 @@ public class AllowListUrlCheckerTest extends SolrTestCaseJ4 {
@Test
public void testCoreSpecific() throws Exception {
- // Cores are removed completely so it doesn't really matter if they were set in config.
+ // Cores are removed completely, so it doesn't really matter if they were set in config.
AllowListUrlChecker checker =
new AllowListUrlChecker(
urls("http://abc-1.com:8983/solr/core1", "http://abc-2.com:8983/solr2/core2"));
diff --git a/solr/core/src/test/org/apache/solr/security/AuditLoggerIntegrationTest.java b/solr/core/src/test/org/apache/solr/security/AuditLoggerIntegrationTest.java
index daebf3e3d81..23133730c70 100644
--- a/solr/core/src/test/org/apache/solr/security/AuditLoggerIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/security/AuditLoggerIntegrationTest.java
@@ -130,7 +130,7 @@ public class AuditLoggerIntegrationTest extends SolrCloudAuthTestCase {
runThreeTestAdminCommands();
// Don't assume anything about the system clock,
- // Thread.sleep is not a garunteed minimum for a predictible elapsed time...
+ // Thread.sleep is not a guaranteed minimum for a predictable elapsed time...
final long start = System.nanoTime();
Thread.sleep(100);
final long end = System.nanoTime();
@@ -139,7 +139,7 @@ public class AuditLoggerIntegrationTest extends SolrCloudAuthTestCase {
assertThreeTestAdminEvents();
assertAuditMetricsMinimums(
testHarness.get().cluster, CallbackAuditLoggerPlugin.class.getSimpleName(), 3, 0);
- ArrayList<MetricRegistry> registries = getMetricsReigstries(testHarness.get().cluster);
+ ArrayList<MetricRegistry> registries = getMetricsRegistries(testHarness.get().cluster);
Timer timer =
((Timer)
registries
@@ -295,7 +295,7 @@ public class AuditLoggerIntegrationTest extends SolrCloudAuthTestCase {
req.setBasicAuthCredentials("solr", SOLR_PASS);
client.request(req);
- // collection createion leads to AuditEvent's for the core as well...
+ // collection creation leads to audit events for the core as well...
final List<AuditEvent> events = receiver.waitForAuditEvents(2);
assertAuditEvent(
events.get(0), COMPLETED, "/admin/cores", ADMIN, null, 200, "action", "CREATE");
@@ -406,7 +406,7 @@ public class AuditLoggerIntegrationTest extends SolrCloudAuthTestCase {
}
}
- private ArrayList<MetricRegistry> getMetricsReigstries(MiniSolrCloudCluster cluster) {
+ private ArrayList<MetricRegistry> getMetricsRegistries(MiniSolrCloudCluster cluster) {
ArrayList<MetricRegistry> registries = new ArrayList<>();
cluster
.getJettySolrRunners()
@@ -601,17 +601,17 @@ public class AuditLoggerIntegrationTest extends SolrCloudAuthTestCase {
public List<AuditEvent> waitForAuditEvents(final int expected) throws InterruptedException {
final LinkedList<AuditEvent> results = new LinkedList<>();
- for (int i = 1; i <= expected; i++) { // NOTE: counting from 1 for error message readabiity...
+ for (int i = 1; i <= expected; i++) { // NOTE: counting from 1 for error message readability
final AuditEvent e = queue.poll(120, TimeUnit.SECONDS);
if (null == e) {
fail(
- "did not recieved expected event #"
+ "did not receive expected event #"
+ i
+ "/"
+ expected
+ " even after waiting an excessive amount of time");
}
- log.info("Waited for and recieved event: {}", e);
+ log.info("Waited for and received event: {}", e);
results.add(e);
}
return results;
diff --git a/solr/core/src/test/org/apache/solr/security/BaseTestRuleBasedAuthorizationPlugin.java b/solr/core/src/test/org/apache/solr/security/BaseTestRuleBasedAuthorizationPlugin.java
index e12bd811822..86c76f6fc6e 100644
--- a/solr/core/src/test/org/apache/solr/security/BaseTestRuleBasedAuthorizationPlugin.java
+++ b/solr/core/src/test/org/apache/solr/security/BaseTestRuleBasedAuthorizationPlugin.java
@@ -57,7 +57,7 @@ import org.junit.Test;
/**
* Base class for testing RBAC. This will test the {@link RuleBasedAuthorizationPlugin}
- * implementation but also serves as a base class for testing other sub classes
+ * implementation but also serves as a base class for testing other subclasses
*/
@SuppressWarnings("unchecked")
@LogLevel("org.apache.solr.security=TRACE")
@@ -702,7 +702,7 @@ public class BaseTestRuleBasedAuthorizationPlugin extends SolrTestCaseJ4 {
@Test
public void testGetPermissionNamesForRoles() {
// Tests the method that maps role(s) to permissions, used by SystemInfoHandler to provide UI
- // with logged in user's permissions
+ // with logged-in user's permissions
try (RuleBasedAuthorizationPluginBase plugin = createPlugin()) {
plugin.init(rules);
assertEquals(
@@ -715,7 +715,7 @@ public class BaseTestRuleBasedAuthorizationPlugin extends SolrTestCaseJ4 {
Set.of("schema-edit", "collection-admin-edit", "mycoll_update", "read"),
plugin.getPermissionNamesForRoles(Set.of("admin", "dev")));
} catch (IOException e) {
- ; // swallow error, otherwise a you have to add a _lot_ of exceptions to methods.
+ ; // swallow error, otherwise you have to add a _lot_ of exceptions to methods.
}
}
@@ -784,7 +784,7 @@ public class BaseTestRuleBasedAuthorizationPlugin extends SolrTestCaseJ4 {
assertTrue(captureErrors(perms.parsedCommands).isEmpty());
permList = (List<Map<String, Object>>) perms.getVal("permissions");
assertEquals(1, permList.size());
- // indexes should have been re-ordered after the delete, so now "read" has index==1
+ // indexes should have been re-ordered after the delete operation, so now "read" has index==1
assertEquals("read", perms.getVal("permissions[0]/name"));
assertEquals(1, perms.getVal("permissions[0]/index"));
// delete last remaining
@@ -827,7 +827,7 @@ public class BaseTestRuleBasedAuthorizationPlugin extends SolrTestCaseJ4 {
AuthorizationResponse authResp = plugin.authorize(context);
assertEquals(expected, authResp.statusCode);
} catch (IOException e) {
- ; // swallow error, otherwise a you have to add a _lot_ of exceptions to methods.
+ ; // swallow error, otherwise you have to add a _lot_ of exceptions to methods.
}
}
diff --git a/solr/core/src/test/org/apache/solr/security/PrincipalWithUserRoles.java b/solr/core/src/test/org/apache/solr/security/PrincipalWithUserRoles.java
index c75b614b48c..f5dc13179d2 100644
--- a/solr/core/src/test/org/apache/solr/security/PrincipalWithUserRoles.java
+++ b/solr/core/src/test/org/apache/solr/security/PrincipalWithUserRoles.java
@@ -33,9 +33,9 @@ public class PrincipalWithUserRoles implements Principal, VerifiedUserRoles {
private final Set<String> roles;
/**
- * User principal with user name as well as one or more roles that he/she belong to
+ * User principal with username as well as one or more roles that he/she belong to
*
- * @param username string with user name for user
+ * @param username string with username for user
* @param roles a set of roles that we know this user belongs to, or empty list for no roles
*/
public PrincipalWithUserRoles(final String username, Set<String> roles) {
diff --git a/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTest.java b/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTest.java
index fc8bfd77b92..070437f9787 100644
--- a/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTest.java
+++ b/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTest.java
@@ -181,7 +181,7 @@ public class CacheHeaderTest extends CacheHeaderTestBase {
String etag = head.getValue();
// If-None-Match tests
- // we set a non matching ETag
+ // we set a non-matching ETag
get = getSelectMethod(method);
get.addHeader("If-None-Match", "\"xyz123456\"");
response = getClient().execute(get);
@@ -213,7 +213,7 @@ public class CacheHeaderTest extends CacheHeaderTestBase {
response.getStatusLine().getStatusCode());
// If-Match tests
- // we set a non matching ETag
+ // we set a non-matching ETag
get = getSelectMethod(method);
get.addHeader("If-Match", "\"xyz123456\"");
response = getClient().execute(get);
diff --git a/solr/core/src/test/org/apache/solr/servlet/DirectSolrConnectionTest.java b/solr/core/src/test/org/apache/solr/servlet/DirectSolrConnectionTest.java
index 6228c9fa9f2..bc097280459 100644
--- a/solr/core/src/test/org/apache/solr/servlet/DirectSolrConnectionTest.java
+++ b/solr/core/src/test/org/apache/solr/servlet/DirectSolrConnectionTest.java
@@ -45,7 +45,7 @@ public class DirectSolrConnectionTest extends SolrTestCaseJ4 {
assertTrue(got.indexOf("<str name=\"echoParams\">explicit</str>") > 5);
// It should throw an exception for unknown handler
- expectThrows(Exception.class, () -> direct.request("/path to nonexistang thingy!!", null));
+ expectThrows(Exception.class, () -> direct.request("/path to nonexistent thingy!!", null));
}
// Check that a request gets back the echoParams call
diff --git a/solr/core/src/test/org/apache/solr/servlet/NoCacheHeaderTest.java b/solr/core/src/test/org/apache/solr/servlet/NoCacheHeaderTest.java
index c7b05783f4e..78bc6f05bca 100644
--- a/solr/core/src/test/org/apache/solr/servlet/NoCacheHeaderTest.java
+++ b/solr/core/src/test/org/apache/solr/servlet/NoCacheHeaderTest.java
@@ -133,7 +133,7 @@ public class NoCacheHeaderTest extends CacheHeaderTestBase {
assertNull("We got an ETag in the response", head);
// If-None-Match tests
- // we set a non matching ETag
+ // we set a non-matching ETag
get = getSelectMethod(method);
get.addHeader("If-None-Match", "\"xyz123456\"");
response = getClient().execute(get);
@@ -154,7 +154,7 @@ public class NoCacheHeaderTest extends CacheHeaderTestBase {
response.getStatusLine().getStatusCode());
// If-Match tests
- // we set a non matching ETag
+ // we set a non-matching ETag
get = getSelectMethod(method);
get.addHeader("If-Match", "\"xyz123456\"");
response = getClient().execute(get);
diff --git a/solr/core/src/test/org/apache/solr/servlet/SecurityHeadersTest.java b/solr/core/src/test/org/apache/solr/servlet/SecurityHeadersTest.java
index 92979cefdb6..41bb14fad58 100644
--- a/solr/core/src/test/org/apache/solr/servlet/SecurityHeadersTest.java
+++ b/solr/core/src/test/org/apache/solr/servlet/SecurityHeadersTest.java
@@ -33,7 +33,7 @@ import org.junit.Test;
/**
* Confirm that the expected security headers are returned when making requests to solr, regardless
- * of wether the request is interanlly forwared to another node.
+ * of whether the request is internally forwarded to another node.
*/
@org.apache.lucene.tests.util.LuceneTestCase.AwaitsFix(
bugUrl = "https://issues.apache.org/jira/browse/SOLR-14903")
diff --git a/solr/core/src/test/org/apache/solr/servlet/SolrRequestParserTest.java b/solr/core/src/test/org/apache/solr/servlet/SolrRequestParserTest.java
index 690920f4d83..4727f23075b 100644
--- a/solr/core/src/test/org/apache/solr/servlet/SolrRequestParserTest.java
+++ b/solr/core/src/test/org/apache/solr/servlet/SolrRequestParserTest.java
@@ -112,7 +112,7 @@ public class SolrRequestParserTest extends SolrTestCaseJ4 {
assertEquals(input.toString(), output.toString());
req.close();
- // set the contentType and make sure tat gets set
+ // set the contentType and make sure that it gets set
String ctype = "text/xxx";
streams = new ArrayList<>();
args.put(CommonParams.STREAM_CONTENTTYPE, new String[] {ctype});
@@ -512,7 +512,7 @@ public class SolrRequestParserTest extends SolrTestCaseJ4 {
when(request.getContentLength()).thenReturn(contentLength);
... 1646 lines suppressed ...