Sha256: 8d23929c94ad1880bc501fb23959058c783aec13726142edb5ed5074fc0840d3
Contents?: true
Size: 636 Bytes
Versions: 1
Compression:
Stored size: 636 Bytes
Contents
require File.join(File.dirname(__FILE__), "spec_helper") require 'ruby-debug' describe SharedDns, "Using sdb to store shared resources" do it "should perform concurrent reads and writes" do unique_record = "blah#{rand(10000000)}" reservations = Array.new 18.times do |i| reservations[i] = SharedDns.new end reservations[0].release_all mythreads = Array.new reservations.each do |x| mythreads << Thread.new do x.reserve_dns # all reservations should succeed x.should_not == false puts "reserved #{x.reservation}" STDOUT.flush end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
virtualmonkey-0.0.1 | spec/concurrent_writes_spec.rb |