test 1001 needs a small delay between client part execution and test
authorYang Tse <yangsita@gmail.com>
Fri, 18 Apr 2008 17:17:14 +0000 (17:17 +0000)
committerYang Tse <yangsita@gmail.com>
Fri, 18 Apr 2008 17:17:14 +0000 (17:17 +0000)
result file verifications to allow the test server to completely write
out all files

tests/data/test1001
tests/libtest/delay.pl [new file with mode: 0755]

index 9f8e534..58832cb 100644 (file)
@@ -71,6 +71,9 @@ http://%HOSTIP:%HTTPPORT/1001 -u auser:apasswd --digest -T log/1001 -x  http://%
 <file name="log/1001">
 test
 </file>
+<postcheck>
+%SRCDIR/libtest/delay.pl 1
+</postcheck>
 </client>
 
 # Verify data after the test has been "shot"
diff --git a/tests/libtest/delay.pl b/tests/libtest/delay.pl
new file mode 100755 (executable)
index 0000000..219b868
--- /dev/null
@@ -0,0 +1,16 @@
+#!/usr/bin/env perl
+# sleep for a number of seconds
+if ( $#ARGV != 0 )
+{
+    print "Usage: $0 seconds\n";
+    exit 1;
+}
+if ( $ARGV[0] =~ /(\d+)/ ) {
+    sleep $1;
+    exit 0;
+}
+else {
+    print "Usage: $0 seconds\n";
+    exit 1;
+}
+