-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix testHAProxyModeConnectionWorks is flaky #16087
Conversation
Signed-off-by: Gao Binlong <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16087 +/- ##
============================================
+ Coverage 71.91% 71.96% +0.04%
- Complexity 64420 64424 +4
============================================
Files 5281 5281
Lines 301228 301228
Branches 43519 43519
============================================
+ Hits 216643 216788 +145
+ Misses 66835 66602 -233
- Partials 17750 17838 +88 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Gao Binlong <[email protected]>
❌ Gradle check result for ea53d79: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for ea53d79: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for ea53d79: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Thanks @gaobinlong , I think you may need to rebase against |
* Fix testHAProxyModeConnectionWorks is flaky Signed-off-by: Gao Binlong <[email protected]> * Optimize health check method Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]> (cherry picked from commit 031d8ae) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix testHAProxyModeConnectionWorks is flaky * Optimize health check method --------- (cherry picked from commit 031d8ae) Signed-off-by: Gao Binlong <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix testHAProxyModeConnectionWorks is flaky Signed-off-by: Gao Binlong <[email protected]> * Optimize health check method Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]>
* Fix testHAProxyModeConnectionWorks is flaky Signed-off-by: Gao Binlong <[email protected]> * Optimize health check method Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]>
* Fix testHAProxyModeConnectionWorks is flaky Signed-off-by: Gao Binlong <[email protected]> * Optimize health check method Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]>
* Fix testHAProxyModeConnectionWorks is flaky Signed-off-by: Gao Binlong <[email protected]> * Optimize health check method Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]>
* Fix testHAProxyModeConnectionWorks is flaky Signed-off-by: Gao Binlong <[email protected]> * Optimize health check method Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]>
Description
This PR fixes the flaky test
testHAProxyModeConnectionWorks
in RemoteClustersIT, from the gradle check log, we can see that the test casetestProxyModeConnectionWorks
always succeeds but the casetestHAProxyModeConnectionWorks
fails, the haproxy servicehaproxy:9600
provides a reversed proxy foropensearch-2:9300
,opensearch-2:9300
is OK buthaproxy:9600
cannot be accessed, so the only reason is that the haproxy service is not available at that time, maybe caused by that haproxy starts before opensearch-2, and the domainopensearch-2
is not ready, so haproxy exits with error:Since haproxy depends on opensearch-2, so we should add a
depends_on
attribute for the haproxy service in the docker-compose.yml, and also add healthcheck for it to make sure the haproxy service is ready before the tests execute.Related Issues
#14599
Check List
- [ ] Functionality includes testing.
- [ ] API changes companion pull request created, if applicable.
- [ ] Public documentation issue/PR created, if applicable.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.