You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Grant Henke (Code Review)" <ge...@cloudera.org> on 2018/06/26 16:10:07 UTC
[kudu-CR] [Java] Support re-running tests in the Gradle build
Grant Henke has uploaded this change for review. ( http://gerrit.cloudera.org:8080/10824
Change subject: [Java] Support re-running tests in the Gradle build
......................................................................
[Java] Support re-running tests in the Gradle build
Gradle does not have built in support for re-running tests like
Maven Surefire/Failsafe does. This patch adds a Junit Rule to
BaseKuduTest to support retries and configures the Gradle
build and Jenkins script to set the retry property to match
the Maven build.
Change-Id: Ie11e61c40ee991b00616012f0decaaf2c5fe5ef0
---
M build-support/jenkins/build-and-test.sh
M java/gradle/tests.gradle
M java/kudu-client/src/test/java/org/apache/kudu/client/BaseKuduTest.java
A java/kudu-client/src/test/java/org/apache/kudu/junit/RetryRule.java
4 files changed, 88 insertions(+), 1 deletion(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/24/10824/1
--
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: newchange
Gerrit-Change-Id: Ie11e61c40ee991b00616012f0decaaf2c5fe5ef0
Gerrit-Change-Number: 10824
Gerrit-PatchSet: 1
Gerrit-Owner: Grant Henke <gr...@apache.org>
[kudu-CR] [Java] Support re-running tests in the Gradle build
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert 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: Code-Review+1
--
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 <gr...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Comment-Date: Mon, 02 Jul 2018 23:42:52 +0000
Gerrit-HasComments: No
[kudu-CR] [Java] Support re-running tests in the Gradle build
Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/10824 )
Change subject: [Java] Support re-running tests in the Gradle build
......................................................................
[Java] Support re-running tests in the Gradle build
Gradle does not have built in support for re-running tests like
Maven Surefire/Failsafe does. This patch adds a Junit Rule to
BaseKuduTest to support retries and configures the Gradle
build and Jenkins script to set the retry property to match
the Maven build.
Change-Id: Ie11e61c40ee991b00616012f0decaaf2c5fe5ef0
Reviewed-on: http://gerrit.cloudera.org:8080/10824
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Tested-by: Kudu Jenkins
---
M build-support/jenkins/build-and-test.sh
M java/gradle/tests.gradle
M java/kudu-client/src/test/java/org/apache/kudu/client/BaseKuduTest.java
A java/kudu-client/src/test/java/org/apache/kudu/junit/RetryRule.java
4 files changed, 93 insertions(+), 2 deletions(-)
Approvals:
Adar Dembo: Looks good to me, approved
Kudu Jenkins: Verified
--
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: merged
Gerrit-Change-Id: Ie11e61c40ee991b00616012f0decaaf2c5fe5ef0
Gerrit-Change-Number: 10824
Gerrit-PatchSet: 5
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
[kudu-CR] [Java] Support re-running tests in the Gradle build
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo 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 4: Code-Review+2
--
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: 4
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Comment-Date: Mon, 09 Jul 2018 18:42:11 +0000
Gerrit-HasComments: No
[kudu-CR] [Java] Support re-running tests in the Gradle build
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo 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 4:
(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 {
> The semantics here are the same. Additionally I have a patch for KUDU-2420
Could you document the semantics? Basically, think about what someone working on a test fixture would need to know in order to understand how to do do that work safely.
--
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: 4
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Comment-Date: Mon, 09 Jul 2018 18:18:42 +0000
Gerrit-HasComments: Yes
[kudu-CR] [Java] Support re-running tests in the Gradle build
Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
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 {
> What are the semantics of retrying in this way w.r.t. methods annotated wit
The semantics here are the same. Additionally I have a patch for KUDU-2420 posted which removes our heavy (maybe all) usage of @BeforeClass and @AfterClass making unhandled retries less of a concern/issue.
I would like to leave the maven build as is for now as it should be removed soon regardless.
--
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 <gr...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Comment-Date: Wed, 27 Jun 2018 22:33:29 +0000
Gerrit-HasComments: Yes
[kudu-CR] [Java] Support re-running tests in the Gradle build
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo 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 {
What are the semantics of retrying in this way w.r.t. methods annotated with @{Before,After}Class and @{Before,After}? AFAIK, surefire/failsafe's retry logic will invoke @Before/@After but not @BeforeClass/@AfterClass in between retries. Does this do the same thing?
I think it's important for surefire/failsafe and Gradle to have the same semantics. If we can't get them to match, one possibility is to stop using the built-in retry logic in surefire/failsafe and use RetryRule in those executors too.
--
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 <gr...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Comment-Date: Wed, 27 Jun 2018 22:22:02 +0000
Gerrit-HasComments: Yes
[kudu-CR] [Java] Support re-running tests in the Gradle build
Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Hello Mike Percy, Dan Burkert, Kudu Jenkins, Adar Dembo,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/10824
to look at the new patch set (#3).
Change subject: [Java] Support re-running tests in the Gradle build
......................................................................
[Java] Support re-running tests in the Gradle build
Gradle does not have built in support for re-running tests like
Maven Surefire/Failsafe does. This patch adds a Junit Rule to
BaseKuduTest to support retries and configures the Gradle
build and Jenkins script to set the retry property to match
the Maven build.
Change-Id: Ie11e61c40ee991b00616012f0decaaf2c5fe5ef0
---
M build-support/jenkins/build-and-test.sh
M java/gradle/tests.gradle
M java/kudu-client/src/test/java/org/apache/kudu/client/BaseKuduTest.java
A java/kudu-client/src/test/java/org/apache/kudu/junit/RetryRule.java
4 files changed, 93 insertions(+), 2 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/24/10824/3
--
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: newpatchset
Gerrit-Change-Id: Ie11e61c40ee991b00616012f0decaaf2c5fe5ef0
Gerrit-Change-Number: 10824
Gerrit-PatchSet: 3
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
[kudu-CR] [Java] Support re-running tests in the Gradle build
Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/10824
to look at the new patch set (#2).
Change subject: [Java] Support re-running tests in the Gradle build
......................................................................
[Java] Support re-running tests in the Gradle build
Gradle does not have built in support for re-running tests like
Maven Surefire/Failsafe does. This patch adds a Junit Rule to
BaseKuduTest to support retries and configures the Gradle
build and Jenkins script to set the retry property to match
the Maven build.
Change-Id: Ie11e61c40ee991b00616012f0decaaf2c5fe5ef0
---
M build-support/jenkins/build-and-test.sh
M java/gradle/tests.gradle
M java/kudu-client/src/test/java/org/apache/kudu/client/BaseKuduTest.java
A java/kudu-client/src/test/java/org/apache/kudu/junit/RetryRule.java
4 files changed, 91 insertions(+), 1 deletion(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/24/10824/2
--
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: newpatchset
Gerrit-Change-Id: Ie11e61c40ee991b00616012f0decaaf2c5fe5ef0
Gerrit-Change-Number: 10824
Gerrit-PatchSet: 2
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
[kudu-CR] [Java] Support re-running tests in the Gradle build
Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
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 <gr...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Comment-Date: Mon, 09 Jul 2018 18:35:54 +0000
Gerrit-HasComments: Yes