-
Notifications
You must be signed in to change notification settings - Fork 86
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
[flaky test]solution for aliases.js #920
[flaky test]solution for aliases.js #920
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #920 +/- ##
=======================================
Coverage 63.37% 63.37%
=======================================
Files 341 341
Lines 11554 11554
Branches 2243 2243
=======================================
Hits 7322 7322
Misses 3658 3658
Partials 574 574 ☔ View full report in Codecov by Sentry. |
Hi @SuZhou-Joe Thanks lot for the reply. I will make the recommended change. I will also go ahead and run the test cases multiple times to ensure no other code is affected due to this change. KC |
Hi @SuZhou-Joe I have added a wait for the test case. Another solution would be to Thanks, |
04e29e4
to
f562f3e
Compare
Signed-off-by: kohinoor98 <[email protected]>
Signed-off-by: kohinoor98 <[email protected]>
477c0dd
to
aa3e0cc
Compare
Hi KC, I am afraid that for OSD there is not an endpoint that can check the status of bundling process, the only thing we can do should be more wait time for that. |
@kohinoor98 I see the test is still failing here https://github.com/opensearch-project/index-management-dashboards-plugin/actions/runs/6843755781/job/18606696212?pr=920 As for the fix, as @SuZhou-Joe mentioned, the problem is dashboard server is not ready yet, would you look at this part to tackle this problem |
After repeatedly running this test(more than five times), I have increased the wait for the Another solution could be upgrading cypress. Thanks, |
d5eb979
to
aa3e0cc
Compare
Signed-off-by: kohinoor98 <[email protected]>
Signed-off-by: kohinoor98 <[email protected]>
Signed-off-by: kohinoor98 <[email protected]>
// Wait for 120 seconds for OSD to start. | ||
// eslint-disable-next-line cypress/no-unnecessary-waiting | ||
cy.wait(120000); |
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.
Don't want this to slow down the testing, I am looking for the way to make sure OSD starts, 2 things worth try
# timeout 300 bash -c 'while [[ "$(curl -s localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done' |
For now you can just remove this wait, and we can try these 2 things in another PR
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.
@bowenlan-amzn Done! Could you please create the appropriate issue for this and assign it to me? I will get started on it in a separate PR.
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.
Create one #938 but still need your comment to assign, thanks!
cypress/integration/plugins/index-management-dashboards-plugin/aliases.js
Outdated
Show resolved
Hide resolved
Signed-off-by: kohinoor98 <[email protected]>
Description
Solution:
Intercepting the apiCaller POST call and waiting for the call to complete before moving on to check if the "Rows per page" is present.
The reason for it being flaky is that the
apiCaller
sometimes takes exteremely long time to return data as the number of elements are high and if the network tab is open incypress
while the test is being conducted theAPI calls
take a very long time.If the flaky test reoccurs then:
before
inaliases.js
Issues Resolved
#910
Check List
aliases.js
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.