[ 
https://issues.apache.org/jira/browse/FLINK-25690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17477795#comment-17477795
 ] 

Etienne Chauchot commented on FLINK-25690:
------------------------------------------

[~trohrmann] [~chesnay] That being said I've already done the _RetryRule_ code 
because I needed it for cassandra flakiness fixes but I can comply to what you 
think is best guys !

You both mentioned @after methods. So rather than allowing 
_RetryRule#setExceptionHandler(Runnable)_ you prefer that we make tests author 
define @after methods and call them before retrials to stay 100% junit standard 
?

I checked RetryExtension, it does not supports  this use case but it could be 
extended very easily by implementing _AfterEachCallback_
I guess you prefer that rather than changing _RetryRule_. So I can do the 
_RetryExtension_ change and update Cassandra tests to use the new 
_RetryExtension_. WDYT?

> RetryRule should allow a callback to be called on exception and failure cases
> -----------------------------------------------------------------------------
>
>                 Key: FLINK-25690
>                 URL: https://issues.apache.org/jira/browse/FLINK-25690
>             Project: Flink
>          Issue Type: Improvement
>            Reporter: Etienne Chauchot
>            Assignee: Etienne Chauchot
>            Priority: Major
>              Labels: test
>
> RetryRule is a Flink junit rule that allows to retry tests when they 
> temporary fail (either by throwing an exception or by failing an assertion) 
> usually in case of load. In some cases, there is some treatment to be done 
> for the test to be idempotent when retried for example cleaning of created 
> data etc...
> Of course, this callback will be optional.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to