minor: test fix for change is core server cursorInfo command

This commit is contained in:
Kyle Banker 2010-08-24 17:03:38 -04:00
parent dfcf8d9d60
commit 9eee412213
1 changed files with 0 additions and 17 deletions

View File

@ -300,7 +300,6 @@ class CursorTest < Test::Unit::TestCase
@@coll.drop
client_cursors = @@db.command("cursorInfo" => 1)["clientCursors_size"]
by_location = @@db.command("cursorInfo" => 1)["byLocation_size"]
10000.times do |i|
@@coll.insert("i" => i)
@ -308,8 +307,6 @@ class CursorTest < Test::Unit::TestCase
assert_equal(client_cursors,
@@db.command("cursorInfo" => 1)["clientCursors_size"])
assert_equal(by_location,
@@db.command("cursorInfo" => 1)["byLocation_size"])
10.times do |i|
@@coll.find_one()
@ -317,8 +314,6 @@ class CursorTest < Test::Unit::TestCase
assert_equal(client_cursors,
@@db.command("cursorInfo" => 1)["clientCursors_size"])
assert_equal(by_location,
@@db.command("cursorInfo" => 1)["byLocation_size"])
10.times do |i|
a = @@coll.find()
@ -328,30 +323,22 @@ class CursorTest < Test::Unit::TestCase
assert_equal(client_cursors,
@@db.command("cursorInfo" => 1)["clientCursors_size"])
assert_equal(by_location,
@@db.command("cursorInfo" => 1)["byLocation_size"])
a = @@coll.find()
a.next_document
assert_not_equal(client_cursors,
@@db.command("cursorInfo" => 1)["clientCursors_size"])
assert_not_equal(by_location,
@@db.command("cursorInfo" => 1)["byLocation_size"])
a.close()
assert_equal(client_cursors,
@@db.command("cursorInfo" => 1)["clientCursors_size"])
assert_equal(by_location,
@@db.command("cursorInfo" => 1)["byLocation_size"])
a = @@coll.find({}, :limit => 10).next_document
assert_equal(client_cursors,
@@db.command("cursorInfo" => 1)["clientCursors_size"])
assert_equal(by_location,
@@db.command("cursorInfo" => 1)["byLocation_size"])
@@coll.find() do |cursor|
cursor.next_document
@ -359,8 +346,6 @@ class CursorTest < Test::Unit::TestCase
assert_equal(client_cursors,
@@db.command("cursorInfo" => 1)["clientCursors_size"])
assert_equal(by_location,
@@db.command("cursorInfo" => 1)["byLocation_size"])
@@coll.find() { |cursor|
cursor.next_document
@ -368,8 +353,6 @@ class CursorTest < Test::Unit::TestCase
assert_equal(client_cursors,
@@db.command("cursorInfo" => 1)["clientCursors_size"])
assert_equal(by_location,
@@db.command("cursorInfo" => 1)["byLocation_size"])
end
def test_count_with_fields