run the test again on a unique collection
This commit is contained in:
parent
5921fabfa4
commit
66cb1d492c
@ -59,6 +59,29 @@ class CursorTest < Test::Unit::TestCase
|
||||
assert_equal 499501, count
|
||||
end
|
||||
|
||||
def test_refill_via_get_more_alt_coll
|
||||
coll = @@db.collection('test-alt-coll')
|
||||
coll.clear
|
||||
coll.insert('a' => 1) # collection not created until it's used
|
||||
|
||||
1000.times { |i|
|
||||
coll.insert('a' => i)
|
||||
}
|
||||
count = 0
|
||||
coll.find.each { |obj|
|
||||
count += obj['a']
|
||||
}
|
||||
|
||||
# do the same thing again for debugging
|
||||
count2 = 0
|
||||
coll.find.each { |obj|
|
||||
count2 += obj['a']
|
||||
}
|
||||
|
||||
assert_equal count, count2
|
||||
assert_equal 499501, count
|
||||
end
|
||||
|
||||
def test_close_after_query_sent
|
||||
begin
|
||||
cursor = @@coll.find('a' => 1)
|
||||
|
Loading…
Reference in New Issue
Block a user