Skip to content

Commit

Permalink
Merge pull request #129 from issuu/andersfugmann/fix_race_in_monitor_…
Browse files Browse the repository at this point in the history
…test

Fix race in monitor test
  • Loading branch information
andersfugmann authored Oct 26, 2023
2 parents 7651911 + fc0f0df commit 3d1fa01
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 3d1fa01

Please sign in to comment.