Skip to content

Change visibility of createWriter to allow tests from a different package to override it#111234

Merged
ldematte merged 1 commit intoelastic:mainfrom
ldematte:internal-engine-createwriter-protected
Jul 24, 2024
Merged

Change visibility of createWriter to allow tests from a different package to override it#111234
ldematte merged 1 commit intoelastic:mainfrom
ldematte:internal-engine-createwriter-protected

Conversation

@ldematte
Copy link
Copy Markdown
Contributor

Tests that need to override IndexWriterConfig, or provide a different implementation of IndexWriter, cannot do that if they are in another package (e.g. serverless).
This PR changes the visibility of createWriter to protected so it can be overridden in tests outside the same package.

@ldematte ldematte requested a review from mosche July 24, 2024 13:00
@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label v8.16.0 labels Jul 24, 2024
@ldematte ldematte added :Core/Infra/Metrics Metrics and metering infrastructure >test Issues or PRs that are addressing/adding tests and removed needs:triage Requires assignment of a team area label v8.16.0 labels Jul 24, 2024
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Jul 24, 2024
@ldematte
Copy link
Copy Markdown
Contributor Author

@mosche we still need this for tests; not for our code, but to change the MergePolicy to a simpler one so that merges are "deterministic".

Copy link
Copy Markdown
Contributor

@mosche mosche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ldematte ldematte merged commit 0b9b2a9 into elastic:main Jul 24, 2024
@ldematte ldematte deleted the internal-engine-createwriter-protected branch July 24, 2024 14:02
weizijun added a commit to weizijun/elasticsearch that referenced this pull request Jul 25, 2024
* main: (39 commits)
  Update README.asciidoc (elastic#111244)
  ESQL: INLINESTATS (elastic#109583)
  ESQL: Document a little of `DataType` (elastic#111250)
  Relax assertions in segment level field stats (elastic#111243)
  LogsDB data generator - support nested object field (elastic#111206)
  Validate `Authorization` header in Azure test fixture (elastic#111242)
  Fixing HistoryStoreTests.testPut() and testStoreWithHideSecrets() (elastic#111246)
  [ESQL] Remove Named Expcted Types map from testing infrastructure  (elastic#111213)
  Change visibility of createWriter to allow tests from a different package to override it (elastic#111234)
  [ES|QL] Remove EsqlDataTypes (elastic#111089)
  Mute org.elasticsearch.repositories.azure.AzureBlobContainerRetriesTests testReadNonexistentBlobThrowsNoSuchFileException elastic#111233
  Abstract codec lookup by name, to make CodecService extensible (elastic#111007)
  Add HTTPS support to `AzureHttpFixture` (elastic#111228)
  Unmuting tests related to free_context action being processed in ESSingleNodeTestCase (elastic#111224)
  Upgrade Azure SDK (elastic#111225)
  Collapse transport versions for 8.14.0 (elastic#111199)
  Make sure contender uses logs templates (elastic#111183)
  unmute HistogramPercentileAggregationTests.testBoxplotHistogram (elastic#111223)
  Refactor Quality Assurance test infrastructure (elastic#111195)
  Mute org.elasticsearch.xpack.restart.FullClusterRestartIT testDisableFieldNameField {cluster=UPGRADED} elastic#111222
  ...

# Conflicts:
#	server/src/main/java/org/elasticsearch/TransportVersions.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/Metrics Metrics and metering infrastructure Team:Core/Infra Meta label for core/infra team >test Issues or PRs that are addressing/adding tests v8.16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants