summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanju Rakonde <srakonde@redhat.com>2018-10-08 19:33:58 +0530
committerSanju Rakonde <srakonde@redhat.com>2018-10-25 13:19:16 +0000
commit79806baba7c49d028d1db60dc8aacfae7b202745 (patch)
tree8e58197895e86dc92e04eb8b09105d9fd90b0e0c
parentf48e6cf2183a749e75eaa22a1dffe58f0dba34d5 (diff)
tests: correction in tests/bugs/glusterd/optimized-basic-testcases-in-cluster.t
Patch https://review.gluster.org/#/c/glusterfs/+/19135/ has optimised glusterd test cases by clubbing the similar test cases into a single test case. https://review.gluster.org/#/c/glusterfs/+/19135/15/tests/bugs/glusterd/bug-1293414-import-brickinfo-uuid.t test case has been deleted and added as a part of tests/bugs/glusterd/optimized-basic-testcases-in-cluster.t In the original test case, we create a volume with two bricks, each on a separate node(N1 & N2). From another node in cluster(N3), we try to detach a node which is hosting bricks. It fails. In the new test, we created volume with single brick on N1. and from another node in cluster, we tried to detach N1. we expect peer detach to fail, but peer detach was success as the node is hosting all the bricks of volume. Now, changing the new test case to cover the original test case scenario. Please refer https://bugzilla.redhat.com/show_bug.cgi?id=1642597#c1 to understand why the new test case is not failing in centos-regression. > BUG: bz#1642597 > Change-Id: Ifda12b5677143095f263fbb97a6808573f513234 > Signed-off-by: Sanju Rakonde <srakonde@redhat.com> (cherry picked from commit 0ca6773eaf5aeb507ebc72d2c2f61902eeff414c) fixes: bz#1643075 Change-Id: Ifda12b5677143095f263fbb97a6808573f513234 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
-rw-r--r--tests/bugs/glusterd/optimized-basic-testcases-in-cluster.t27
1 files changed, 18 insertions, 9 deletions
diff --git a/tests/bugs/glusterd/optimized-basic-testcases-in-cluster.t b/tests/bugs/glusterd/optimized-basic-testcases-in-cluster.t
index a55e7cb7c46..ce1d9463809 100644
--- a/tests/bugs/glusterd/optimized-basic-testcases-in-cluster.t
+++ b/tests/bugs/glusterd/optimized-basic-testcases-in-cluster.t
@@ -13,7 +13,7 @@ cleanup;
#bug-1454418 - Setting Port number in specific range
sysctl net.ipv4.ip_local_reserved_ports="24007-24008,32765-32768,49152-49156"
-TEST launch_cluster 3;
+TEST launch_cluster 4;
#bug-1223213
@@ -56,14 +56,20 @@ TEST $CLI_1 volume status $V0 $H2:$B2/$V0 --xml
TEST $CLI_1 volume stop $V0
TEST $CLI_1 volume delete $V0
-TEST $CLI_1 volume create $V0 $H1:$B1/$V0
+TEST $CLI_1 volume create $V0 $H1:$B1/$V0 $H2:$B2/$V0
TEST $CLI_1 volume create $V1 $H1:$B1/$V1
+TEST $CLI_1 volume start $V0
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT 'Started' volinfo_field_1 $V0 'Status'
+
+TEST $CLI_1 volume start $V1
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT 'Started' volinfo_field_1 $V1 'Status'
+
TEST $CLI_1 peer probe $H3;
EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count 1
-TEST $CLI_1 volume start $V0
-TEST $CLI_1 volume start $V1
+TEST $CLI_1 peer probe $H4;
+EXPECT_WITHIN $PROBE_TIMEOUT 3 peer_count 1
#bug-1173414 - validate mgmt-v3-remote-lock-failure
@@ -75,22 +81,25 @@ $CLI_2 volume set $V0 diagnostics.client-log-level DEBUG &
$CLI_2 volume set $V1 barrier on
done
-EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count 1
+EXPECT_WITHIN $PROBE_TIMEOUT 3 peer_count 1
TEST $CLI_1 volume status
TEST $CLI_2 volume status
#bug-1293414 - validate peer detach
# peers hosting bricks cannot be detached
-TEST ! $CLI_2 peer detach $H1
-EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count 1
+TEST ! $CLI_4 peer detach $H1
+EXPECT_WITHIN $PROBE_TIMEOUT 3 peer_count 1
# peer not hosting bricks should be detachable
-TEST $CLI_2 peer detach $H3
-EXPECT_WITHIN $PROBE_TIMEOUT 1 peer_count 1
+TEST $CLI_4 peer detach $H3
+EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count 1
#bug-1344407 - deleting a volume when peer is down should fail
+#volume should be stopped before deletion
+TEST $CLI_1 volume stop $V0
+
TEST kill_glusterd 2
TEST ! $CLI_1 volume delete $V0