make some tests a bit faster

This commit is contained in:
Simon Cruanes 2016-03-26 11:53:58 +01:00
parent ef4c86d8a1
commit 6ccad958c4
2 changed files with 5 additions and 5 deletions

View file

@ -264,7 +264,7 @@ module Make(P : PARAM) = struct
let l = List.rev_map (fun i ->
Fut.make
(fun () ->
Thread.delay 0.1;
Thread.delay 0.05;
1
)) l in
let l' = List.map Fut.get l in

View file

@ -184,12 +184,12 @@ let stop timer =
let timer = create () in
let n = CCLock.create 1 in
let res = CCLock.create 0 in
after timer 0.6
after timer 0.3
~f:(fun () -> CCLock.update n (fun x -> x+2));
ignore (Thread.create
(fun _ -> Thread.delay 0.8; CCLock.set res (CCLock.get n)) ());
after timer 0.4
(fun _ -> Thread.delay 0.4; CCLock.set res (CCLock.get n)) ());
after timer 0.2
~f:(fun () -> CCLock.update n (fun x -> x * 4));
Thread.delay 1. ;
Thread.delay 0.6 ;
OUnit.assert_equal 6 (CCLock.get res);
*)