From f75be775a9b191eb74f6cb4c161d9af36f2fdc97 Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Thu, 25 Apr 2013 00:28:07 +0530 Subject: tests: Modified test to use remove-brick instead of 'start' variant remove-brick start doesn't remove the brick from the volume immediately. It would wait until migration of data to other bricks are complete. Even when there is no data to be migrated, one can expect a finite delay from the time of remove-brick start command's exit and removal of brick(s). This may cause subsequent checks on brick count to fail in a non-deterministic manner. Also, renamed the test file name to reflect bug-id corresponding to community release. Change-Id: Ic43f011e251640decb68e46f4a10e0824ade0ac9 BUG: 878004 Signed-off-by: Krishnan Parthasarathi Reviewed-on: http://review.gluster.org/4885 Reviewed-by: Vijay Bellur Tested-by: Gluster Build System --- tests/bugs/bug-878004.t | 28 ++++++++++++++++++++++++++++ tests/bugs/bug-878873.t | 29 ----------------------------- 2 files changed, 28 insertions(+), 29 deletions(-) create mode 100644 tests/bugs/bug-878004.t delete mode 100644 tests/bugs/bug-878873.t (limited to 'tests') diff --git a/tests/bugs/bug-878004.t b/tests/bugs/bug-878004.t new file mode 100644 index 000000000..5397be2a6 --- /dev/null +++ b/tests/bugs/bug-878004.t @@ -0,0 +1,28 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc + +cleanup; + +TEST glusterd +TEST pidof glusterd +TEST $CLI volume info; + +TEST $CLI volume create $V0 $H0:$B0/${V0}1 $H0:$B0/${V0}2 $H0:$B0/${V0}3; + +function brick_count() +{ + local vol=$1; + + $CLI volume info $vol | egrep "^Brick[0-9]+: " | wc -l; +} + + +TEST $CLI volume start $V0 +TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}2; +EXPECT '2' brick_count $V0 + +TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}3; +EXPECT '1' brick_count $V0 + + diff --git a/tests/bugs/bug-878873.t b/tests/bugs/bug-878873.t deleted file mode 100644 index efdcaca89..000000000 --- a/tests/bugs/bug-878873.t +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -. $(dirname $0)/../include.rc - -cleanup; - -TEST glusterd -TEST pidof glusterd -TEST $CLI volume info; - -TEST $CLI volume create $V0 $H0:$B0/${V0}1 $H0:$B0/${V0}2 $H0:$B0/${V0}3; - -function brick_count() -{ - local vol=$1; - - $CLI volume info $vol | egrep "^Brick[0-9]+: " | wc -l; -} - - -TEST $CLI volume start $V0 -TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}2 start; -TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}2 commit; -EXPECT '2' brick_count $V0 - -TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}3; -EXPECT '1' brick_count $V0 - - -- cgit