Browse Source

fix large file test

auth
clowwindy 10 years ago
parent
commit
9b3944c954
  1. 8
      tests/test_large_file.sh

8
tests/test_large_file.sh

@ -9,7 +9,7 @@ URL=http://127.0.0.1/file
mkdir -p tmp
type tc > /dev/null && (
type tc 2> /dev/null && (
tc qdisc add dev $DEV root handle 1: prio
tc qdisc add dev $DEV parent 1:3 handle 30: netem delay $DELAY
tc filter add dev $DEV parent 1:0 protocol ip u32 match ip dport $PORT 0xffff flowid 1:3
@ -25,13 +25,13 @@ SERVER=$!
sleep 3
curl -o tmp/expected $URL
curl -o tmp/result --socks5-hostname 127.0.0.1:1081 $URL
time curl -o tmp/expected $URL
time curl -o tmp/result --socks5-hostname 127.0.0.1:1081 $URL
kill $LOCAL
kill $SERVER
type tc > /dev/null && tc qdisc del dev lo root
type tc 2> /dev/null && tc qdisc del dev lo root
sleep 2

Loading…
Cancel
Save