be nicer to mac OS' lazy scheduler in tests

This commit is contained in:
Simon Cruanes 2020-12-21 17:17:47 -05:00
parent f2a472ab44
commit b18a71efd6

View file

@ -198,8 +198,8 @@ let stop timer =
~f:(fun () -> CCLock.update n (fun x -> x+2)); ~f:(fun () -> CCLock.update n (fun x -> x+2));
ignore (Thread.create ignore (Thread.create
(fun _ -> Thread.delay 0.4; CCLock.set res (CCLock.get n)) ()); (fun _ -> Thread.delay 0.4; CCLock.set res (CCLock.get n)) ());
after timer 0.2 after timer 0.1
~f:(fun () -> CCLock.update n (fun x -> x * 4)); ~f:(fun () -> CCLock.update n (fun x -> x * 4));
Thread.delay 0.6 ; Thread.delay 0.6 ;
OUnit.assert_equal 6 (CCLock.get res); OUnit.assert_equal ~printer:Q.Print.int 6 (CCLock.get res);
*) *)