Skip to content

Commit 8c96beb

Browse files
committed
fix tests
1 parent bdc7c42 commit 8c96beb

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed

test/fiber/t_fib1.ml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
open! Moonpool
2-
31
let ( let@ ) = ( @@ )
4-
let runner = Fifo_pool.create ~num_threads:1 ()
52

63
let () =
4+
let@ runner = Moonpool_fib.main in
75
T_fibers.Fib.run1 ~runner ();
8-
T_fibers.Fib.run2 ~runner ();
9-
6+
T_fibers.Fib.run2 ~runner ()

test/lwt/fibers/t_main.ml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,17 @@ let () =
1919
assert (r = 13)
2020

2121
let () =
22-
Printf.eprintf "PART 2\n%!";
23-
try
24-
let _r =
25-
M_lwt.lwt_main @@ fun runner ->
26-
let fib = F.spawn_top ~on:runner (fun () -> failwith "oops") in
27-
F.await fib
28-
in
22+
(* run multiple times to make sure cleanup is correct *)
23+
for _i = 1 to 10 do
24+
try
25+
let _r =
26+
M_lwt.lwt_main @@ fun runner ->
27+
let fib = F.spawn_top ~on:runner (fun () -> failwith "oops") in
28+
F.await fib
29+
in
2930

30-
assert false
31-
with Failure msg ->
32-
(* Printf.eprintf "got %S\n%!" msg; *)
33-
assert (msg = "oops")
31+
assert false
32+
with Failure msg ->
33+
(* Printf.eprintf "got %S\n%!" msg; *)
34+
assert (msg = "oops")
35+
done

test/lwt/hash_client.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
module M = Moonpool
21
module M_lwt = Moonpool_lwt
32
module Trace = Trace_core
43

0 commit comments

Comments
 (0)