Sha256: cb48ba07e664e5e4733de5eed85bb16842a0cc8c20b1c2391b891f9bdec28dcf
Contents?: true
Size: 826 Bytes
Versions: 50
Compression:
Stored size: 826 Bytes
Contents
require File.join(File.expand_path(File.dirname(__FILE__)), '../../../..', 'test_helper.rb') require 'rbbt-util' require 'rbbt/util/log' require 'rbbt/util/concurrency/processes/socket' class TestConcurrency < Test::Unit::TestCase def test_socket_push_pop obj1 = [1,[2,3,4]] #* 1000 obj2 = ["1",["2","3","4"]] #* 1000 obj3 = "some string" obj4 = TSV.setup({1 => 1}) socket = RbbtProcessQueue::RbbtProcessSocket.new 10.times do socket.push(obj1) socket.push(obj2) socket.push(obj3) socket.push(obj4) assert_equal obj1, socket.pop assert_equal obj2, socket.pop assert_equal obj3, socket.pop assert_equal obj4, socket.pop end socket.swrite.close assert_raise ClosedStream do socket.pop end socket.clean end end
Version data entries
50 entries across 50 versions & 1 rubygems