minor: adjusted pooled threading test for windows
This commit is contained in:
parent
329af9e685
commit
4530adce49
|
@ -25,7 +25,7 @@ class TestThreadingLargePool < Test::Unit::TestCase
|
||||||
def test_safe_update
|
def test_safe_update
|
||||||
set_up_safe_data
|
set_up_safe_data
|
||||||
threads = []
|
threads = []
|
||||||
1000.times do |i|
|
300.times do |i|
|
||||||
threads[i] = Thread.new do
|
threads[i] = Thread.new do
|
||||||
if i % 2 == 0
|
if i % 2 == 0
|
||||||
assert_raise Mongo::OperationFailure do
|
assert_raise Mongo::OperationFailure do
|
||||||
|
@ -37,7 +37,7 @@ class TestThreadingLargePool < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
1000.times do |i|
|
300.times do |i|
|
||||||
threads[i].join
|
threads[i].join
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -45,7 +45,7 @@ class TestThreadingLargePool < Test::Unit::TestCase
|
||||||
def test_safe_insert
|
def test_safe_insert
|
||||||
set_up_safe_data
|
set_up_safe_data
|
||||||
threads = []
|
threads = []
|
||||||
1000.times do |i|
|
300.times do |i|
|
||||||
threads[i] = Thread.new do
|
threads[i] = Thread.new do
|
||||||
if i % 2 == 0
|
if i % 2 == 0
|
||||||
assert_raise Mongo::OperationFailure do
|
assert_raise Mongo::OperationFailure do
|
||||||
|
@ -57,7 +57,7 @@ class TestThreadingLargePool < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
1000.times do |i|
|
300.times do |i|
|
||||||
threads[i].join
|
threads[i].join
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue