-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Elasticsearch integration tests #1563
Merged
nr-ahemsath
merged 12 commits into
feature/elasticsearch-instrumentation
from
nr-ahemsath/expand-elasticsearch-integration-tests
Apr 20, 2023
Merged
Improve Elasticsearch integration tests #1563
nr-ahemsath
merged 12 commits into
feature/elasticsearch-instrumentation
from
nr-ahemsath/expand-elasticsearch-integration-tests
Apr 20, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…/expand-elasticsearch-integration-tests
Also remove comments from wrapper Also reorder methods in sync tests
…/expand-elasticsearch-integration-tests
Codecov Report
@@ Coverage Diff @@
## feature/elasticsearch-instrumentation #1563 +/- ##
========================================================================
Coverage ? 72.99%
========================================================================
Files ? 408
Lines ? 25604
Branches ? 0
========================================================================
Hits ? 18690
Misses ? 6914
Partials ? 0 |
chynesNR
approved these changes
Apr 19, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
nrcventura
reviewed
Apr 19, 2023
tests/Agent/IntegrationTests/UnboundedIntegrationTests/Elasticsearch/ElasticsearchTests.cs
Show resolved
Hide resolved
nrcventura
approved these changes
Apr 19, 2023
tippmar-nr
reviewed
Apr 19, 2023
...MultiFunctionApplicationHelpers/NetStandardLibraries/Elasticsearch/ElasticsearchExerciser.cs
Show resolved
Hide resolved
nr-ahemsath
added a commit
that referenced
this pull request
Apr 26, 2023
* Port initial poc * Added elastic search and kibana to unbounded services (#1505) * Enabled authentication for ElasticSearch and Kibana (#1507) * Updated docker-compose to enable authentication for ElasticSearch and Kibana. * Added a configuration helper for use in integration tests for ElasticSearch. * Support Elastic.Clients.Elasticsearch (8.x) client (#1512) * Add new instrumentation files to build artifacts (#1529) * test: Elasticsearch integration tests framework (#1532) * Instrument async Elasticsearch methods (#1535) * Working async instrumentation * Get NEST async working, fix integration test * Set URI after datastore segment creation (#1538) * Initial plumbing, seems to work * Update integration tests * Remove stray using * Clean up comments * Build bug and review feedback * Handle https and improve async reliability Handle https as well as http in Elastic server url Fix async timing problem with a delay (ugh) * Incremental Elasticsearch integration test work (#1543) * Report Elasticsearch.net operations more accurately (#1559) * Improve Elasticsearch integration tests (#1563) * Fix solution build problem * Add search validation to async tests Also remove comments from wrapper Also reorder methods in sync tests * Initial coding of bulk insert and multisearch in exercisers * Added sync tests for indexmany and multisearch. Not passing. * Fix assertions * Add async operations to sync tests class * Combine sync and async test files * Get elastic.clients case to work * Elasticsearch.Net tests passing * Test range of versions but only test oldest and newest frameworks * Add client call success validation to Elasticsearch integration tests (#1566) * Bubble up the async await * Add API operation validation All tests passing locally * Elasticsearch error reporting (#1568) * Adding support for Elasticsearch error reporting * Safer way to set errors * Fixed unreliable integration tests; fixed potential path parsing crash * Missed replacing a call to InternalApi --------- Co-authored-by: Marty Tippin <120425148+tippmar-nr@users.noreply.github.com> Co-authored-by: Chris Hynes <111462425+chynesNR@users.noreply.github.com> Co-authored-by: chynesNR <chynes@newrelic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Improves Elasticsearch integration tests by:
IndexMany
,IndexManyAsync
,MultiSearch
,MultiSearchAsync
ValidateOperation
method that takes the operation name as an argument, and performs assertions accordingly. This replaces multiple nearly identical validation methodsThe exerciser code still isn't validating that its operations are actually succeeding. I started down this path for a bit and ran into a number of issues, so I want to get what I've done PR'ed before continuing with that work.
Note: for the
Elastic.Clients.Elasticsearch
(8.x) case, the code for MultiSearch(Async) isn't actually working. I was unable to find documentation on how to use this API in 8.x, nor could I find any examples online, and translating working 7.x examples to 8.x did not work. The empty invocation of the API is still enough to trigger the instrumentation wrapper, and the test assertions succeed accordingly.Author Checklist
Reviewer Checklist