diff --git a/basis/alarms/alarms-tests.factor b/basis/alarms/alarms-tests.factor index 17dd08cfcf..786a7b1774 100644 --- a/basis/alarms/alarms-tests.factor +++ b/basis/alarms/alarms-tests.factor @@ -1,12 +1,12 @@ -USING: alarms alarms.private kernel calendar sequences -tools.test threads concurrency.count-downs concurrency.promises -fry tools.time math ; +USING: alarms alarms.private calendar concurrency.count-downs +concurrency.promises fry kernel math math.order sequences +threads tools.test tools.time ; IN: alarms.tests [ ] [ 1 { f } clone 2dup - [ first cancel-alarm count-down ] 2curry 1 seconds later + [ first stop-alarm count-down ] 2curry 1 seconds later swap set-first await ] unit-test @@ -19,13 +19,14 @@ IN: alarms.tests [ t ] [ [ - '[ t _ fulfill ] 5 seconds later drop - ] benchmark 4,000,000,000 > + [ '[ t _ fulfill ] 2 seconds later drop ] + [ 5 seconds ?promise-timeout drop ] bi + ] benchmark 1,500,000,000 2,500,000,000 between? ] unit-test [ { 3 } ] [ { 3 } dup '[ 4 _ set-first ] 2 seconds later 1/2 seconds sleep - cancel-alarm + stop-alarm ] unit-test