Grant Henke has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/10824 )

Change subject: [Java] Support re-running tests in the Gradle build
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/10824/2/java/kudu-client/src/test/java/org/apache/kudu/junit/RetryRule.java
File java/kudu-client/src/test/java/org/apache/kudu/junit/RetryRule.java:

http://gerrit.cloudera.org:8080/#/c/10824/2/java/kudu-client/src/test/java/org/apache/kudu/junit/RetryRule.java@26
PS2, Line 26: public class RetryRule implements TestRule {
> Could you document the semantics? Basically, think about what someone worki
It's not actually this TestRule implementation making the semantics but how you 
use it. This is documented clearly in the Junit TestRule class and @Rule and 
@ClassRule annotations (and any other annotation that could define different 
semantics I suppose).

We use @Rule in BaseKuduTest because we only use @Before and @After and that is 
all that we want to be rerun. However, if we used @ClassRule it would rerun 
@BeforeClass and @AfterClass too.

Given this is a Junit usage detail and it is documented by the Junit 
annotations when using them I don't think we needed to re-document it.

https://junit.org/junit4/javadoc/4.12/org/junit/rules/TestRule.html
https://junit.org/junit4/javadoc/4.12/org/junit/Rule.html
https://junit.org/junit4/javadoc/4.12/org/junit/ClassRule.html



--
To view, visit http://gerrit.cloudera.org:8080/10824
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie11e61c40ee991b00616012f0decaaf2c5fe5ef0
Gerrit-Change-Number: 10824
Gerrit-PatchSet: 2
Gerrit-Owner: Grant Henke <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Grant Henke <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <[email protected]>
Gerrit-Comment-Date: Mon, 09 Jul 2018 18:35:54 +0000
Gerrit-HasComments: Yes

Reply via email to