diff options
Diffstat (limited to 'tests/bugs/replicate/bug-1363721.t')
| -rw-r--r-- | tests/bugs/replicate/bug-1363721.t | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/bugs/replicate/bug-1363721.t b/tests/bugs/replicate/bug-1363721.t index ec39889b27e..0ed34d8a4f4 100644 --- a/tests/bugs/replicate/bug-1363721.t +++ b/tests/bugs/replicate/bug-1363721.t @@ -18,6 +18,10 @@ function size_increased { fi } +function has_write_failed { + local pid=$1 + if [ -d /proc/$pid ]; then echo "N"; else echo "Y"; fi +} TEST glusterd TEST pidof glusterd TEST $CLI volume create $V0 replica 3 $H0:$B0/${V0}{0,1,2} @@ -27,7 +31,7 @@ TEST $CLI volume set $V0 cluster.data-self-heal off TEST $CLI volume set $V0 cluster.metadata-self-heal off TEST $CLI volume set $V0 cluster.entry-self-heal off TEST $CLI volume start $V0 -TEST $GFS --volfile-id=$V0 --volfile-server=$H0 $M0 --direct-io-mode=enable +TEST $GFS --volfile-id=$V0 --volfile-server=$H0 --direct-io-mode=enable $M0 cd $M0 @@ -67,8 +71,10 @@ sleep 3 # Now kill the second brick kill_brick $V0 $H0 $B0/${V0}2 -# At this point the write should have been failed. But make sure that the second -# brick is never an accused. +# At this point the write should have been failed. +EXPECT_WITHIN $PROCESS_DOWN_TIMEOUT "Y" has_write_failed $dd_pid + +# Also make sure that the second brick is never an accused. md5sum_2=$(md5sum $B0/${V0}2/file1 | awk '{print $1}') |
