From a4e34af38d3a58c24862890fe5f4c075d0635e8c Mon Sep 17 00:00:00 2001 From: Varsha Rao Date: Thu, 8 Mar 2018 11:08:34 +0530 Subject: tests/basic/namespace: Fix the namespace test failure In the jenkins regression test brick multiplexing is enabled by is_brick_mx_enabled function and not by setting cluster.brick-multiplex option. Hence check the count of bricks and its logs, this fixes the failure. Change-Id: Ibb2ed8fbffd3765f283da741689304a5579d447c BUG: 1555167 Signed-off-by: Varsha Rao --- tests/basic/namespace.t | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'tests/basic/namespace.t') diff --git a/tests/basic/namespace.t b/tests/basic/namespace.t index 7f4fe2c9268..25a6b98b440 100644 --- a/tests/basic/namespace.t +++ b/tests/basic/namespace.t @@ -11,12 +11,14 @@ NAMESPACE2_HASH=3926991974 NAMESPACE3_HASH=3493960770 function check_brick_multiplex() { - $CLI volume info|grep "cluster.brick-multiplex" &>/dev/null - rt=$? - cnt="$(ls /var/log/glusterfs/bricks|wc -l)" + local ret=$($CLI volume info|grep "cluster.brick-multiplex"|cut -d" " -f2) + local cnt="$(ls /var/log/glusterfs/bricks|wc -l)" + local bcnt="$(brick_count)" - if [ $rt -eq 0 ]; then - local ret=$($CLI volume info|grep "cluster.brick-multiplex"|cut -d" " -f2) + if [ $bcnt -ne 1 ]; then + if [ -z $ret ]; then + ret="no" + fi if [ $ret = "on" ] || [ $cnt -eq 1 ]; then echo "Y" -- cgit