diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-02-04 10:36:18 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-02-04 10:36:18 +0000 |
commit | 85223902e8229bd460ce0b4ad126f42b1db42a46 (patch) | |
tree | 3407b8227d44c24831cc2fc186773537780e5778 /t/t0004-heartbeat-timeout.sh | |
parent | a09a622b4988b5eee819487c96a4563e71f753f7 (diff) | |
download | unicorn-85223902e8229bd460ce0b4ad126f42b1db42a46.tar.gz |
"date +%s" is not in POSIX (it is in GNU, and at least FreeBSD 9.0, possibly earlier). The Ruby equivalent should be sufficiently portable between different Ruby versions. This change was automated via: perl -i -p -e 's/date \+%s/unix_time/' t/*.sh This is commit 0ba6fc3c30b9cf530faf7fcf5ce7be519ec13fe7 in rainbows.git
Diffstat (limited to 't/t0004-heartbeat-timeout.sh')
-rwxr-xr-x | t/t0004-heartbeat-timeout.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t0004-heartbeat-timeout.sh b/t/t0004-heartbeat-timeout.sh index bf73ebe..3e373e9 100755 --- a/t/t0004-heartbeat-timeout.sh +++ b/t/t0004-heartbeat-timeout.sh @@ -23,9 +23,9 @@ t_begin "sleep for a bit, ensure worker PID does not change" && { t_begin "block the worker process to force it to die" && { rm $ok - t0=$(date +%s) + t0=$(unix_time) err="$(curl -sSf http://$listen/block-forever 2>&1 || > $ok)" - t1=$(date +%s) + t1=$(unix_time) elapsed=$(($t1 - $t0)) t_info "elapsed=$elapsed err=$err" test x"$err" != x"Should never get here" |