Skip to content

Commit

Permalink
ISSUE apache#2640: BP-43 Migrate bookkeeper client tests to gradle
Browse files Browse the repository at this point in the history
### 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: apache#2640

This is copy of the approved PR apache#2800

As github somehow is giving 404 with apache#2800 while merging it.

Reviewers: Boyang Jerry Peng <None>, Henry Saputra <hsaputra@apache.org>, Matteo Merli <mmerli@apache.org>, Andrey Yegorov <None>

This closes apache#2807 from pkumar-singh/merge_bookie_interface_injection_1, closes apache#2640
  • Loading branch information
pkumar-singh authored and Anup Ghatage committed Jul 12, 2024
1 parent ac1b983 commit ce22ebc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/client-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ on:
- 'site/**'
workflow_dispatch:


env:
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3

jobs:
test:

Expand All @@ -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
7 changes: 7 additions & 0 deletions bookkeeper-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/
plugins {
id 'java'
id 'com.adarshr.test-logger'
id 'org.gradle.test-retry'
}

dependencies {
Expand Down Expand Up @@ -74,6 +76,11 @@ dependencies {
}

test {
retry {
maxFailures = 200
maxRetries = 5
}

maxHeapSize = '2G'
forkEvery = 1
}
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
}
}

Expand Down

0 comments on commit ce22ebc

Please sign in to comment.