minor: adjusted pooled threading test for windows

This commit is contained in:
Kyle Banker 2010-01-22 11:52:41 -05:00
parent 329af9e685
commit 4530adce49
1 changed files with 4 additions and 4 deletions

View File

@ -25,7 +25,7 @@ class TestThreadingLargePool < Test::Unit::TestCase
def test_safe_update
set_up_safe_data
threads = []
1000.times do |i|
300.times do |i|
threads[i] = Thread.new do
if i % 2 == 0
assert_raise Mongo::OperationFailure do
@ -37,7 +37,7 @@ class TestThreadingLargePool < Test::Unit::TestCase
end
end
1000.times do |i|
300.times do |i|
threads[i].join
end
end
@ -45,7 +45,7 @@ class TestThreadingLargePool < Test::Unit::TestCase
def test_safe_insert
set_up_safe_data
threads = []
1000.times do |i|
300.times do |i|
threads[i] = Thread.new do
if i % 2 == 0
assert_raise Mongo::OperationFailure do
@ -57,7 +57,7 @@ class TestThreadingLargePool < Test::Unit::TestCase
end
end
1000.times do |i|
300.times do |i|
threads[i].join
end
end