You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by eo...@apache.org on 2022/04/29 16:10:48 UTC

[bookkeeper] branch master updated: Fix: shell tests are broken and not running on CI (#3251)

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

eolivelli 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 2a75296de9 Fix: shell tests are broken and not running on CI (#3251)
2a75296de9 is described below

commit 2a75296de96c08870b316b5ece639492b1f968a1
Author: Andrey Yegorov <86...@users.noreply.github.com>
AuthorDate: Fri Apr 29 09:10:42 2022 -0700

    Fix: shell tests are broken and not running on CI (#3251)
---
 .github/workflows/bookie-tests.yml                      |  3 +++
 conf/nettyenv.sh                                        |  5 -----
 tests/scripts/src/test/bash/bk_test_bin_common.sh       | 14 +++++++-------
 .../scripts/src/test/bash/gradle/bk_test_bin_common.sh  | 17 +++++++++--------
 4 files changed, 19 insertions(+), 20 deletions(-)

diff --git a/.github/workflows/bookie-tests.yml b/.github/workflows/bookie-tests.yml
index 58c32bf09e..5b2a40ee85 100644
--- a/.github/workflows/bookie-tests.yml
+++ b/.github/workflows/bookie-tests.yml
@@ -63,6 +63,9 @@ jobs:
       - name: Run bookie tests
         run: mvn -B -nsu -pl bookkeeper-server test -Dtest="org.apache.bookkeeper.bookie.*Test" -DfailIfNoTests=false -Dorg.slf4j.simpleLogger.defaultLogLevel=INFO
 
+      - name: Run shell tests
+        run: mvn -B -nsu -pl tests/scripts install -DfailIfNoTests=false -Dorg.slf4j.simpleLogger.defaultLogLevel=INFO
+
       - name: Aggregates all test reports to ./test-reports and ./surefire-reports directories If failure
         if: failure()
         continue-on-error: true
diff --git a/conf/nettyenv.sh b/conf/nettyenv.sh
index c4702b0237..fe07a09ff7 100644
--- a/conf/nettyenv.sh
+++ b/conf/nettyenv.sh
@@ -23,8 +23,3 @@
 # netty buffer leak detection level - {@link http://netty.io/wiki/reference-counted-objects.html#wiki-h3-11}
 # NETTY_LEAK_DETECTION_LEVEL=
 
-# netty recycler max capacity
-# NETTY_RECYCLER_MAXCAPACITY=
-
-# netty recycler link capacity
-# NETTY_RECYCLER_LINKCAPACITY=
diff --git a/tests/scripts/src/test/bash/bk_test_bin_common.sh b/tests/scripts/src/test/bash/bk_test_bin_common.sh
index d9efd9c435..17693b150f 100644
--- a/tests/scripts/src/test/bash/bk_test_bin_common.sh
+++ b/tests/scripts/src/test/bash/bk_test_bin_common.sh
@@ -33,8 +33,6 @@ testDefaultVariables() {
   assertEquals "BK_HOME is not set correctly" "${BK_HOMEDIR}" "${BK_HOME}"
   assertEquals "DEFAULT_LOG_CONF is not set correctly" "${BK_CONFDIR}/log4j2.xml" "${DEFAULT_LOG_CONF}"
   assertEquals "NETTY_LEAK_DETECTION_LEVEL is not set correctly" "disabled" "${NETTY_LEAK_DETECTION_LEVEL}"
-  assertEquals "NETTY_RECYCLER_MAXCAPACITY is not set correctly" "1000" "${NETTY_RECYCLER_MAXCAPACITY}"
-  assertEquals "NETTY_RECYCLER_LINKCAPACITY is not set correctly" "1024" "${NETTY_RECYCLER_LINKCAPACITY}"
   assertEquals "BOOKIE_MAX_HEAP_MEMORY is not set correctly" "1g" "${BOOKIE_MAX_HEAP_MEMORY}"
   assertEquals "BOOKIE_MIN_HEAP_MEMORY is not set correctly" "1g" "${BOOKIE_MIN_HEAP_MEMORY}"
   assertEquals "BOOKIE_MAX_DIRECT_MEMORY is not set correctly" "2g" "${BOOKIE_MAX_DIRECT_MEMORY}"
@@ -250,8 +248,8 @@ testBuildLoggingOpts() {
   TEST_LOG_APPENDER="TEST"
 
   EXPECTED_OPTS="-Dlog4j.configurationFile=${TEST_CONF_FILE} \
-    -Dbookkeeper.log.root.level=${TEST_LOGGER} \
-    -Dbookkeeper.log.root.appender=${TEST_LOG_DIR} \
+    -Dbookkeeper.log.root.level=${TEST_LOG_LEVEL} \
+    -Dbookkeeper.log.root.appender=${TEST_LOG_APPENDER} \
     -Dbookkeeper.log.dir=${TEST_LOG_DIR} \
     -Dbookkeeper.log.file=${TEST_LOG_FILE}"
   ACTUAL_OPTS=$(build_logging_opts ${TEST_CONF_FILE} ${TEST_LOG_LEVEL} ${TEST_LOG_APPENDER} ${TEST_LOG_DIR} ${TEST_LOG_FILE})
@@ -261,15 +259,17 @@ testBuildLoggingOpts() {
 
 testBuildCLILoggingOpts() {
   TEST_CONF_FILE="test.conf"
+  TEST_LOG_LEVEL="INFO"
+  TEST_LOG_APPENDER="TEST"
   TEST_LOG_DIR="test_log_dir"
   TEST_LOG_FILE="test_log_file"
-  TEST_LOGGER="INFO,TEST"
 
   EXPECTED_OPTS="-Dlog4j.configurationFile=${TEST_CONF_FILE} \
-    -Dbookkeeper.cli.root.logger=${TEST_LOGGER} \
+    -Dbookkeeper.cli.log.root.level=${TEST_LOG_LEVEL} \
+    -Dbookkeeper.cli.log.root.appender=${TEST_LOG_APPENDER} \
     -Dbookkeeper.cli.log.dir=${TEST_LOG_DIR} \
     -Dbookkeeper.cli.log.file=${TEST_LOG_FILE}"
-  ACTUAL_OPTS=$(build_cli_logging_opts ${TEST_CONF_FILE} ${TEST_LOG_DIR} ${TEST_LOG_FILE} ${TEST_LOGGER})
+  ACTUAL_OPTS=$(build_cli_logging_opts ${TEST_CONF_FILE} ${TEST_LOG_LEVEL} ${TEST_LOG_APPENDER} ${TEST_LOG_DIR} ${TEST_LOG_FILE})
 
   assertEquals "Logging OPTS is not set correctly" "${EXPECTED_OPTS}" "${ACTUAL_OPTS}"
 }
diff --git a/tests/scripts/src/test/bash/gradle/bk_test_bin_common.sh b/tests/scripts/src/test/bash/gradle/bk_test_bin_common.sh
index cd83b9fa1b..74efef69a7 100644
--- a/tests/scripts/src/test/bash/gradle/bk_test_bin_common.sh
+++ b/tests/scripts/src/test/bash/gradle/bk_test_bin_common.sh
@@ -32,8 +32,6 @@ testDefaultVariables() {
   assertEquals "BK_HOME is not set correctly" "${BK_HOMEDIR}" "${BK_HOME}"
   assertEquals "DEFAULT_LOG_CONF is not set correctly" "${BK_CONFDIR}/log4j2.xml" "${DEFAULT_LOG_CONF}"
   assertEquals "NETTY_LEAK_DETECTION_LEVEL is not set correctly" "disabled" "${NETTY_LEAK_DETECTION_LEVEL}"
-  assertEquals "NETTY_RECYCLER_MAXCAPACITY is not set correctly" "1000" "${NETTY_RECYCLER_MAXCAPACITY}"
-  assertEquals "NETTY_RECYCLER_LINKCAPACITY is not set correctly" "1024" "${NETTY_RECYCLER_LINKCAPACITY}"
   assertEquals "BOOKIE_MAX_HEAP_MEMORY is not set correctly" "1g" "${BOOKIE_MAX_HEAP_MEMORY}"
   assertEquals "BOOKIE_MIN_HEAP_MEMORY is not set correctly" "1g" "${BOOKIE_MIN_HEAP_MEMORY}"
   assertEquals "BOOKIE_MAX_DIRECT_MEMORY is not set correctly" "2g" "${BOOKIE_MAX_DIRECT_MEMORY}"
@@ -223,11 +221,12 @@ testBuildLoggingOpts() {
   TEST_CONF_FILE="test.conf"
   TEST_LOG_DIR="test_log_dir"
   TEST_LOG_FILE="test_log_file"
-  TEST_LOGGER="INFO,TEST"
+  TEST_LOG_LEVEL="INFO"
+  TEST_LOG_APPENDER="TEST"
 
   EXPECTED_OPTS="-Dlog4j.configurationFile=${TEST_CONF_FILE} \
-    -Dbookkeeper.log.root.level=${TEST_LOGGER} \
-    -Dbookkeeper.log.root.appender=${TEST_LOG_DIR} \
+    -Dbookkeeper.log.root.level=${TEST_LOG_LEVEL} \
+    -Dbookkeeper.log.root.appender=${TEST_LOG_APPENDER} \
     -Dbookkeeper.log.dir=${TEST_LOG_DIR} \
     -Dbookkeeper.log.file=${TEST_LOG_FILE}"
   ACTUAL_OPTS=$(build_logging_opts ${TEST_CONF_FILE} ${TEST_LOG_LEVEL} ${TEST_LOG_APPENDER} ${TEST_LOG_DIR} ${TEST_LOG_FILE})
@@ -237,15 +236,17 @@ testBuildLoggingOpts() {
 
 testBuildCLILoggingOpts() {
   TEST_CONF_FILE="test.conf"
+  TEST_LOG_LEVEL="INFO"
+  TEST_LOG_APPENDER="TEST"
   TEST_LOG_DIR="test_log_dir"
   TEST_LOG_FILE="test_log_file"
-  TEST_LOGGER="INFO,TEST"
 
   EXPECTED_OPTS="-Dlog4j.configurationFile=${TEST_CONF_FILE} \
-    -Dbookkeeper.cli.root.logger=${TEST_LOGGER} \
+    -Dbookkeeper.cli.log.root.level=${TEST_LOG_LEVEL} \
+    -Dbookkeeper.cli.log.root.appender=${TEST_LOG_APPENDER} \
     -Dbookkeeper.cli.log.dir=${TEST_LOG_DIR} \
     -Dbookkeeper.cli.log.file=${TEST_LOG_FILE}"
-  ACTUAL_OPTS=$(build_cli_logging_opts ${TEST_CONF_FILE} ${TEST_LOG_DIR} ${TEST_LOG_FILE} ${TEST_LOGGER})
+  ACTUAL_OPTS=$(build_cli_logging_opts ${TEST_CONF_FILE} ${TEST_LOG_LEVEL} ${TEST_LOG_APPENDER} ${TEST_LOG_DIR} ${TEST_LOG_FILE})
 
   assertEquals "Logging OPTS is not set correctly" "${EXPECTED_OPTS}" "${ACTUAL_OPTS}"
 }