-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Conversation
Signed-off-by: Yuri Shkuro <[email protected]>
Codecov ReportBase: 97.14% // Head: 97.12% // Decreases project coverage by
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
Flags with carried forward coverage won't be shown. Click here to find out more.
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. |
Signed-off-by: Yuri Shkuro <[email protected]>
@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"} |
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.
no reason to run test server on the official ES port (the integration script also changed to run query-service against this fake service)
## 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 <[email protected]>
## 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 <[email protected]> Signed-off-by: shubbham1215 <[email protected]>
Which problem is this PR solving?
Short description of the changes
-rm
from storage Docker commands so that the container is still available to dodocker logs
after the timeout