This is an automated email from the ASF dual-hosted git repository.
hsaputra 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 3dd671c Migrate bookkeepr-server:test to gradle run unit tests
excepts org.apache.bookkeeper.bookie. org.apache.bookkeeper.client
org.apache.bookkeeper.replication org.apache.bookkeeper.tls. (#2812)
3dd671c is described below
commit 3dd671c740cf34e0cbdca0dc2ac506c06cf97472
Author: Prashant Kumar <[email protected]>
AuthorDate: Wed Oct 20 09:52:47 2021 -0700
Migrate bookkeepr-server:test to gradle run unit tests excepts
org.apache.bookkeeper.bookie. org.apache.bookkeeper.client
org.apache.bookkeeper.replication org.apache.bookkeeper.tls. (#2812)
Co-authored-by: Prashant Kumar <[email protected]>
---
.github/workflows/compatibility-check-java11.yml | 9 +-
.github/workflows/compatibility-check-java8.yml | 11 ++-
.github/workflows/integration-tests.yml | 15 +--
.github/workflows/pr-validation.yml | 8 +-
.github/workflows/remaining-tests.yml | 5 +-
.github/workflows/replication-tests.yml | 2 +-
.github/workflows/stream-tests.yml | 24 +++--
.github/workflows/tls-tests.yml | 5 +-
bookkeeper-benchmark/build.gradle | 9 +-
bookkeeper-common-allocator/build.gradle | 1 +
bookkeeper-common/build.gradle | 13 ++-
bookkeeper-dist/all/build.gradle | 26 +++---
bookkeeper-dist/bkctl/build.gradle | 21 ++++-
bookkeeper-dist/server/build.gradle | 33 ++++---
bookkeeper-http/vertx-http-server/build.gradle | 11 +++
bookkeeper-server/build.gradle | 6 +-
.../codahale-metrics-provider/build.gradle | 1 +
.../prometheus-metrics-provider/build.gradle | 2 +
bookkeeper-stats/build.gradle | 4 +
build.gradle | 30 +++---
circe-checksum/build.gradle | 1 +
cpu-affinity/build.gradle | 1 +
dependencies.gradle | 102 ++++++++++++++++-----
dev/check-all-licenses-gradle | 33 +++++++
dev/check-binary-license | 16 +++-
microbenchmarks/build.gradle | 12 +--
stats/utils/build.gradle | 3 +-
stream/api/build.gradle | 2 +-
stream/clients/java/all/build.gradle | 4 +-
stream/clients/java/base/build.gradle | 13 ++-
stream/clients/java/kv/build.gradle | 8 +-
stream/common/build.gradle | 23 ++++-
stream/distributedlog/common/build.gradle | 22 ++++-
stream/distributedlog/core/build.gradle | 22 ++++-
stream/distributedlog/protocol/build.gradle | 26 +++++-
stream/proto/build.gradle | 13 ++-
stream/server/build.gradle | 28 ++++--
stream/statelib/build.gradle | 13 ++-
stream/storage/api/build.gradle | 7 ++
stream/storage/impl/build.gradle | 21 ++++-
stream/tests-common/build.gradle | 7 +-
tests/docker-images/statestore-image/Dockerfile | 2 +-
.../statestore-image/image_builder.sh | 2 +-
tests/integration-tests-topologies/build.gradle | 2 +-
tests/integration-tests-utils/build.gradle | 2 +-
tests/integration/cluster/build.gradle | 3 +-
tests/integration/smoke/build.gradle | 2 +-
tests/integration/standalone/build.gradle | 2 +-
tools/all/build.gradle | 1 -
tools/framework/build.gradle | 9 +-
tools/ledger/build.gradle | 5 +-
.../tools/cli/helpers/CookieCommandTestBase.java | 4 -
tools/perf/build.gradle | 1 +
tools/stream/build.gradle | 9 ++
54 files changed, 489 insertions(+), 168 deletions(-)
diff --git a/.github/workflows/compatibility-check-java11.yml
b/.github/workflows/compatibility-check-java11.yml
index 4a49a9a..3f13068 100644
--- a/.github/workflows/compatibility-check-java11.yml
+++ b/.github/workflows/compatibility-check-java11.yml
@@ -29,9 +29,6 @@ on:
- 'site/**'
workflow_dispatch:
-env:
- MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=25
-Dmaven.wagon.http.retryHandler.count=3
-
jobs:
check:
@@ -48,5 +45,7 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 1.11
- - name: Build with Maven
- run: mvn clean package -B -nsu -DskipBookKeeperServerTests
-Dorg.slf4j.simpleLogger.defaultLogLevel=INFO
+ - name: Build with gradle
+ run: ./gradlew test -x bookkeeper-server:test -x
tests:integration:cluster:test -x tests:integration:smoke:test -x
tests:integration:standalone:test -Dtestlogger.theme=plain
+ -PexcludeTests="*.apache.distributedlog.*,
*.apache.bookkeeper.statelib.*, *.apache.bookkeeper.clients.*,
*.apache.bookkeeper.common.*, *.apache.bookkeeper.stream.*"
+
diff --git a/.github/workflows/compatibility-check-java8.yml
b/.github/workflows/compatibility-check-java8.yml
index fda71a5..8caa43c 100644
--- a/.github/workflows/compatibility-check-java8.yml
+++ b/.github/workflows/compatibility-check-java8.yml
@@ -29,9 +29,6 @@ on:
- 'site/**'
workflow_dispatch:
-env:
- MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=25
-Dmaven.wagon.http.retryHandler.count=3
-
jobs:
check:
@@ -48,5 +45,9 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 1.8
- - name: Build with Maven
- run: mvn clean package -B -nsu spotbugs:check
-DskipBookKeeperServerTests -Dorg.slf4j.simpleLogger.defaultLogLevel=INFO
+ - name: Build with gradle
+ run: ./gradlew test -x bookkeeper-server:test
+ -x tests:integration:cluster:test
+ -x tests:integration:smoke:test
+ -x tests:integration:standalone:test -Dtestlogger.theme=plain
+ -PexcludeTests="*.apache.distributedlog.*,
*.apache.bookkeeper.statelib.*, *.apache.bookkeeper.clients.*,
*.apache.bookkeeper.common.*, *.apache.bookkeeper.stream.*"
diff --git a/.github/workflows/integration-tests.yml
b/.github/workflows/integration-tests.yml
index 97a3c82..297c3b0 100644
--- a/.github/workflows/integration-tests.yml
+++ b/.github/workflows/integration-tests.yml
@@ -48,11 +48,12 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 1.8
- - name: Build with Maven
- run: mvn -B -nsu clean install -Pdocker -DskipTests
-Dorg.slf4j.simpleLogger.defaultLogLevel=INFO
- - name: Run metadata driver tests
- run: mvn -B -nsu -f metadata-drivers/pom.xml test -DintegrationTests
-Dorg.slf4j.simpleLogger.defaultLogLevel=INFO
-
- - name: Run all integration tests
- run: mvn -B -nsu -f tests/pom.xml test -DintegrationTests
-Dorg.slf4j.simpleLogger.defaultLogLevel=INFO
+ - name: Build tar
+ run: ./gradlew stream:server:build -x test
+ - name: run cluster integration test
+ run: ./gradlew :tests:integration:cluster:test -Dtestlogger.theme=plain
+ - name: run smoke test
+ run: ./gradlew tests:integration:smoke:test -Dtestlogger.theme=plain
+ - name: run standalone test
+ run: ./gradlew tests:integration:standalone:test
-Dtestlogger.theme=plain
diff --git a/.github/workflows/pr-validation.yml
b/.github/workflows/pr-validation.yml
index edcebaa..3433715 100644
--- a/.github/workflows/pr-validation.yml
+++ b/.github/workflows/pr-validation.yml
@@ -29,8 +29,6 @@ on:
- 'site/**'
workflow_dispatch:
-env:
- MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=25
-Dmaven.wagon.http.retryHandler.count=3
jobs:
check:
@@ -48,7 +46,7 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 1.8
- - name: Validate pull request style
- run: mvn clean -B -nsu apache-rat:check checkstyle:check package
-Ddistributedlog -DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=INFO
+ - name: Validate pull request
+ run: ./gradlew build -x microbenchmarks:checkstyleMain -x spotbugsTest
-x signDistTar -x test
- name: Check license files
- run: dev/check-all-licenses
+ run: dev/check-all-licenses-gradle
diff --git a/.github/workflows/remaining-tests.yml
b/.github/workflows/remaining-tests.yml
index 6176aa4..90cb641 100644
--- a/.github/workflows/remaining-tests.yml
+++ b/.github/workflows/remaining-tests.yml
@@ -29,9 +29,6 @@ on:
- 'site/**'
workflow_dispatch:
-env:
- MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=25
-Dmaven.wagon.http.retryHandler.count=3
-
jobs:
test:
@@ -49,4 +46,4 @@ jobs:
with:
java-version: 1.8
- name: Run remaining tests
- run: mvn -B -nsu -am -pl bookkeeper-server clean install test
-Dtest="!org.apache.bookkeeper.client.**,!org.apache.bookkeeper.bookie.**,!org.apache.bookkeeper.replication.**,!org.apache.bookkeeper.tls.**"
-DfailIfNoTests=false -Dorg.slf4j.simpleLogger.defaultLogLevel=INFO
+ run: ./gradlew bookkeeper-server:test
-PexcludeTests="*org.apache.bookkeeper.bookie.*,
*org.apache.bookkeeper.client.*, *org.apache.bookkeeper.replication.*,
*org.apache.bookkeeper.tls.*" -Dtestlogger.theme=plain
\ No newline at end of file
diff --git a/.github/workflows/replication-tests.yml
b/.github/workflows/replication-tests.yml
index 8dd6ea6..c5bd88e 100644
--- a/.github/workflows/replication-tests.yml
+++ b/.github/workflows/replication-tests.yml
@@ -49,4 +49,4 @@ jobs:
with:
java-version: 1.8
- name: Run replication tests
- run: mvn -B -nsu -am -pl bookkeeper-server clean install test
-Dtest="org.apache.bookkeeper.replication.**" -DfailIfNoTests=false
-Dorg.slf4j.simpleLogger.defaultLogLevel=INFO
+ run: ./gradlew bookkeeper-server:test
--tests="org.apache.bookkeeper.replication.*" -Dtestlogger.theme=plain
diff --git a/.github/workflows/stream-tests.yml
b/.github/workflows/stream-tests.yml
index ca4a707..c658433 100644
--- a/.github/workflows/stream-tests.yml
+++ b/.github/workflows/stream-tests.yml
@@ -28,9 +28,6 @@ on:
- 'site/**'
workflow_dispatch:
-env:
- MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=25
-Dmaven.wagon.http.retryHandler.count=3
-
jobs:
test:
@@ -47,7 +44,20 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 1.8
- - name: Build with Maven
- run: mvn -B -nsu clean install -DskipTests
-Dorg.slf4j.simpleLogger.defaultLogLevel=INFO
- - name: Run StreamStorage tests
- run: mvn -B -nsu -f stream/pom.xml verify -DstreamTests
-Dorg.slf4j.simpleLogger.defaultLogLevel=INFO
+ - name: Run stream:distributedlog:core tests
+ run: ./gradlew stream:distributedlog:core:test -Dtestlogger.theme=plain
+ - name: Run stream:distributedlog:common tests
+ run: ./gradlew stream:distributedlog:common:test
-Dtestlogger.theme=plain
+ - name: Run stream:distributedlog:protocol tests
+ run: ./gradlew stream:distributedlog:protocol:test
-Dtestlogger.theme=plain
+ - name: Run stream:proto tests
+ run: ./gradlew stream:proto:test -Dtestlogger.theme=plain
+ - name: Run stream:serve tests
+ run: ./gradlew stream:server:test -Dtestlogger.theme=plain
+ - name: Run stream:statelib tests
+ run: ./gradlew stream:statelib:test -Dtestlogger.theme=plain
+ - name: Run stream:storage:api:test tests
+ run: ./gradlew stream:storage:api:test -Dtestlogger.theme=plain
+ - name: Run stream:storage:impl tests
+ run: ./gradlew stream:storage:impl:test -Dtestlogger.theme=plain
+
diff --git a/.github/workflows/tls-tests.yml b/.github/workflows/tls-tests.yml
index 45748c2..00fb6f3 100644
--- a/.github/workflows/tls-tests.yml
+++ b/.github/workflows/tls-tests.yml
@@ -29,9 +29,6 @@ on:
- 'site/**'
workflow_dispatch:
-env:
- MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=25
-Dmaven.wagon.http.retryHandler.count=3
-
jobs:
test:
@@ -49,4 +46,4 @@ jobs:
with:
java-version: 1.8
- name: Run tls tests
- run: mvn -B -am -nsu -pl bookkeeper-server clean install test
-Dtest="org.apache.bookkeeper.tls.**" -DfailIfNoTests=false
-Dorg.slf4j.simpleLogger.defaultLogLevel=INFO
+ run: ./gradlew bookkeeper-server:test
--tests="org.apache.bookkeeper.tls.*" -Dtestlogger.theme=plain
diff --git a/bookkeeper-benchmark/build.gradle
b/bookkeeper-benchmark/build.gradle
index 00e1cf7..6f428f6 100644
--- a/bookkeeper-benchmark/build.gradle
+++ b/bookkeeper-benchmark/build.gradle
@@ -18,6 +18,8 @@
*/
plugins {
id 'java-library'
+ id 'com.adarshr.test-logger'
+ id 'org.gradle.test-retry'
}
description = 'Apache BookKeeper :: Benchmark'
@@ -39,7 +41,7 @@ dependencies {
implementation depLibs.nettyBuffer
implementation depLibs.nettyTransportNativeEpoll
implementation depLibs.zookeeper
-
+ implementation depLibs.log4j12api
testImplementation project(':bookkeeper-server')
testImplementation project(path: ':bookkeeper-common', configuration:
'testArtifacts')
@@ -57,6 +59,11 @@ dependencies {
}
test {
+ retry {
+ maxFailures = 10
+ maxRetries = 3
+ }
+
maxHeapSize = '4G'
forkEvery = 1
jvmArgs("-Djunit.timeout.test=600000",
diff --git a/bookkeeper-common-allocator/build.gradle
b/bookkeeper-common-allocator/build.gradle
index 57f6b59..5685b25 100644
--- a/bookkeeper-common-allocator/build.gradle
+++ b/bookkeeper-common-allocator/build.gradle
@@ -18,6 +18,7 @@
*/
plugins {
id 'java-library'
+ id 'com.adarshr.test-logger'
}
dependencies {
diff --git a/bookkeeper-common/build.gradle b/bookkeeper-common/build.gradle
index 94b5b36..4b44f68 100644
--- a/bookkeeper-common/build.gradle
+++ b/bookkeeper-common/build.gradle
@@ -19,13 +19,15 @@
plugins {
id 'java-library'
id "java-test-fixtures"
+ id 'com.adarshr.test-logger'
+ id 'org.gradle.test-retry'
}
dependencies {
implementation project(":bookkeeper-stats")
implementation project(":cpu-affinity")
- compileOnly depLibs.errorprone
+ implementation depLibs.errorprone
compileOnly depLibs.jsr305
compileOnly depLibs.lombok
compileOnly depLibs.spotbugsAnnotations
@@ -50,3 +52,12 @@ dependencies {
testAnnotationProcessor depLibs.lombok
}
+test {
+ retry {
+ maxFailures = 20
+ maxRetries = 3
+ }
+
+ maxHeapSize = '3G'
+ forkEvery = 1
+}
\ No newline at end of file
diff --git a/bookkeeper-dist/all/build.gradle b/bookkeeper-dist/all/build.gradle
index 343f01a..205cdf2 100644
--- a/bookkeeper-dist/all/build.gradle
+++ b/bookkeeper-dist/all/build.gradle
@@ -25,7 +25,6 @@ plugins {
description = 'Apache BookKeeper :: Dist (All)'
dependencies {
-
implementation project(':bookkeeper-benchmark')
implementation project(':bookkeeper-http:http-server')
implementation project(':bookkeeper-http:vertx-http-server')
@@ -36,18 +35,13 @@ dependencies {
implementation project(':stream:distributedlog:core')
implementation project(':stream:server')
implementation project(':bookkeeper-tools')
-
- compileOnly depLibs.lombok
- compileOnly depLibs.spotbugsAnnotations
-
- implementation depLibs.log4j12api
-
-
- testCompileOnly depLibs.lombok
-
-
- annotationProcessor depLibs.lombok
- testAnnotationProcessor depLibs.lombok
+ implementation depLibs.jsr305
+ runtimeOnly depLibs.log4j12api
+ implementation (depLibs.zookeeperTest) {
+ exclude group: "io.netty", module: "netty-transport-native-epoll"
+ exclude group: 'log4j', module: 'log4j'
+ exclude group: 'org.slf4j', module: 'slf4j-log4j12'
+ }
}
jar {
@@ -116,7 +110,11 @@ distributions {
} else {
// External dependencies
def id = dep.moduleVersion.id
- archiveName =
"${id.group}-${id.name}-${id.version}.jar"
+ if (dep.classifier != null) {
+ archiveName =
"${id.group}-${id.name}-${id.version}-${dep.classifier}.jar"
+ } else {
+ archiveName =
"${id.group}-${id.name}-${id.version}.jar"
+ }
}
rename {archiveName}
}
diff --git a/bookkeeper-dist/bkctl/build.gradle
b/bookkeeper-dist/bkctl/build.gradle
index 691f09b..eda3c96 100644
--- a/bookkeeper-dist/bkctl/build.gradle
+++ b/bookkeeper-dist/bkctl/build.gradle
@@ -25,7 +25,19 @@ plugins {
}
dependencies {
- implementation project(":bookkeeper-tools")
+ implementation (project(":bookkeeper-tools")) {
+ exclude group: "org.rocksdb", module: "rocksdbjni"
+ }
+ runtimeOnly (depLibs.zookeeperTest) {
+ exclude group: "io.netty", module: "netty-transport-native-epoll"
+ exclude group: 'log4j', module: 'log4j'
+ exclude group: 'org.slf4j', module: 'slf4j-log4j12'
+ }
+ runtimeOnly
(project(':bookkeeper-stats-providers:codahale-metrics-provider')) {
+ exclude group: "io.dropwizard.metrics", module: "metrics-graphite"
+ exclude group: "io.dropwizard.metrics", module: "metrics-jvm"
+ }
+ runtimeOnly depLibs.snappy
}
releaseArtifacts {
@@ -35,7 +47,6 @@ releaseArtifacts {
def depLicences = [
"checker-qual-3.5.0/LICENSE",
"google-auth-library-credentials-0.20.0/LICENSE",
- "javax.servlet-api-4.0.0/CDDL+GPL-1.1",
"netty-4.1.68.Final/*",
"bouncycastle-1.0.2/LICENSE.html",
"protobuf-3.14.0/LICENSE",
@@ -99,7 +110,11 @@ distributions {
} else {
// External dependencies
def id = dep.moduleVersion.id
- archiveName =
"${id.group}-${id.name}-${id.version}.jar"
+ if (dep.classifier != null) {
+ archiveName =
"${id.group}-${id.name}-${id.version}-${dep.classifier}.jar"
+ } else {
+ archiveName =
"${id.group}-${id.name}-${id.version}.jar"
+ }
}
rename {archiveName}
}
diff --git a/bookkeeper-dist/server/build.gradle
b/bookkeeper-dist/server/build.gradle
index 6ce817d..d10add5 100644
--- a/bookkeeper-dist/server/build.gradle
+++ b/bookkeeper-dist/server/build.gradle
@@ -28,28 +28,20 @@ releaseArtifacts {
artifact(tasks.named("distTar"))
}
-// implementation project(':bookkeeper-http:vertx-http-server')
dependencies {
-
- implementation project(':bookkeeper-http:http-server')
implementation project(':bookkeeper-server')
implementation
project(':bookkeeper-stats-providers:prometheus-metrics-provider')
implementation project(':bookkeeper-stats')
implementation project(':stream:distributedlog:core')
implementation project(':stream:server')
implementation project(':bookkeeper-tools')
-
- compileOnly depLibs.lombok
- compileOnly depLibs.spotbugsAnnotations
-
implementation depLibs.log4j12api
-
- testCompileOnly depLibs.lombok
-
-
- annotationProcessor depLibs.lombok
- testAnnotationProcessor depLibs.lombok
+ runtimeOnly (depLibs.zookeeperTest) {
+ exclude group: "io.netty", module: "netty-transport-native-epoll"
+ exclude group: 'log4j', module: 'log4j'
+ exclude group: 'org.slf4j', module: 'slf4j-log4j12'
+ }
}
jar {
@@ -106,7 +98,11 @@ distributions {
} else {
// External dependencies
def id = dep.moduleVersion.id
- archiveName =
"${id.group}-${id.name}-${id.version}.jar"
+ if (dep.classifier != null) {
+ archiveName =
"${id.group}-${id.name}-${id.version}-${dep.classifier}.jar"
+ } else {
+ archiveName =
"${id.group}-${id.name}-${id.version}.jar"
+ }
}
rename {archiveName}
}
@@ -116,3 +112,12 @@ distributions {
}
}
}
+
+publishing {
+ publications {
+ maven(MavenPublication) {
+ groupId = 'org.apache.bookkeeper'
+ artifactId = 'bookkeeper-dist-server'
+ }
+ }
+}
diff --git a/bookkeeper-http/vertx-http-server/build.gradle
b/bookkeeper-http/vertx-http-server/build.gradle
index bc01765..19dff5a 100644
--- a/bookkeeper-http/vertx-http-server/build.gradle
+++ b/bookkeeper-http/vertx-http-server/build.gradle
@@ -18,6 +18,7 @@
*/
plugins {
id 'java'
+ id 'com.adarshr.test-logger'
}
dependencies {
@@ -25,6 +26,16 @@ dependencies {
implementation depLibs.slf4j
implementation depLibs.vertxCore
implementation depLibs.vertxWeb
+ implementation depLibs.nettyBuffer
+ implementation depLibs.nettyCommon
+ implementation depLibs.nettyHandler
+ implementation depLibs.nettyTransport
+ runtimeOnly depLibs.nettyTransportNativeEpoll
+ implementation depLibs.nettyProxy
+ implementation depLibs.nettyCodecHTTP
+ implementation depLibs.nettyCodecHTTP2
+ implementation depLibs.nettyResolver
+ implementation depLibs.nettyResolverDNS
testImplementation depLibs.junit
}
diff --git a/bookkeeper-server/build.gradle b/bookkeeper-server/build.gradle
index b18ed01..1445fbe 100644
--- a/bookkeeper-server/build.gradle
+++ b/bookkeeper-server/build.gradle
@@ -53,6 +53,9 @@ dependencies {
implementation depLibs.protobuf
implementation depLibs.rocksDb
implementation depLibs.zookeeper
+ implementation depLibs.log4jSlf4jImpl
+ implementation depLibs.log4j12api
+ implementation depLibs.log4jCore
testImplementation
project(':bookkeeper-stats-providers:prometheus-metrics-provider')
testImplementation project(':bookkeeper-http:vertx-http-server')
@@ -72,9 +75,6 @@ dependencies {
testImplementation depLibs.zookeeperTest
annotationProcessor depLibs.lombok
testAnnotationProcessor depLibs.lombok
- testImplementation depLibs.log4jSlf4jImpl
- testImplementation depLibs.log4j12api
- testImplementation depLibs.log4jCore
}
test {
diff --git a/bookkeeper-stats-providers/codahale-metrics-provider/build.gradle
b/bookkeeper-stats-providers/codahale-metrics-provider/build.gradle
index 2ac1dbb..a5e1868 100644
--- a/bookkeeper-stats-providers/codahale-metrics-provider/build.gradle
+++ b/bookkeeper-stats-providers/codahale-metrics-provider/build.gradle
@@ -18,6 +18,7 @@
*/
plugins {
id 'java-library'
+ id 'com.adarshr.test-logger'
}
description = 'Apache BookKeeper :: Stats Providers :: Codahale Metrics'
diff --git
a/bookkeeper-stats-providers/prometheus-metrics-provider/build.gradle
b/bookkeeper-stats-providers/prometheus-metrics-provider/build.gradle
index f51d059..dc09350 100644
--- a/bookkeeper-stats-providers/prometheus-metrics-provider/build.gradle
+++ b/bookkeeper-stats-providers/prometheus-metrics-provider/build.gradle
@@ -18,6 +18,7 @@
*/
plugins {
id 'java'
+ id 'com.adarshr.test-logger'
}
dependencies {
@@ -25,6 +26,7 @@ dependencies {
implementation depLibs.commonsConfiguration
implementation depLibs.guava
implementation depLibs.jettyServlet
+ implementation depLibs.javaxServlet
implementation depLibs.nettyCommon
implementation depLibs.prometheusSimpleClient
implementation depLibs.prometheusSimpleClientHotspot
diff --git a/bookkeeper-stats/build.gradle b/bookkeeper-stats/build.gradle
index 70167df..98784c9 100644
--- a/bookkeeper-stats/build.gradle
+++ b/bookkeeper-stats/build.gradle
@@ -25,6 +25,10 @@ dependencies {
implementation depLibs.slf4j
}
+jar {
+ archiveBaseName = 'bookkeeper-stats-api'
+}
+
publishing {
publications {
maven(MavenPublication) {
diff --git a/build.gradle b/build.gradle
index 6373c77..1938184 100644
--- a/build.gradle
+++ b/build.gradle
@@ -102,6 +102,7 @@ allprojects {
'**/out/**',
'**/generated/**',
'**/build/**',
+ '**/target/**',
'**/.idea/**',
'.git/**/*',
'.github/**/*',
@@ -201,17 +202,24 @@ allprojects {
}
}
test {
- String testGroup = System.properties['testGroup']
- if (testGroup == 'client') {
- include '**/client/*'
- } else if (testGroup == 'bookie') {
- include '**/bookie/*'
- } else if (testGroup == 'other') {
- exclude '**/client/*'
- exclude '**/bookie/*'
- }
- if (project.hasProperty('excludeTests')) {
- exclude project.property('excludeTests')
+ filter {
+ String testGroup = System.properties['testGroup']
+ if (testGroup == 'client') {
+ include '**/client/*'
+ } else if (testGroup == 'bookie') {
+ include '**/bookie/*'
+ } else if (testGroup == 'other') {
+ exclude '**/client/*'
+ exclude '**/bookie/*'
+ }
+ if (project.hasProperty('excludeTests')) {
+ String excludeTests = project.property('excludeTests');
+ ArrayList<String> tests = excludeTests.split(',');
+ tests.forEach({it
+ String exclude = it.trim();
+ excludeTestsMatching exclude;
+ });
+ }
}
}
}
diff --git a/circe-checksum/build.gradle b/circe-checksum/build.gradle
index 5e03ec9..1e7a75f 100644
--- a/circe-checksum/build.gradle
+++ b/circe-checksum/build.gradle
@@ -18,6 +18,7 @@
*/
plugins {
id 'java'
+ id 'com.adarshr.test-logger'
}
dependencies {
diff --git a/cpu-affinity/build.gradle b/cpu-affinity/build.gradle
index 750f7a2..3f2cf0d 100644
--- a/cpu-affinity/build.gradle
+++ b/cpu-affinity/build.gradle
@@ -19,6 +19,7 @@
plugins {
id 'java'
+ id 'com.adarshr.test-logger'
}
dependencies {
diff --git a/dependencies.gradle b/dependencies.gradle
index a7bc5bf..6b019f8 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -26,8 +26,8 @@ depVersions = [
arquillianJunit: "1.6.0.Final",
bcFips: "1.0.2",
bouncycastle: "1.69",
- commonsCli: "1.4",
- commonsCodec: "1.14",
+ commonsCli: "1.2",
+ commonsCodec: "1.6",
commonsCollections4: "4.1",
commonsCompress: "1.19",
commonsConfiguration: "1.10",
@@ -38,16 +38,18 @@ depVersions = [
curator: "5.1.0",
dockerJava: "3.2.5",
dropwizard: "3.2.5",
- errorprone: "2.1.2",
+ errorprone: "2.4.0",
freebuilder: "2.7.0",
+ googleHTTPClient: "1.34.0",
gradleTooling: "4.0.1",
grpc: "1.33.0",
groovy: "2.5.8",
- guava: "30.1-jre",
+ guava: "30.0-jre",
hamcrest: "1.3",
- hdrhistogram: "2.1.4",
+ hdrhistogram: "2.1.10",
httpclient: "4.5.13",
- jackson: "2.11.1",
+ jackson: "2.11.0",
+ javaxServlet: "4.0.0",
javaAnnotations:"1.3.2",
jcommander: "1.78",
jctools: "2.1.2",
@@ -66,19 +68,19 @@ depVersions = [
netty: "4.1.68.Final",
nettyTcnativeBoringSsl: "2.0.42.Final",
powermock: "2.0.2",
- prometheus: "0.0.21",
+ prometheus: "0.8.1",
protobuf: "3.14.0",
reflections: "0.9.11",
rocksDb: "6.22.1.1",
- slf4j: "1.7.30",
- snakeyaml: "1.27",
+ slf4j: "1.7.32",
+ snakeyaml: "1.19",
spotbugsAnnotations: "3.1.8",
protocGenGrpcJava: "1.12.0",
shrinkwrap:"3.1.4",
- snappy: "1.1.7.7",
+ snappy: "1.1.7",
thrift: "0.14.2",
testcontainers: "1.15.1",
- vertx: "3.9.2",
+ vertx: "3.9.8",
yahooDatasketches: "0.8.3",
zookeeper: "3.6.2",
]
@@ -99,25 +101,57 @@ depLibs = [
commonsLang2: "commons-lang:commons-lang:${depVersions.commonsLang2}",
commonsLang3:
"org.apache.commons:commons-lang3:${depVersions.commonsLang3}",
commonsBeanutils:
"commons-beanutils:commons-beanutils:${depVersions.commonsBeanutils}",
- curatorFramework:
"org.apache.curator:curator-framework:${depVersions.curator}",
- curatorRecipes:
"org.apache.curator:curator-recipes:${depVersions.curator}",
+ curatorFramework:
dependencies.create("org.apache.curator:curator-framework:${depVersions.curator}")
{
+ exclude group: 'com.google.code.findbugs', module: 'jsr305'
+ exclude group: 'io.netty', module: 'netty-transport-native-epoll'
+ exclude group: 'log4j', module: 'log4j'
+ },
+
+ curatorRecipes:
dependencies.create("org.apache.curator:curator-recipes:${depVersions.curator}")
{
+ exclude group: 'org.apache.curator', module: 'curator-framework'
+ },
dockerJava: "com.github.docker-java:docker-java:${depVersions.dockerJava}",
errorprone:
"com.google.errorprone:error_prone_annotations:${depVersions.errorprone}",
freebuilder: "org.inferred:freebuilder:${depVersions.freebuilder}",
+ googleHTTPClient:
dependencies.create("com.google.http-client:google-http-client:${depVersions.googleHTTPClient}")
{
+ exclude group: 'com.google.code.findbugs', module: 'jsr305'
+ exclude group: 'commons-codec', module: 'commons-codec'
+ exclude group: 'commons-logging', module: 'commons-logging'
+ exclude group: 'org.apache.httpcomponents', module: 'httpcore'
+ exclude group: 'org.apache.httpcomponents', module: 'httpclient'
+ },
gradleTooling:
"org.gradle:gradle-tooling-api:${depVersions.gradleTooling}",
- grpc: "io.grpc:grpc-all:${depVersions.grpc}",
+ grpc: dependencies.create("io.grpc:grpc-all:${depVersions.grpc}") {
+ exclude group: 'com.google.http-client', module: 'google-http-client'
+ exclude group: 'com.squareup.okhttp', module: 'okhttp'
+ exclude group: 'com.squareup.okio', module: 'okio'
+ exclude group: 'com.google.code.findbugs', module: 'jsr305'
+ exclude group: 'io.grpc', module: 'grpc-netty-shaded'
+ exclude group: 'io.grpc', module: 'grpc-okhttp'
+ exclude group: 'junit', module: 'junit'
+ exclude group: 'org.bouncycastle', module: 'bcpkix-jdk15on'
+ exclude group: 'org.codehaus.mojo', module:
'animal-sniffer-annotations'
+ },
groovy: "org.codehaus.groovy:groovy-all:${depVersions.groovy}",
- guava: "com.google.guava:guava:${depVersions.guava}",
+ guava: dependencies.create("com.google.guava:guava:${depVersions.guava}"){
+ exclude group: 'com.google.code.findbugs', module: 'jsr305'
+ },
hdrHistogram: "org.hdrhistogram:HdrHistogram:${depVersions.hdrhistogram}",
hamcrest: "org.hamcrest:hamcrest-all:${depVersions.hamcrest}",
- httpclient:
"org.apache.httpcomponents:httpclient:${depVersions.httpclient}",
+ httpclient:
dependencies.create("org.apache.httpcomponents:httpclient:${depVersions.httpclient}")
{
+ exclude group: 'commons-codec', module: 'commons-codec'
+ exclude group: 'commons-logging', module: 'commons-logging'
+ },
jacksonAnnotations:
"com.fasterxml.jackson.core:jackson-annotations:${depVersions.jackson}",
javaAnnotations:
"javax.annotation:javax.annotation-api:${depVersions.javaAnnotations}",
jacksonCore:
"com.fasterxml.jackson.core:jackson-core:${depVersions.jackson}",
jacksonDatabind:
"com.fasterxml.jackson.core:jackson-databind:${depVersions.jackson}",
+ javaxServlet:
"javax.servlet:javax.servlet-api:${depVersions.javaxServlet}",
jcommander: "com.beust:jcommander:${depVersions.jcommander}",
jctools: "org.jctools:jctools-core:${depVersions.jctools}",
- jettyServlet: "org.eclipse.jetty:jetty-servlet:${depVersions.jetty}",
+ jettyServlet:
dependencies.create("org.eclipse.jetty:jetty-servlet:${depVersions.jetty}") {
+ exclude group: 'javax.servlet', module: 'javax.servlet-api'
+ },
jmock: "org.jmock:jmock:${depVersions.jmock}",
jmhCore: "org.openjdk.jmh:jmh-core:${depVersions.jmh}",
jmhGeneratorAnnprocess:
"org.openjdk.jmh:jmh-generator-annprocess:${depVersions.jmh}",
@@ -140,7 +174,12 @@ depLibs = [
nettyHandler: "io.netty:netty-handler:${depVersions.netty}",
nettyTcnativeBoringSsl:
"io.netty:netty-tcnative-boringssl-static:${depVersions.nettyTcnativeBoringSsl}",
nettyTransport: "io.netty:netty-transport:${depVersions.netty}",
- nettyTransportNativeEpoll:
"io.netty:netty-transport-native-epoll:${depVersions.netty}",
+ nettyTransportNativeEpoll:
"io.netty:netty-transport-native-epoll:${depVersions.netty}:linux-x86_64",
+ nettyProxy: "io.netty:netty-handler-proxy:${depVersions.netty}",
+ nettyCodecHTTP: "io.netty:netty-codec-http:${depVersions.netty}",
+ nettyCodecHTTP2: "io.netty:netty-codec-http2:${depVersions.netty}",
+ nettyResolver: "io.netty:netty-resolver:${depVersions.netty}",
+ nettyResolverDNS: "io.netty:netty-resolver-dns:${depVersions.netty}",
powermockJunit:
"org.powermock:powermock-module-junit4:${depVersions.powermock}",
powermockMockito:
"org.powermock:powermock-api-mockito2:${depVersions.powermock}",
prometheusSimpleClient:
"io.prometheus:simpleclient:${depVersions.prometheus}",
@@ -157,15 +196,34 @@ depLibs = [
shrinkwrapApi:
"org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-api:${depVersions.shrinkwrap}",
snappy: "org.xerial.snappy:snappy-java:${depVersions.snappy}",
snakeyaml: "org.yaml:snakeyaml:${depVersions.snakeyaml}",
- spotbugsAnnotations:
"com.github.spotbugs:spotbugs-annotations:${depVersions.spotbugsAnnotations}",
+ spotbugsAnnotations:
dependencies.create("com.github.spotbugs:spotbugs-annotations:${depVersions.spotbugsAnnotations}")
{
+ exclude group: 'com.google.code.findbugs', module: 'jsr305'
+ },
thrift:
dependencies.create("org.apache.thrift:libthrift:${depVersions.thrift}") {
exclude group: 'org.apache.tomcat.embed', module: 'tomcat-embed-core'
exclude group: 'javax.annotation', module: 'javax.annotation-api'
+ exclude group: 'org.apache.httpcomponents', module: 'httpclient'
+ exclude group: 'org.apache.httpcomponents', module: 'httpcore'
+ exclude group: 'org.slf4j', module: 'slf4j-api'
},
testcontainers:
"org.testcontainers:testcontainers:${depVersions.testcontainers}",
- vertxCore: "io.vertx:vertx-core:${depVersions.vertx}",
- vertxWeb: "io.vertx:vertx-web:${depVersions.vertx}",
+ vertxCore: dependencies.create("io.vertx:vertx-core:${depVersions.vertx}")
{
+ exclude group: 'com.fasterxml.jackson.core', module:
'jackson-annotations'
+ exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
+ exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
+ exclude group: 'io.netty'
+ },
+ vertxWeb: dependencies.create("io.vertx:vertx-web:${depVersions.vertx}") {
+ exclude group: 'com.fasterxml.jackson.core', module:
'jackson-annotations'
+ exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
+ exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
+ exclude group: 'io.netty'
+ },
yahooDatasketches:
"com.yahoo.datasketches:sketches-core:${depVersions.yahooDatasketches}",
- zookeeper: "org.apache.zookeeper:zookeeper:${depVersions.zookeeper}",
+ zookeeper:
dependencies.create("org.apache.zookeeper:zookeeper:${depVersions.zookeeper}") {
+ exclude group: 'io.netty', module: 'netty-transport-native-epoll'
+ exclude group: 'log4j', module: 'log4j'
+ exclude group: 'org.slf4j', module: 'slf4j-log4j12'
+ },
zookeeperTest:
"org.apache.zookeeper:zookeeper:${depVersions.zookeeper}:tests"
]
diff --git a/dev/check-all-licenses-gradle b/dev/check-all-licenses-gradle
new file mode 100755
index 0000000..03eeb51
--- /dev/null
+++ b/dev/check-all-licenses-gradle
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Script to check licenses on a binary tarball.
+# It extracts the list of bundled jars, the NOTICE, and the LICENSE
+# files. It checked that every non-bk jar bundled is mentioned in the
+# LICENSE file. It checked that all jar files mentioned in NOTICE and
+# LICENSE are actually bundled.
+
+# all error fatal
+set -e -x
+
+HERE=$(dirname $0)
+BOOKKEEPER_DIST=$HERE/../bookkeeper-dist
+$HERE/check-binary-license
$BOOKKEEPER_DIST/server/build/distributions/bookkeeper-server-*.tar.gz
+$HERE/check-binary-license
$BOOKKEEPER_DIST/all/build/distributions/bookkeeper-all-*.tar.gz
+$HERE/check-binary-license
$BOOKKEEPER_DIST/bkctl/build/distributions/bkctl-*.tar.gz
+
diff --git a/dev/check-binary-license b/dev/check-binary-license
index 9d26d6e..5abc5b1 100755
--- a/dev/check-binary-license
+++ b/dev/check-binary-license
@@ -43,7 +43,6 @@ LICENSEPATH=$(${TAR} -tf $TARBALL | awk '/^[^\/]*\/LICENSE/')
LICENSE=$(${TAR} -O -xf $TARBALL "$LICENSEPATH")
NOTICEPATH=$(${TAR} -tf $TARBALL | awk '/^[^\/]*\/NOTICE/')
NOTICE=$(${TAR} -O -xf $TARBALL $NOTICEPATH)
-
LICENSEJARS=$(echo "$LICENSE" | sed -nE 's!.*lib/(.*\.jar).*!\1!gp')
NOTICEJARS=$(echo "$NOTICE" | sed -nE 's!.*lib/(.*\.jar).*!\1!gp')
@@ -70,6 +69,21 @@ for J in $JARS; do
continue
fi
+ echo $J | grep -q "bookkeeper-dist-server"
+ if [ $? == 0 ]; then
+ continue
+ fi
+
+ echo $J | grep -q "bookkeeper-dist-all"
+ if [ $? == 0 ]; then
+ continue
+ fi
+
+ echo $J | grep -q "bookkeeper-dist-bkctl"
+ if [ $? == 0 ]; then
+ continue
+ fi
+
echo "$LICENSE" | grep -q $J
if [ $? != 0 ]; then
echo $J unaccounted for in LICENSE
diff --git a/microbenchmarks/build.gradle b/microbenchmarks/build.gradle
index cbb2107..897cfb3 100644
--- a/microbenchmarks/build.gradle
+++ b/microbenchmarks/build.gradle
@@ -21,12 +21,12 @@ plugins {
}
dependencies {
- compileOnly project(":bookkeeper-common")
- compileOnly project(":bookkeeper-server")
- compileOnly
project(":bookkeeper-stats-providers:codahale-metrics-provider")
- compileOnly
project(":bookkeeper-stats-providers:prometheus-metrics-provider")
- compileOnly project(":bookkeeper-stats")
- compileOnly project(":bookkeeper-proto")
+ implementation
project(":bookkeeper-stats-providers:codahale-metrics-provider")
+ implementation
project(":bookkeeper-stats-providers:prometheus-metrics-provider")
+ implementation project(":bookkeeper-common")
+ implementation project(":bookkeeper-server")
+ implementation project(":bookkeeper-stats")
+ implementation project(":bookkeeper-proto")
compileOnly depLibs.metricsCore
compileOnly depLibs.protobuf
compileOnly depLibs.nettyBuffer
diff --git a/stats/utils/build.gradle b/stats/utils/build.gradle
index 39ff187..1c40b10 100644
--- a/stats/utils/build.gradle
+++ b/stats/utils/build.gradle
@@ -33,10 +33,9 @@ dependencies {
implementation depLibs.jacksonAnnotations
implementation depLibs.jcommander
implementation depLibs.reflections
- implementation depLibs.log4j12api
+ implementation depLibs.slf4j
implementation depLibs.snakeyaml
-
testCompileOnly depLibs.lombok
diff --git a/stream/api/build.gradle b/stream/api/build.gradle
index ad9eaa5..85bb55e 100644
--- a/stream/api/build.gradle
+++ b/stream/api/build.gradle
@@ -21,7 +21,7 @@ dependencies {
implementation project(':stream:common')
implementation depLibs.guava
- implementation depLibs.lombok
+ compileOnly depLibs.lombok
implementation depLibs.nettyBuffer
implementation depLibs.nettyCommon
diff --git a/stream/clients/java/all/build.gradle
b/stream/clients/java/all/build.gradle
index 54c47ed..183ce38 100644
--- a/stream/clients/java/all/build.gradle
+++ b/stream/clients/java/all/build.gradle
@@ -25,13 +25,15 @@ dependencies {
implementation project(':stream:proto')
implementation depLibs.grpc
- implementation depLibs.lombok
+ runtimeOnly depLibs.googleHTTPClient
+ compileOnly depLibs.lombok
implementation depLibs.slf4j
testImplementation project(path: ':stream:clients:java:base',
configuration: 'testArtifacts')
testImplementation depLibs.mockito
testImplementation depLibs.powermockJunit
testImplementation depLibs.powermockMockito
+ testImplementation depLibs.lombok
annotationProcessor depLibs.lombok
}
diff --git a/stream/clients/java/base/build.gradle
b/stream/clients/java/base/build.gradle
index f0251c3..0c1082b 100644
--- a/stream/clients/java/base/build.gradle
+++ b/stream/clients/java/base/build.gradle
@@ -23,13 +23,18 @@ dependencies {
implementation project(':stream:proto')
implementation depLibs.commonsLang2
- compileOnly depLibs.freebuilder
+ implementation depLibs.freebuilder
+ compileOnly depLibs.jsr305
implementation depLibs.grpc
- implementation depLibs.lombok
+ runtimeOnly depLibs.googleHTTPClient
+ compileOnly depLibs.lombok
implementation depLibs.slf4j
testImplementation depLibs.mockito
+ testImplementation depLibs.freebuilder
+ testImplementation depLibs.junit
+ testImplementation depLibs.lombok
annotationProcessor depLibs.freebuilder
annotationProcessor depLibs.lombok
}
@@ -38,6 +43,10 @@ configurations {
testCompile.exclude group:'io.grpc', module: 'grpc-netty-shaded'
}
+jar {
+ archiveBaseName = 'stream-storage-java-client-base'
+}
+
publishing {
publications {
maven(MavenPublication) {
diff --git a/stream/clients/java/kv/build.gradle
b/stream/clients/java/kv/build.gradle
index e268ae5..3df6167 100644
--- a/stream/clients/java/kv/build.gradle
+++ b/stream/clients/java/kv/build.gradle
@@ -23,14 +23,16 @@ dependencies {
implementation project(':stream:common')
implementation project(':stream:proto')
implementation depLibs.grpc
+ runtimeOnly depLibs.googleHTTPClient
implementation depLibs.guava
- implementation depLibs.lombok
+ compileOnly depLibs.lombok
implementation depLibs.nettyBuffer
implementation depLibs.protobuf
implementation depLibs.slf4j
-
+ compileOnly depLibs.jsr305
testImplementation project(path: ':stream:clients:java:base',
configuration: 'testArtifacts')
testImplementation depLibs.mockito
-
+ testImplementation depLibs.junit
+ testImplementation depLibs.lombok
annotationProcessor depLibs.lombok
}
diff --git a/stream/common/build.gradle b/stream/common/build.gradle
index cbd0406..dee5517 100644
--- a/stream/common/build.gradle
+++ b/stream/common/build.gradle
@@ -16,17 +16,26 @@
* specific language governing permissions and limitations
* under the License.
*/
+
+plugins {
+ id 'com.adarshr.test-logger'
+ id 'org.gradle.test-retry'
+}
+
dependencies {
implementation project(':bookkeeper-common')
implementation project(':bookkeeper-stats')
implementation depLibs.grpc
+ runtimeOnly depLibs.googleHTTPClient
implementation depLibs.guava
- implementation depLibs.jsr305
- implementation depLibs.lombok
+ compileOnly depLibs.jsr305
+ compileOnly depLibs.lombok
implementation depLibs.slf4j
+ testImplementation depLibs.junit
testImplementation depLibs.mockito
testImplementation project(':stream:tests-common')
testImplementation project(path: ':bookkeeper-common', configuration:
'testArtifacts')
+ testImplementation depLibs.lombok
annotationProcessor depLibs.lombok
testAnnotationProcessor depLibs.lombok
}
@@ -42,3 +51,13 @@ publishing {
}
}
}
+
+test {
+ retry {
+ maxFailures = 10
+ maxRetries = 2
+ }
+
+ maxHeapSize = '2G'
+ forkEvery = 1
+}
\ No newline at end of file
diff --git a/stream/distributedlog/common/build.gradle
b/stream/distributedlog/common/build.gradle
index c2c285d..ed4f74e 100644
--- a/stream/distributedlog/common/build.gradle
+++ b/stream/distributedlog/common/build.gradle
@@ -16,6 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
+
+plugins {
+ id 'com.adarshr.test-logger'
+ id 'org.gradle.test-retry'
+}
+
dependencies {
compileOnly depLibs.lombok
@@ -25,7 +31,7 @@ dependencies {
implementation depLibs.commonsConfiguration
implementation depLibs.commonsLang3
implementation depLibs.guava
- implementation depLibs.jsr305
+ compileOnly depLibs.jsr305
implementation depLibs.lz4
implementation depLibs.nettyBuffer
implementation depLibs.slf4j
@@ -36,6 +42,10 @@ dependencies {
annotationProcessor depLibs.lombok
}
+jar {
+ archiveBaseName = 'distributedlog-common'
+}
+
publishing {
publications {
maven(MavenPublication) {
@@ -44,3 +54,13 @@ publishing {
}
}
}
+
+test {
+ retry {
+ maxFailures = 20
+ maxRetries = 2
+ }
+
+ maxHeapSize = '2G'
+ forkEvery = 1
+}
\ No newline at end of file
diff --git a/stream/distributedlog/core/build.gradle
b/stream/distributedlog/core/build.gradle
index ca73937..a3ee41b 100644
--- a/stream/distributedlog/core/build.gradle
+++ b/stream/distributedlog/core/build.gradle
@@ -18,6 +18,8 @@
*/
plugins {
id 'java'
+ id 'com.adarshr.test-logger'
+ id 'org.gradle.test-retry'
}
dependencies {
@@ -32,30 +34,36 @@ dependencies {
implementation depLibs.commonsIO
implementation depLibs.commonsLang3
implementation depLibs.guava
- implementation depLibs.jsr305
- implementation depLibs.lombok
+ compileOnly depLibs.jsr305
+ compileOnly depLibs.lombok
implementation depLibs.nettyBuffer
implementation depLibs.nettyTransportNativeEpoll
implementation depLibs.slf4j
implementation depLibs.thrift
+ runtimeOnly depLibs.httpclient
implementation depLibs.zookeeper
testRuntimeOnly depLibs.metricsCore
testRuntimeOnly depLibs.snappy
- testRuntimeOnly depLibs.commonsBeanutils
-
testImplementation project(path: ':bookkeeper-common', configuration:
'testArtifacts')
testImplementation project(path: ':stream:distributedlog:common',
configuration: 'testArtifacts')
testImplementation depLibs.junit
testImplementation depLibs.mockito
- implementation depLibs.javaAnnotations
+ testImplementation depLibs.lombok
+ testCompileOnly depLibs.jsr305
+ compileOnly depLibs.javaAnnotations
annotationProcessor depLibs.lombok
testAnnotationProcessor depLibs.lombok
}
test {
+ retry {
+ maxFailures = 20
+ maxRetries = 2
+ }
+
maxHeapSize = '4G'
forkEvery = 1
}
@@ -65,6 +73,10 @@ test.doFirst {
"-Djava.net.preferIPv4Stack=true",
"-Dio.netty.leakDetection.level=paranoid")
}
+jar {
+ archiveBaseName = 'distributedlog-core'
+}
+
publishing {
publications {
maven(MavenPublication) {
diff --git a/stream/distributedlog/protocol/build.gradle
b/stream/distributedlog/protocol/build.gradle
index 7e93bb3..532d41f 100644
--- a/stream/distributedlog/protocol/build.gradle
+++ b/stream/distributedlog/protocol/build.gradle
@@ -16,21 +16,31 @@
* specific language governing permissions and limitations
* under the License.
*/
+
+plugins {
+ id 'com.adarshr.test-logger'
+ id 'org.gradle.test-retry'
+}
+
dependencies {
implementation project(':stream:distributedlog:common')
implementation depLibs.commonsCodec
implementation depLibs.guava
- implementation depLibs.jsr305
- implementation depLibs.lombok
+ compileOnly depLibs.jsr305
+ compileOnly depLibs.lombok
implementation depLibs.nettyBuffer
implementation depLibs.slf4j
testImplementation project(':bookkeeper-common')
testImplementation depLibs.junit
-
+ testImplementation depLibs.lombok
annotationProcessor depLibs.lombok
}
+jar {
+ archiveBaseName = 'distributedlog-protocol'
+}
+
publishing {
publications {
maven(MavenPublication) {
@@ -39,3 +49,13 @@ publishing {
}
}
}
+
+test {
+ retry {
+ maxFailures = 20
+ maxRetries = 3
+ }
+
+ maxHeapSize = '2G'
+ forkEvery = 1
+}
\ No newline at end of file
diff --git a/stream/proto/build.gradle b/stream/proto/build.gradle
index cc27288..d492592 100644
--- a/stream/proto/build.gradle
+++ b/stream/proto/build.gradle
@@ -18,15 +18,18 @@
*/
plugins {
id 'com.google.protobuf'
+ id 'com.adarshr.test-logger'
}
dependencies {
implementation project(':stream:common')
- implementation depLibs.lombok
+ compileOnly depLibs.lombok
implementation depLibs.grpc
+ runtimeOnly depLibs.googleHTTPClient
implementation depLibs.commonsLang3
- implementation depLibs.javaAnnotations
-
+ compileOnly depLibs.jsr305
+ testImplementation depLibs.junit
+ compileOnly depLibs.javaAnnotations
annotationProcessor depLibs.lombok
}
@@ -48,6 +51,10 @@ protobuf {
}
}
+jar {
+ archiveBaseName = 'stream-storage-proto'
+}
+
publishing {
publications {
maven(MavenPublication) {
diff --git a/stream/server/build.gradle b/stream/server/build.gradle
index 76f966a..944277d 100644
--- a/stream/server/build.gradle
+++ b/stream/server/build.gradle
@@ -19,6 +19,13 @@
plugins {
id 'application'
id 'distribution'
+ id 'com.adarshr.test-logger'
+}
+
+configurations {
+ runtimeClasspath {
+ resolutionStrategy.force depLibs.jacksonAnnotations
+ }
}
dependencies {
@@ -44,18 +51,19 @@ dependencies {
implementation depLibs.commonsLang3
implementation depLibs.curatorFramework
implementation depLibs.grpc
+ runtimeOnly depLibs.googleHTTPClient
implementation depLibs.guava
implementation depLibs.jcommander
- implementation depLibs.lombok
+ compileOnly depLibs.lombok
implementation depLibs.zookeeper
- runtimeOnly depLibs.metricsCore
- runtimeOnly depLibs.snappy
- runtimeOnly depLibs.log4j12api
- runtimeOnly depLibs.commonsBeanutils
- runtimeOnly depLibs.vertxCore
- runtimeOnly depLibs.vertxWeb
+ implementation depLibs.metricsCore
+ implementation depLibs.snappy
+ implementation depLibs.log4j12api
+ implementation depLibs.vertxCore
+ implementation depLibs.vertxWeb
testImplementation depLibs.mockito
- implementation depLibs.javaAnnotations
+ testImplementation depLibs.junit
+ compileOnly depLibs.javaAnnotations
annotationProcessor depLibs.lombok
}
@@ -69,6 +77,10 @@ task writeClasspath {
new File(buildDir, "classpath.txt").text =
sourceSets.main.runtimeClasspath.collect { it.absolutePath }.join(':') + "\n"
}
+jar {
+ archiveBaseName = 'stream-storage-server'
+}
+
publishing {
publications {
maven(MavenPublication) {
diff --git a/stream/statelib/build.gradle b/stream/statelib/build.gradle
index d2d9832..9878cf8 100644
--- a/stream/statelib/build.gradle
+++ b/stream/statelib/build.gradle
@@ -18,6 +18,8 @@
*/
plugins {
id 'com.google.protobuf'
+ id 'com.adarshr.test-logger'
+ id 'org.gradle.test-retry'
}
dependencies {
@@ -32,8 +34,8 @@ dependencies {
implementation depLibs.commonsLang2
implementation depLibs.commonsLang3
implementation depLibs.guava
- implementation depLibs.jsr305
- implementation depLibs.lombok
+ compileOnly depLibs.jsr305
+ compileOnly depLibs.lombok
implementation depLibs.nettyBuffer
implementation depLibs.nettyCommon
implementation depLibs.protobuf
@@ -47,7 +49,7 @@ dependencies {
testImplementation depLibs.metricsCore
testImplementation depLibs.snappy
testImplementation depLibs.slf4jSimple
- runtimeOnly depLibs.commonsBeanutils
+ testImplementation depLibs.lombok
testImplementation project(path: ':stream:distributedlog:core',
configuration: 'testArtifacts')
annotationProcessor depLibs.lombok
@@ -73,6 +75,11 @@ protobuf {
}
test {
+ retry {
+ maxFailures = 200
+ maxRetries = 5
+ }
+
maxHeapSize = '2G'
forkEvery = 1
}
diff --git a/stream/storage/api/build.gradle b/stream/storage/api/build.gradle
index b4ff1ff..24d41af 100644
--- a/stream/storage/api/build.gradle
+++ b/stream/storage/api/build.gradle
@@ -16,12 +16,19 @@
* specific language governing permissions and limitations
* under the License.
*/
+plugins {
+ id 'java'
+ id 'com.adarshr.test-logger'
+}
+
dependencies {
implementation project(':bookkeeper-common')
implementation project(':stream:common')
implementation project(':stream:proto')
implementation depLibs.commonsConfiguration
implementation depLibs.grpc
+ runtimeOnly depLibs.googleHTTPClient
+ testImplementation depLibs.junit
}
jar {
diff --git a/stream/storage/impl/build.gradle b/stream/storage/impl/build.gradle
index 231abe2..0e00a3e 100644
--- a/stream/storage/impl/build.gradle
+++ b/stream/storage/impl/build.gradle
@@ -16,6 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
+
+plugins {
+ id 'java'
+ id 'com.adarshr.test-logger'
+}
+
dependencies {
implementation project(':bookkeeper-common')
implementation project(':bookkeeper-server')
@@ -32,22 +38,31 @@ dependencies {
implementation depLibs.commonsConfiguration
implementation depLibs.commonsLang3
implementation depLibs.curatorRecipes
+ implementation depLibs.curatorFramework
implementation depLibs.grpc
+ runtimeOnly depLibs.googleHTTPClient
implementation depLibs.guava
- implementation depLibs.lombok
+ compileOnly depLibs.lombok
implementation depLibs.slf4j
-
+ compileOnly depLibs.jsr305
testImplementation project(':stream:distributedlog:common')
testImplementation project(':stream:distributedlog:protocol')
testImplementation project(path: ':bookkeeper-common', configuration:
'testArtifacts')
testImplementation project(path: ':stream:clients:java:base',
configuration: 'testArtifacts')
testImplementation project(path: ':stream:distributedlog:core',
configuration: 'testArtifacts')
testImplementation depLibs.mockito
-
+ testImplementation depLibs.junit
+ testImplementation depLibs.lombok
+ testImplementation depLibs.metricsCore
+ testImplementation depLibs.snappy
annotationProcessor depLibs.lombok
testAnnotationProcessor depLibs.lombok
}
+jar {
+ archiveBaseName = 'stream-storage-service-impl'
+}
+
publishing {
publications {
maven(MavenPublication) {
diff --git a/stream/tests-common/build.gradle b/stream/tests-common/build.gradle
index 5259cd6..5de37a7 100644
--- a/stream/tests-common/build.gradle
+++ b/stream/tests-common/build.gradle
@@ -22,11 +22,12 @@ plugins {
dependencies {
implementation depLibs.grpc
- implementation depLibs.lombok
+ testImplementation depLibs.googleHTTPClient
+ compileOnly depLibs.lombok
implementation depLibs.slf4j
-
+ compileOnly depLibs.jsr305
annotationProcessor depLibs.lombok
- implementation depLibs.javaAnnotations
+ compileOnly depLibs.javaAnnotations
}
protobuf {
diff --git a/tests/docker-images/statestore-image/Dockerfile
b/tests/docker-images/statestore-image/Dockerfile
index 15cfa9c..0c8098a 100644
--- a/tests/docker-images/statestore-image/Dockerfile
+++ b/tests/docker-images/statestore-image/Dockerfile
@@ -46,7 +46,7 @@ RUN mkdir /opt/bookkeeper/conf
RUN mkdir /opt/bookkeeper/scripts
### -----Copy Jars------###
-ADD ./dist/server.tar /opt/
+ADD ./dist/server.tar.gz /opt/
RUN mv /opt/server/lib/*.jar /opt/bookkeeper/lib/
### --------------------###
diff --git a/tests/docker-images/statestore-image/image_builder.sh
b/tests/docker-images/statestore-image/image_builder.sh
index 91513bc..6cc6cde 100755
--- a/tests/docker-images/statestore-image/image_builder.sh
+++ b/tests/docker-images/statestore-image/image_builder.sh
@@ -27,7 +27,7 @@ mkdir
"${BASE_DIR}"/tests/docker-images/statestore-image/scripts
mkdir "${BASE_DIR}"/tests/docker-images/statestore-image/temp_conf
mkdir "${BASE_DIR}"/tests/docker-images/statestore-image/temp_bin
-cp "${BASE_DIR}"/stream/server/build/distributions/server.tar
"${BASE_DIR}"/tests/docker-images/statestore-image/dist
+cp "${BASE_DIR}"/stream/server/build/distributions/server.tar.gz
"${BASE_DIR}"/tests/docker-images/statestore-image/dist
cp "${BASE_DIR}"/docker/scripts/*
"${BASE_DIR}"/tests/docker-images/statestore-image/scripts
cp "${BASE_DIR}"/conf/*
"${BASE_DIR}"/tests/docker-images/statestore-image/temp_conf
cp "${BASE_DIR}"/bin/*
"${BASE_DIR}"/tests/docker-images/statestore-image/temp_bin
diff --git a/tests/integration-tests-topologies/build.gradle
b/tests/integration-tests-topologies/build.gradle
index a97b034..f26f690 100644
--- a/tests/integration-tests-topologies/build.gradle
+++ b/tests/integration-tests-topologies/build.gradle
@@ -20,7 +20,7 @@ dependencies {
implementation project(':tests:integration-tests-utils')
implementation depLibs.testcontainers
implementation depLibs.junit
- implementation depLibs.lombok
+ compileOnly depLibs.lombok
implementation depLibs.slf4j
implementation depLibs.guava
implementation depLibs.commonsLang2
diff --git a/tests/integration-tests-utils/build.gradle
b/tests/integration-tests-utils/build.gradle
index 9940ff9..649421e 100644
--- a/tests/integration-tests-utils/build.gradle
+++ b/tests/integration-tests-utils/build.gradle
@@ -20,7 +20,7 @@ dependencies {
implementation depLibs.arquillianCubeDocker
implementation depLibs.zookeeper
implementation depLibs.junit
- implementation depLibs.lombok
+ compileOnly depLibs.lombok
implementation depLibs.slf4j
implementation depLibs.groovy
implementation depLibs.shrinkwrapImpl
diff --git a/tests/integration/cluster/build.gradle
b/tests/integration/cluster/build.gradle
index 16e8fe6..4eafefd 100644
--- a/tests/integration/cluster/build.gradle
+++ b/tests/integration/cluster/build.gradle
@@ -18,7 +18,7 @@
*/
plugins {
id 'java'
- id 'com.adarshr.test-logger' version '2.0.0'
+ id 'com.adarshr.test-logger'
}
dependencies {
@@ -40,6 +40,7 @@ dependencies {
testImplementation depLibs.log4j12api
testImplementation depLibs.testcontainers
testImplementation depLibs.commonsConfiguration
+ testImplementation depLibs.googleHTTPClient
testAnnotationProcessor depLibs.lombok
}
diff --git a/tests/integration/smoke/build.gradle
b/tests/integration/smoke/build.gradle
index bf6a938..02ad13b 100644
--- a/tests/integration/smoke/build.gradle
+++ b/tests/integration/smoke/build.gradle
@@ -18,7 +18,7 @@
*/
plugins {
id 'java'
- id 'com.adarshr.test-logger' version '2.0.0'
+ id 'com.adarshr.test-logger'
}
dependencies {
diff --git a/tests/integration/standalone/build.gradle
b/tests/integration/standalone/build.gradle
index f8f0751..17044f7 100644
--- a/tests/integration/standalone/build.gradle
+++ b/tests/integration/standalone/build.gradle
@@ -18,7 +18,7 @@
*/
plugins {
id 'java'
- id 'com.adarshr.test-logger' version '2.0.0'
+ id 'com.adarshr.test-logger'
}
dependencies {
diff --git a/tools/all/build.gradle b/tools/all/build.gradle
index 5b667eb..7593b6a 100644
--- a/tools/all/build.gradle
+++ b/tools/all/build.gradle
@@ -26,7 +26,6 @@ dependencies {
implementation project(':bookkeeper-tools-ledger')
implementation project(':bookkeeper-tools-stream')
-
compileOnly depLibs.lombok
compileOnly depLibs.spotbugsAnnotations
diff --git a/tools/framework/build.gradle b/tools/framework/build.gradle
index c188a1c..ddf9c46 100644
--- a/tools/framework/build.gradle
+++ b/tools/framework/build.gradle
@@ -29,10 +29,17 @@ dependencies {
implementation depLibs.jcommander
implementation depLibs.slf4j
testImplementation depLibs.junit
-
annotationProcessor depLibs.lombok
}
jar {
archiveBaseName = 'bookkeeper-tools-framework'
+}
+
+publishing {
+ publications {
+ maven(MavenPublication) {
+ artifactId = 'bookkeeper-tools-framework'
+ }
+ }
}
\ No newline at end of file
diff --git a/tools/ledger/build.gradle b/tools/ledger/build.gradle
index 23334dd..149f36e 100644
--- a/tools/ledger/build.gradle
+++ b/tools/ledger/build.gradle
@@ -18,6 +18,7 @@
*/
plugins {
id 'java'
+ id 'com.adarshr.test-logger'
}
dependencies {
@@ -33,7 +34,9 @@ dependencies {
implementation depLibs.jcommander
implementation depLibs.slf4j
implementation depLibs.zookeeper
-
+ implementation depLibs.nettyCodecHTTP2
+ implementation depLibs.nettyCodecHTTP
+ implementation depLibs.nettyProxy
testImplementation project(":bookkeeper-stats")
testCompileOnly depLibs.lombok
testImplementation depLibs.junit
diff --git
a/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/helpers/CookieCommandTestBase.java
b/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/helpers/CookieCommandTestBase.java
index f6f66b6..45d7d8b 100644
---
a/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/helpers/CookieCommandTestBase.java
+++
b/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/helpers/CookieCommandTestBase.java
@@ -22,21 +22,17 @@ package org.apache.bookkeeper.tools.cli.helpers;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
-
import java.util.function.Function;
import org.apache.bookkeeper.conf.ServerConfiguration;
import org.apache.bookkeeper.discover.RegistrationManager;
import org.apache.bookkeeper.meta.MetadataDrivers;
import org.junit.Before;
-import org.junit.runner.RunWith;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
-import org.powermock.modules.junit4.PowerMockRunner;
/**
* A test base for testing cookie commands.
*/
-@RunWith(PowerMockRunner.class)
@PrepareForTest({ MetadataDrivers.class })
public class CookieCommandTestBase extends CommandTestBase {
diff --git a/tools/perf/build.gradle b/tools/perf/build.gradle
index b7d659e..1223e20 100644
--- a/tools/perf/build.gradle
+++ b/tools/perf/build.gradle
@@ -18,6 +18,7 @@
*/
plugins {
id 'java'
+ id 'com.adarshr.test-logger'
}
dependencies {
diff --git a/tools/stream/build.gradle b/tools/stream/build.gradle
index 223f27e..1a37921 100644
--- a/tools/stream/build.gradle
+++ b/tools/stream/build.gradle
@@ -18,6 +18,7 @@
*/
plugins {
id 'java'
+ id 'com.adarshr.test-logger'
}
dependencies {
@@ -53,3 +54,11 @@ dependencies {
jar {
archiveBaseName = 'stream-storage-cli'
}
+
+publishing {
+ publications {
+ maven(MavenPublication) {
+ artifactId = 'stream-storage-cli'
+ }
+ }
+}
\ No newline at end of file