make alarm-evt
tests more likely to pass
The `alarm-evt` tests are inherently racy, since they depend on the scheduler polling quickly enough. The old time values were close enough that a test failure is particularly likely on Windows, where the clock resolution is around 16ms. To reduce failures, make the time differents much bigger. Closes issue #1232
This commit is contained in:
parent
35acfab903
commit
463c32c61d
|
@ -234,12 +234,16 @@
|
||||||
(wrap-evt
|
(wrap-evt
|
||||||
(alarm-evt (+ (current-inexact-milliseconds) (* 1000 amt)))
|
(alarm-evt (+ (current-inexact-milliseconds) (* 1000 amt)))
|
||||||
(lambda (v) amt)))))])
|
(lambda (v) amt)))))])
|
||||||
(test #f sync/timeout 0.1 (make-delay 0.15) (make-delay 0.2))
|
(define fast SYNC-SLEEP-DELAY)
|
||||||
(test 0.15 sync/timeout 18 (make-delay 0.15) (make-delay 0.2))
|
(define slow1 (* 100 SYNC-SLEEP-DELAY))
|
||||||
(test 0.15 sync/timeout 18 (make-delay 0.2) (make-delay 0.15))
|
(define slow2 (* 99 SYNC-SLEEP-DELAY))
|
||||||
(test 0.15 sync/timeout 0.18 (make-delay 0.15) (make-delay 0.2))
|
(test #f sync/timeout fast (make-delay slow1) (make-delay slow1))
|
||||||
(test 0.15 sync/timeout 18
|
(test fast sync/timeout slow1 (make-delay fast) (make-delay slow2))
|
||||||
(choice-evt (make-delay 0.2) (make-delay 0.15))))
|
(test fast sync/timeout slow1 (make-delay slow2) (make-delay fast))
|
||||||
|
(test fast sync/timeout slow2 (make-delay fast) (make-delay slow1))
|
||||||
|
(test fast sync/timeout slow2 (make-delay slow1) (make-delay fast))
|
||||||
|
(test fast sync/timeout slow2
|
||||||
|
(choice-evt (make-delay slow1) (make-delay fast))))
|
||||||
|
|
||||||
;;check flattening of choice evts returned by a guard:
|
;;check flattening of choice evts returned by a guard:
|
||||||
(let ()
|
(let ()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user