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

ignoreWithRery always ignores all Throwable.class #79

Open
ramich2077 opened this issue May 30, 2019 · 0 comments
Open

ignoreWithRery always ignores all Throwable.class #79

ramich2077 opened this issue May 30, 2019 · 0 comments

Comments

@ramich2077
Copy link

In @Retry annotation I pass NoSuchElementException.class for ignoring

@FindBy(".//div[starts-with(@id, 'some_id')]") @Retry(timeout = 120_000L, ignoring = NoSuchElementException.class) AtlasWebElement someElement();

but then after DefaultRetryer initialization, Throwable.class is added to ignoring list

private Object invokeWithRetry(MethodInvoker invoker, Object proxy, MethodInfo methodInfo) throws Throwable { DefaultRetryer retryer = (DefaultRetryer)Optional.ofNullable(methodInfo.getMethod().getAnnotation(Retry.class)).map((retry) -> { return new DefaultRetryer(retry.timeout(), retry.polling(), Arrays.asList(retry.ignoring())); }).orElse(new DefaultRetryer(5000L, 1000L, new ArrayList())); retryer.ignore(Throwable.class); ...

that results in ignoring UnhandledAlertException.class, which I want to catch and work with in my code

admizh pushed a commit to admizh/atlas that referenced this issue Jul 4, 2019
now RetryerContext is mandatory and should be injected to atlas config
Re-designed Retryer's, now we use global RetryerContext as default
ISExtension (for momentary checking)
now beforeMethod return configuration instance for alteration

fixes:
qameta#81
qameta#79
qameta#74
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

No branches or pull requests

1 participant