test/test_beacon.rb in rbczmq-1.7.4 vs test/test_beacon.rb in rbczmq-1.7.5
- old
+ new
@@ -1,12 +1,13 @@
# encoding: utf-8
-require File.join(File.dirname(__FILE__), 'helper')
+require File.expand_path("../helper.rb", __FILE__)
require 'socket'
class TestZmqBeacon < ZmqTestCase
def setup
+ GC.start
r = Random.new
begin
# find a random port number that we are able to bind to, and use this port
# for the beacon tests.
udp = UDPSocket.new
@@ -76,10 +77,11 @@
ensure
beacon.destroy
end
def test_pipe
+ GC.start
beacon = ZMQ::Beacon.new(@port)
assert_instance_of ZMQ::Socket::Pair, beacon.pipe
GC.start # check GC cycle with "detached" socket
ensure
beacon.destroy
@@ -104,6 +106,6 @@
ensure
ctx.destroy
service_beacon.destroy
client_beacon.destroy
end
-end
\ No newline at end of file
+end