sharness/test-lib: wait longer for daemon
it keeps failing early.
Juan Batiz-Benet committed
Feb 2, 2015 at 12:09 UTC
756382a6c3d5b7dff73fb228cfb4016e10e1fa80
1 file changed
+9
-6
test/sharness/lib/test-lib.sh
+9
-6
@@ -64,11 +64,14 @@ test_cmp_repeat_10_sec() {
64
test_cmp "$1" "$2"
65
}
66
67
-test_run_repeat_10_sec() {
68
- for i in 1 2 3 4 5 6 7 8 9 10
67
+test_run_repeat_60_sec() {
68
+ for i in 1 2 3 4 5 6
69
do
70
- (test_eval_ "$1") && return
71
- sleep 1
70
+ for i in 1 2 3 4 5 6 7 8 9 10
71
+ do
72
+ (test_eval_ "$1") && return
73
+ sleep 1
74
+ done
75
done
76
return 1 # failed
77
}
@@ -177,13 +180,13 @@ test_launch_ipfs_daemon() {
180
test_expect_success "'ipfs daemon' is ready" '
181
IPFS_PID=$! &&
182
test_wait_output_n_lines_60_sec actual_daemon 2 &&
180
- test_run_repeat_10_sec "grep \"API server listening on $ADDR_API\" actual_daemon" ||
183
+ test_run_repeat_60_sec "grep \"API server listening on $ADDR_API\" actual_daemon" ||
184
fsh cat actual_daemon || fsh cat daemon_err
185
'
186
187
if test "$ADDR_GWAY" != ""; then
188
test_expect_success "'ipfs daemon' output includes Gateway address" '
186
- test_run_repeat_10_sec "grep \"Gateway server listening on $ADDR_GWAY\" actual_daemon" ||
189
+ test_run_repeat_60_sec "grep \"Gateway server listening on $ADDR_GWAY\" actual_daemon" ||
190
fsh cat daemon_err
191
'
192
fi