Browse Source

do delay the test for http, too, to make it more reliable

The file method was already slowed down and somehow I thought I had done
the same for http, but it turns out that I didn't. Giving it the same
delay as file should help in making this test slower and therefore more
likely to successfully test what it is supposed to test.

Git-Dch: Ignore
David Kalnischkies 11 years ago
parent
commit
d2b7b1300c
1 changed files with 5 additions and 4 deletions
  1. 5 4
      test/integration/test-acquire-same-repository-multiple-times

+ 5 - 4
test/integration/test-acquire-same-repository-multiple-times

@@ -26,17 +26,18 @@ mkdir $NEWMETHODS
 for METH in $(find $OLDMETHODS ! -type d); do
 	ln -s $OLDMETHODS/$(basename $METH) $NEWMETHODS
 done
-rm $NEWMETHODS/file
-cat >$NEWMETHODS/file <<EOF
+rm "${NEWMETHODS}/file" "${NEWMETHODS}/http"
+cat >"${NEWMETHODS}/file" <<EOF
 #!/bin/sh
 while read line; do
 	echo "\$line"
 	if [ -z "\$line" ]; then
 		sleep 0.5
 	fi
-done | $OLDMETHODS/file
+done | "$OLDMETHODS/\${0##*/}"
 EOF
-chmod +x $NEWMETHODS/file
+chmod +x "${NEWMETHODS}/file"
+ln -s "${NEWMETHODS}/file" "${NEWMETHODS}/http"
 
 tworepos() {
 	msgtest "Downloading the same repository twice over $1" "$3"