Revert "RUBY-167 Cursor#alive?"

This reverts commit 91308cdc60.
Wrong JIRA Issue
This commit is contained in:
Kyle Banker 2011-08-05 17:52:44 -04:00
parent 91308cdc60
commit eecb1d35de
2 changed files with 0 additions and 28 deletions

View File

@ -93,18 +93,6 @@ module Mongo
end
end
# Guess whether the cursor is alive on the server.
#
# Note that this method only checks whether we have
# a cursor id. The cursor may still have timed out
# on the server. This will be indicated in the next
# call to Cursor#next_document.
#
# @return [Boolean]
def alive?
@cursor_id && @cursor_id != 0
end
# Get the next document specified the cursor options.
#
# @return [Hash, Nil] the next document or Nil if no documents remain.

View File

@ -16,22 +16,6 @@ class CursorTest < Test::Unit::TestCase
@@coll_full_name = "#{MONGO_TEST_DB}.test"
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_add_options
c = @@coll.find
c.add_option(OP_QUERY_EXHAUST)