Skip to content

Commit

Permalink
Fix race in monitor test
Browse files Browse the repository at this point in the history
  • Loading branch information
andersfugmann committed Oct 21, 2023
1 parent 7651911 commit ca804e3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions zmq/test/zmq_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ let test_monitor () =
end;
Zmq.Socket.close s1;
assert_event "m1" m1 "Closed";
Zmq.Socket.close s2;
assert_event "m1" m1 "Monitor_stopped";
assert_event "m2" m2 "Disconnect";
Zmq.Socket.close s2;

Zmq.Socket.close m2;
Zmq.Socket.close m1;
Expand All @@ -165,7 +166,7 @@ let test_proxy () =
in

let _thread = Thread.create proxy (pull, pub) in
sleep 10;
sleep 10; (* Wait until the proxy has been created *)
let sub =
let s = Zmq.Socket.create ctx sub in
Zmq.Socket.connect s pub_endpoint;
Expand Down

0 comments on commit ca804e3

Please sign in to comment.