From 8abe8f794913daa81d9f1dc0ddab26c9c414abf8 Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Tue, 21 May 2013 13:01:08 +0530 Subject: tests: Modified test to use remove-brick instead of 'start' variant Backport of change f75be77 from master 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. BUG: 878004 Change-Id: Ic6e1360ae5a5280d0d7efe8c3e9a0aa57dddb508 Signed-off-by: Kaushal M Reviewed-on: http://review.gluster.org/5052 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- 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