You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by va...@apache.org on 2021/11/23 08:23:41 UTC

[bookkeeper] branch master updated: Fix the compatibility workflows (#2899)

This is an automated email from the ASF dual-hosted git repository.

vanlightly 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 b570107  Fix the compatibility workflows (#2899)
b570107 is described below

commit b57010737ef9a2c78daf5b19b17c075706eb3c21
Author: pradeepbn <pr...@gmail.com>
AuthorDate: Tue Nov 23 00:23:36 2021 -0800

    Fix the compatibility workflows (#2899)
    
    * Fix workflow yaml for compatibility tests
    
    * remove duplicate of com.google relocate in build.gradle
---
 .github/workflows/compatibility-check-java11.yml                   | 5 ++---
 .github/workflows/compatibility-check-java8.yml                    | 7 ++-----
 bookkeeper-benchmark/build.gradle                                  | 3 ++-
 build.gradle                                                       | 5 +++--
 shaded/distributedlog-core-shaded/build.gradle                     | 3 +--
 stream/bk-grpc-name-resolver/build.gradle                          | 2 ++
 tests/integration/cluster/build.gradle                             | 1 +
 .../bookkeeper/tests/shaded/DistributedLogCoreShadedJarTest.java   | 6 +++---
 8 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/.github/workflows/compatibility-check-java11.yml b/.github/workflows/compatibility-check-java11.yml
index 3f13068..a2cf5f3 100644
--- a/.github/workflows/compatibility-check-java11.yml
+++ b/.github/workflows/compatibility-check-java11.yml
@@ -46,6 +46,5 @@ jobs:
         with:
           java-version: 1.11
       - 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.*"
-
+        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="**/distributedlog/**, **/statelib/**, **/clients/**, **/*common/**, **/stream/**, **/stream/*bk*/**, **/*backward*/**"
diff --git a/.github/workflows/compatibility-check-java8.yml b/.github/workflows/compatibility-check-java8.yml
index 8caa43c..df68c5b 100644
--- a/.github/workflows/compatibility-check-java8.yml
+++ b/.github/workflows/compatibility-check-java8.yml
@@ -46,8 +46,5 @@ jobs:
         with:
           java-version: 1.8
       - 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.*"
+        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="**/distributedlog/**, **/statelib/**, **/clients/**, **/*common/**, **/stream/**, **/stream/*bk*/**, **/*backward*/**"
diff --git a/bookkeeper-benchmark/build.gradle b/bookkeeper-benchmark/build.gradle
index 6f428f6..3dec69e 100644
--- a/bookkeeper-benchmark/build.gradle
+++ b/bookkeeper-benchmark/build.gradle
@@ -42,6 +42,8 @@ dependencies {
     implementation depLibs.nettyTransportNativeEpoll
     implementation depLibs.zookeeper
     implementation depLibs.log4j12api
+    implementation depLibs.log4jCore
+    implementation depLibs.log4jSlf4jImpl
 
     testImplementation project(':bookkeeper-server')
     testImplementation project(path: ':bookkeeper-common', configuration: 'testArtifacts')
@@ -63,7 +65,6 @@ test {
         maxFailures = 10
         maxRetries = 3
     }
-
     maxHeapSize = '4G'
     forkEvery = 1
     jvmArgs("-Djunit.timeout.test=600000",
diff --git a/build.gradle b/build.gradle
index 1938184..9616493 100644
--- a/build.gradle
+++ b/build.gradle
@@ -212,12 +212,13 @@ allprojects {
                     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;
+                        String excludeStr = it.trim();
+                        exclude excludeStr
                     });
                 }
             }
diff --git a/shaded/distributedlog-core-shaded/build.gradle b/shaded/distributedlog-core-shaded/build.gradle
index 2bafc33..3223dd4 100644
--- a/shaded/distributedlog-core-shaded/build.gradle
+++ b/shaded/distributedlog-core-shaded/build.gradle
@@ -32,7 +32,6 @@ dependencies {
 shadowJar {
     dependencies {
     }
-    relocate 'com.google', 'org.apache.bookkeeper.shaded.com.google'
     relocate 'org.apache.commons.cli', 'dlshade.org.apache.commons.cli'
     relocate 'org.apache.commons.codec', 'dlshade.org.apache.commons.codec'
     relocate 'org.apache.commons.collections4', 'dlshade.org.apache.commons.collections4'
@@ -53,7 +52,7 @@ shadowJar {
     relocate 'org.rocksdb', 'dlshade.org.rocksdb'
     relocate 'com.scurrilous.circe', 'dlshade.com.scurrilous.circe'
     relocate 'org.apache.bookkeeper', 'dlshade.org.apache.bookkeeper'
-    relocate 'org.apache.distributedlog', 'dhshade.org.apache.distributedlog'
+    relocate 'org.apache.distributedlog', 'dlshade.org.apache.distributedlog'
     archiveBaseName.set("distributedlog-core-shaded")
     archiveClassifier.set("")
 }
diff --git a/stream/bk-grpc-name-resolver/build.gradle b/stream/bk-grpc-name-resolver/build.gradle
index 950bb61..488f32a 100644
--- a/stream/bk-grpc-name-resolver/build.gradle
+++ b/stream/bk-grpc-name-resolver/build.gradle
@@ -40,6 +40,8 @@ dependencies {
     testImplementation project(path: ':bookkeeper-server', configuration: 'testArtifacts')
     testImplementation depLibs.junit
     testImplementation depLibs.zookeeper
+    testImplementation depLibs.zookeeperTest
+    testImplementation depLibs.log4jSlf4jImpl
 
     testCompileOnly depLibs.lombok
     testAnnotationProcessor depLibs.lombok
diff --git a/tests/integration/cluster/build.gradle b/tests/integration/cluster/build.gradle
index 4eafefd..f29fedf 100644
--- a/tests/integration/cluster/build.gradle
+++ b/tests/integration/cluster/build.gradle
@@ -38,6 +38,7 @@ dependencies {
 
     testCompileOnly depLibs.lombok
     testImplementation depLibs.log4j12api
+    testImplementation depLibs.log4jCore
     testImplementation depLibs.testcontainers
     testImplementation depLibs.commonsConfiguration
     testImplementation depLibs.googleHTTPClient
diff --git a/tests/shaded/distributedlog-core-shaded-test/src/test/java/org/apache/bookkeeper/tests/shaded/DistributedLogCoreShadedJarTest.java b/tests/shaded/distributedlog-core-shaded-test/src/test/java/org/apache/bookkeeper/tests/shaded/DistributedLogCoreShadedJarTest.java
index 6432c30..2ce0410 100644
--- a/tests/shaded/distributedlog-core-shaded-test/src/test/java/org/apache/bookkeeper/tests/shaded/DistributedLogCoreShadedJarTest.java
+++ b/tests/shaded/distributedlog-core-shaded-test/src/test/java/org/apache/bookkeeper/tests/shaded/DistributedLogCoreShadedJarTest.java
@@ -119,19 +119,19 @@ public class DistributedLogCoreShadedJarTest {
 
     @Test
     public void testDistributedLogCommon() throws Exception {
-        Class.forName("org.apache.distributedlog.common.concurrent.AsyncSemaphore");
+        Class.forName("dlshade.org.apache.distributedlog.common.concurrent.AsyncSemaphore");
         assertTrue(true);
     }
 
     @Test
     public void testDistributedLogProto() throws Exception {
-        Class.forName("org.apache.distributedlog.DLSN");
+        Class.forName("dlshade.org.apache.distributedlog.DLSN");
         assertTrue(true);
     }
 
     @Test
     public void testDistributedLogCore() throws Exception {
-        Class.forName("org.apache.distributedlog.api.AsyncLogReader");
+        Class.forName("dlshade.org.apache.distributedlog.api.AsyncLogReader");
         assertTrue(true);
     }