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

sijie 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 676dc82  [TESTS] Fix integration test 
TestCompatUpgradeYahooCustom.testUpgradeYahooCustom
676dc82 is described below

commit 676dc825efefe7222d8da11d9a7bcf15247f18eb
Author: Sijie Guo <guosi...@gmail.com>
AuthorDate: Tue Oct 30 11:46:31 2018 -0700

    [TESTS] Fix integration test 
TestCompatUpgradeYahooCustom.testUpgradeYahooCustom
    
    Descriptions of the changes in this PR:
    
    *Motivation*
    
    apache/bookkeeper#1749 fixes bash script issue but it introduced `set -e` 
which
    will fail `bin/bookkeeper` if grepping configuration file failed.
    
    *Changes*
    
    `set -e` is useful to fail fast if anything fails in the bash script. This 
change
    is to mask exit code of `grep` operation, since the bash script already 
handle
    the grep result.
    
    *Tests*
    
    Manually verified the change works. And the existing 
TestCompatUpgradeYahooCustom.testUpgradeYahooCustom
    integration tests would also verify if the change fixes the problem or not.
    
    
    
    
    Reviewers: Enrico Olivelli <eolive...@gmail.com>, Ivan Kelly 
<iv...@apache.org>
    
    This closes #1772 from sijie/fix_common_scripts
---
 bin/bookkeeper | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bin/bookkeeper b/bin/bookkeeper
index a207ff7..70b6ccd 100755
--- a/bin/bookkeeper
+++ b/bin/bookkeeper
@@ -37,7 +37,8 @@ fi
 
 # check the configuration to see if table service is enabled or not.
 if [ -z "${ENABLE_TABLE_SERVICE}" ]; then
-  TABLE_SERVICE_SETTING=$(grep StreamStorageLifecycleComponent 
${BOOKIE_CONF_TO_CHECK})
+  # mask exit code if the configuration file doesn't contain 
`StreamStorageLifecycleComponent`
+  TABLE_SERVICE_SETTING=$(grep StreamStorageLifecycleComponent 
${BOOKIE_CONF_TO_CHECK} | cat)
   if [[ "${TABLE_SERVICE_SETTING}" =~ ^extraServerComponents.* ]]; then
     ENABLE_TABLE_SERVICE="true"
   fi

Reply via email to