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

WINDUPRULE-665 Implemented multiple attempts approach #494

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mrizzi
Copy link
Member

@mrizzi mrizzi commented Sep 28, 2020

https://issues.redhat.com/browse/WINDUPRULE-665

Basic retry implementation without sleep cycle to check if it's just really a temporary failure.

[UPDATED]
It must re-enable the test temporary excluded in #499

urlConn.connect();
CACHE_ANALYZED_LINKS.put(link, urlConn.getResponseCode());
int attempt = 0;
while (true)
Copy link
Member

Choose a reason for hiding this comment

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

I would recommend not to use this infinite loops. Even you are not specifying the delay between calls, so this is an over-kill.
You can use Awaitily to do this kind of checks where you have a max time or max retries to consider a process Success, and also you can define the delay between attempts.
We already use that in xavier-integration/EndToEndTests : https://github.com/project-xavier/xavier-integration/blob/9b01b4c1a932c16976b38f476a41a0d2bb799bcd/src/test/java/org/jboss/xavier/integrations/EndToEndTest.java#L596

@mrizzi
Copy link
Member Author

mrizzi commented Sep 30, 2020

@jonathanvila I tried to adopt Awaitility as you suggested.
I would like to have this solved quite soon because it's affecting too much our builds so whatever you feel has to be improved in Awaitility's usage, please send directly a PR to my branch (without any need for further comments to request changes) so that I can merge it into this PR and get this change merged, thanks 👍

@mrizzi
Copy link
Member Author

mrizzi commented Oct 1, 2020

retest

@windupgithubbot1
Copy link

test comment

@mrizzi
Copy link
Member Author

mrizzi commented May 4, 2021

retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants