Skip to content

Fixing HistoryStoreTests.testPut() and testStoreWithHideSecrets()#111246

Merged
masseyke merged 2 commits intoelastic:mainfrom
masseyke:fix/HistoryStoreTests-testPut
Jul 24, 2024
Merged

Fixing HistoryStoreTests.testPut() and testStoreWithHideSecrets()#111246
masseyke merged 2 commits intoelastic:mainfrom
masseyke:fix/HistoryStoreTests-testPut

Conversation

@masseyke
Copy link
Copy Markdown
Member

@masseyke masseyke commented Jul 24, 2024

HistoryStoreTests.testPut() and testStoreWithHideSecrets() were throwing exceptions, but the tests were passing anyway. This change fixes the tests to not throw exceptions, and fails the tests if they do.

@masseyke masseyke added >test Issues or PRs that are addressing/adding tests :Distributed/Watcher v8.16.0 labels Jul 24, 2024
@elasticsearchmachine elasticsearchmachine added the Team:Data Management (obsolete) DO NOT USE. This team no longer exists. label Jul 24, 2024
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@masseyke masseyke changed the title Fixing HistoryStoreTests.testPut() Fixing HistoryStoreTests.testPut() and testStoreWithHideSecrets() Jul 24, 2024
BulkRequest request = (BulkRequest) invocation.getArguments()[0];
@SuppressWarnings("unchecked")
ActionListener<BulkResponse> listener = (ActionListener<BulkResponse>) invocation.getArguments()[2];
ActionListener<BulkResponse> listener = (ActionListener<BulkResponse>) invocation.getArguments()[1];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Was it throwing an exception due to indexing into invocation.getArguments() at the wrong indices?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yep.

Copy link
Copy Markdown
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

LGTM

@masseyke masseyke merged commit 2abd27c into elastic:main Jul 24, 2024
@masseyke masseyke deleted the fix/HistoryStoreTests-testPut branch July 24, 2024 17:43
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

:Distributed/Watcher Team:Data Management (obsolete) DO NOT USE. This team no longer exists. >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.

4 participants