You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by ay...@apache.org on 2021/09/27 20:32:02 UTC
[bookkeeper] branch master updated: ISSUE #2640: BP-43 Migrate
bookkeeper client tests to gradle
This is an automated email from the ASF dual-hosted git repository.
ayegorov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new 76783f6 ISSUE #2640: BP-43 Migrate bookkeeper client tests to gradle
76783f6 is described below
commit 76783f6c6a6a9ffd37a835f59bb56e7968bdc665
Author: Prashant Kumar <65...@users.noreply.github.com>
AuthorDate: Mon Sep 27 13:31:57 2021 -0700
ISSUE #2640: BP-43 Migrate bookkeeper client tests to gradle
### Motivation
Sometimes ago gradle was introduced to Bookkeeper,
and with that build and release capabilities were built in Bookkeeper with gradle. But we never migrated bookkeeper to gradle.
Taking a first step towards gradle migration; This PR migrate all client unit tests of bookkeepr-server module to gradle
### Changes
Replace maven test target with gradle
Master Issue: #2640
This is copy of the approved PR https://github.com/apache/bookkeeper/pull/2800
As github somehow is giving 404 with https://github.com/apache/bookkeeper/pull/2800 while merging it.
Reviewers: Boyang Jerry Peng <None>, Henry Saputra <hs...@apache.org>, Matteo Merli <mm...@apache.org>, Andrey Yegorov <None>
This closes #2807 from pkumar-singh/merge_bookie_interface_injection_1, closes #2640
---
.github/workflows/client-tests.yml | 6 +-----
bookkeeper-server/build.gradle | 7 +++++++
gradle.properties | 2 ++
settings.gradle | 2 ++
4 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/client-tests.yml b/.github/workflows/client-tests.yml
index f957d01..d8ecd41 100644
--- a/.github/workflows/client-tests.yml
+++ b/.github/workflows/client-tests.yml
@@ -29,10 +29,6 @@ on:
- 'site/**'
workflow_dispatch:
-
-env:
- MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3
-
jobs:
test:
@@ -50,4 +46,4 @@ jobs:
with:
java-version: 1.8
- name: Run client tests
- run: mvn -B -am -nsu -pl bookkeeper-server clean install test -Dtest="org.apache.bookkeeper.client.**" -DfailIfNoTests=false -Dorg.slf4j.simpleLogger.defaultLogLevel=INFO
+ run: ./gradlew bookkeeper-server:test --tests="org.apache.bookkeeper.client.*" -Dtestlogger.theme=plain
diff --git a/bookkeeper-server/build.gradle b/bookkeeper-server/build.gradle
index 2dca64e..b413c34 100644
--- a/bookkeeper-server/build.gradle
+++ b/bookkeeper-server/build.gradle
@@ -18,6 +18,8 @@
*/
plugins {
id 'java'
+ id 'com.adarshr.test-logger'
+ id 'org.gradle.test-retry'
}
dependencies {
@@ -74,6 +76,11 @@ dependencies {
}
test {
+ retry {
+ maxFailures = 200
+ maxRetries = 5
+ }
+
maxHeapSize = '2G'
forkEvery = 1
}
diff --git a/gradle.properties b/gradle.properties
index f3e91a7..c48604b 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -25,3 +25,5 @@ shadowPluginVersion=6.1.0
licenseGradlePluginVersion=0.15.0
checkStyleVersion=6.19
spotbugsPlugin=4.7.0
+testLogger=2.0.0
+testRetry=1.0.0
diff --git a/settings.gradle b/settings.gradle
index f6abee5..336afcc 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -23,6 +23,8 @@ pluginManagement {
id "com.github.johnrengelman.shadow" version "${shadowPluginVersion}"
id "com.github.hierynomus.license" version "${licenseGradlePluginVersion}"
id "com.github.spotbugs" version "${spotbugsPlugin}"
+ id "com.adarshr.test-logger" version "${testLogger}"
+ id "org.gradle.test-retry" version "${testRetry}"
}
}