Skip to content
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

Refactor scripts/es-integration-test.sh #4161

Merged
merged 3 commits into from Jan 16, 2023

Conversation

yurishkuro
Copy link
Member

@yurishkuro yurishkuro commented Jan 15, 2023

Which problem is this PR solving?

  • OpenSearch integration tests very frequently fail
  • This change adds retries, but does not fundamentally fix anything else, except for making sure that we can get the container logs in case of a future failure

Short description of the changes

  • Setup storage once before executing tests (even though token test does not require a real ES, it could be just a unit test)
  • Remove -rm from storage Docker commands so that the container is still available to do docker logs after the timeout
  • Change polling from 5s to 10s, for a total of 600sec
  • If storage is not reachable in 600sec then kill the container and retry two more times
  • Use trap to tear down storage (useful for local tests as otherwise container may remain if the tests fail)

Signed-off-by: Yuri Shkuro <github@ysh.us>
@yurishkuro yurishkuro requested a review from a team as a code owner January 15, 2023 18:47
@codecov
Copy link

codecov bot commented Jan 15, 2023

Codecov Report

Base: 97.14% // Head: 97.12% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (dc719e9) compared to base (e2d0531).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4161      +/-   ##
==========================================
- Coverage   97.14%   97.12%   -0.02%     
==========================================
  Files         296      296              
  Lines       17452    17452              
==========================================
- Hits        16953    16951       -2     
- Misses        402      403       +1     
- Partials       97       98       +1     
Flag Coverage Δ
unittests 97.12% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
plugin/storage/badger/spanstore/reader.go 95.49% <0.00%> (-0.72%) ⬇️
plugin/storage/integration/integration.go 76.33% <0.00%> (+0.38%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: Yuri Shkuro <github@ysh.us>
@yurishkuro
Copy link
Member Author

@albertteoh fancy to review this too?

@@ -88,23 +88,25 @@ func TestBearTokenPropagation(t *testing.T) {

// Run elastic search mocked server in background..
// is not a full server, just mocked the necessary stuff for this test.
srv := &http.Server{Addr: ":9200"}
srv := &http.Server{Addr: ":19200"}
Copy link
Member Author

Choose a reason for hiding this comment

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

no reason to run test server on the official ES port (the integration script also changed to run query-service against this fake service)

@yurishkuro yurishkuro merged commit bc25ce8 into jaegertracing:main Jan 16, 2023
@yurishkuro yurishkuro deleted the fix-opensearch branch January 16, 2023 00:37
shubbham1215 pushed a commit to shubbham1215/jaeger that referenced this pull request Feb 22, 2023
## Which problem is this PR solving?
- OpenSearch integration tests very frequently fail
- This change adds retries, but does not fundamentally fix anything
else, except for making sure that we can get the container logs in case
of a future failure

## Short description of the changes
- Setup storage once before executing tests (even though token test does
not require a real ES, it could be just a unit test)
- Remove `-rm` from storage Docker commands so that the container is
still available to do `docker logs` after the timeout
- Change polling from 5s to 10s, for a total of 600sec
- If storage is not reachable in 600sec then kill the container and
retry two more times
- Use trap to tear down storage (useful for local tests as otherwise
container may remain if the tests fail)

Signed-off-by: Yuri Shkuro <github@ysh.us>
shubbham1215 pushed a commit to shubbham1215/jaeger that referenced this pull request Mar 5, 2023
## Which problem is this PR solving?
- OpenSearch integration tests very frequently fail
- This change adds retries, but does not fundamentally fix anything
else, except for making sure that we can get the container logs in case
of a future failure

## Short description of the changes
- Setup storage once before executing tests (even though token test does
not require a real ES, it could be just a unit test)
- Remove `-rm` from storage Docker commands so that the container is
still available to do `docker logs` after the timeout
- Change polling from 5s to 10s, for a total of 600sec
- If storage is not reachable in 600sec then kill the container and
retry two more times
- Use trap to tear down storage (useful for local tests as otherwise
container may remain if the tests fail)

Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: shubbham1215 <sawaikershubham@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant