[
https://issues.apache.org/jira/browse/CASSANDRA-16654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17343831#comment-17343831
]
Andres de la Peña commented on CASSANDRA-16654:
-----------------------------------------------
I really like the idea of using an annotation for the runner parameters. I
spent some time trying to figure out how to extend {{RunWith}} without any
success, but the additional annotation approach is simple and effective.
Indeed, we could get rid of the inner subclasses for wrapped runners and just
add the wrapped runner to the annotation, so we can use something like:
{code:java}
@RunWith(RepeatableRunner.class)
@RepeatableRunnerConfiguration(iterations = 5, runner = Parameterized.class)
{code}
Or:
{code:java}
@RunWith(RepeatableRunner.class)
@RepeatableRunnerConfiguration(iterations = 5, runner = BMUnitRunner.class)
{code}
Differently from the subclasses approach, this should work with any kind of
runner. I gave it a go
[here|https://github.com/adelapena/cassandra/commit/b222faab156e119bfa82b6b8d7e909c22d8be12c]
(some examples included), wdyt?
> Junit RepeatableRunner flaky tests helper
> -----------------------------------------
>
> Key: CASSANDRA-16654
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16654
> Project: Cassandra
> Issue Type: Bug
> Components: Test/unit
> Reporter: Berenguer Blasi
> Assignee: Berenguer Blasi
> Priority: Normal
> Fix For: 4.0-rc2, 4.0, 4.1
>
>
> Some flakies only fail when the full suite is ran. If it's a quick test you
> can do thousands of runs if a few seconds. Looping at the sh level is not an
> option as every loop takes a few seconds.
> As I have found this very useful I am proposing committing it
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]