summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/include.rc1
-rwxr-xr-xtests/performance/open-behind.t5
-rw-r--r--tests/volume.rc7
3 files changed, 12 insertions, 1 deletions
diff --git a/tests/include.rc b/tests/include.rc
index d4772bd42f4..94e4bc4bb67 100644
--- a/tests/include.rc
+++ b/tests/include.rc
@@ -65,6 +65,7 @@ JANITOR_TIMEOUT=60
UMOUNT_TIMEOUT=5
CONFIG_UPDATE_TIMEOUT=5
AUTH_REFRESH_INTERVAL=10
+GRAPH_SWITCH_TIMEOUT=10
statedumpdir=`gluster --print-statedumpdir`; # Default directory for statedump
diff --git a/tests/performance/open-behind.t b/tests/performance/open-behind.t
index 5a24c83954d..e7a2bcf788b 100755
--- a/tests/performance/open-behind.t
+++ b/tests/performance/open-behind.t
@@ -1,12 +1,13 @@
#!/bin/bash
. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
cleanup;
TEST glusterd
TEST pidof glusterd
-TEST $CLI volume info;
+TEST $CLI volume info 2>/dev/null;
TEST $CLI volume create $V0 $H0:$B0/${V0}{1,2};
@@ -49,6 +50,8 @@ EXPECT "" echo $string;
TEST $CLI volume set $V0 performance.open-behind off;
+EXPECT_WITHIN $GRAPH_SWITCH_TIMEOUT "2" num_graphs $M0;
+
D1="hello-this-is-a-test-message1";
F1="test-file1";
diff --git a/tests/volume.rc b/tests/volume.rc
index f2a56888fb8..6c0e6abea83 100644
--- a/tests/volume.rc
+++ b/tests/volume.rc
@@ -506,3 +506,10 @@ function cleanup_georep {
$CLI volume geo-rep $GMV0 $H0::$GSV0 delete
}
+
+
+function num_graphs
+{
+ local mountpoint=$1
+ echo `ls $mountpoint/.meta/graphs/ | grep -v active | wc -l`
+}