Revert "RUBY-267 Cursor#alive?"
This reverts commit 05dfef2f11
.
This adds new functionality and thus must wait for the 1.4 release.
This commit is contained in:
parent
05dfef2f11
commit
b8ab13e7f9
@ -307,13 +307,6 @@ module Mongo
|
||||
# @return [Boolean]
|
||||
def closed?; @closed; end
|
||||
|
||||
# Is this cursor alive on the server?
|
||||
#
|
||||
# @return [Boolean]
|
||||
def alive?
|
||||
@cursor_id && @cursor_id != 0
|
||||
end
|
||||
|
||||
# Returns an integer indicating which query options have been selected.
|
||||
#
|
||||
# @return [Integer]
|
||||
|
@ -32,21 +32,6 @@ class CursorTest < Test::Unit::TestCase
|
||||
assert_kind_of Numeric, explaination['nscanned']
|
||||
end
|
||||
|
||||
def test_alive
|
||||
batch = []
|
||||
5000.times do |n|
|
||||
batch << {:a => n}
|
||||
end
|
||||
@@coll.insert(batch)
|
||||
cursor = @@coll.find
|
||||
assert !cursor.alive?
|
||||
cursor.next
|
||||
assert cursor.alive?
|
||||
cursor.close
|
||||
assert !cursor.alive?
|
||||
@@coll.remove
|
||||
end
|
||||
|
||||
def test_count
|
||||
@@coll.remove
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user