         XCTAssertEqual(socks[requestor], SwiftyZeroMQ.PollFlags.none)
 
         // After a short wait replier should go into .pollIn
-        sleep(1)
+        usleep(500)
         socks = try poller.poll()
 
         XCTAssertEqual(socks[replier], SwiftyZeroMQ.PollFlags.pollIn)

        let s2      = try context.socket(.pair)
        try s2.connect(endpoint)

        // Register pair sockets in a new poller object
        let poller  = SwiftyZeroMQ.Poller()
        try poller.register(socket: s1, flags: [.pollIn, .pollOut])

        try s2.send(string: "msg2")

        // After a wait, both should be [.pollout, .pollIn]
        usleep(500)
        socks = try poller.poll()
        XCTAssertEqual(socks[s1], [SwiftyZeroMQ.PollFlags.pollOut, SwiftyZeroMQ.PollFlags.pollIn])
        XCTAssertEqual(socks[s2], [SwiftyZeroMQ.PollFlags.pollOut, SwiftyZeroMQ.PollFlags.pollIn])
