do a db.error at the end of each teardown. hopefully this will fix the out of order messages that we've been experiencing

This commit is contained in:
Mike Dirolf 2009-03-13 17:09:19 -04:00
parent 1840c23364
commit 8bc4bb9962
8 changed files with 11 additions and 0 deletions

View File

@ -22,6 +22,7 @@ class AdminTest < Test::Unit::TestCase
def teardown
@admin.profiling_level = :off
@@coll.clear if @@coll
@@db.error
end
def test_default_profiling_level

View File

@ -24,6 +24,7 @@ class ChunkTest < Test::Unit::TestCase
def teardown
@@chunks.clear
@@files.clear
@@db.error
end
def test_pos

View File

@ -19,6 +19,7 @@ class CursorTest < Test::Unit::TestCase
def teardown
@@coll.clear
@@db.error
end
def test_explain

View File

@ -29,6 +29,7 @@ class DBTest < Test::Unit::TestCase
def teardown
@@users.clear if @@users
@@db.error
end
def test_close

View File

@ -19,6 +19,7 @@ class DBAPITest < Test::Unit::TestCase
def teardown
@@coll.clear
@@db.error
end
def test_clear

View File

@ -13,5 +13,6 @@ class DBConnectionTest < Test::Unit::TestCase
db = Mongo.new(host, port).db('ruby-mongo-demo')
coll = db.collection('test')
coll.clear
db.error
end
end

View File

@ -22,6 +22,7 @@ class GridStoreTest < Test::Unit::TestCase
def teardown
@@chunks.clear
@@files.clear
@@db.error
end
def test_exist

View File

@ -13,6 +13,10 @@ class MongoTest < Test::Unit::TestCase
@mongo = Mongo.new(@host, @port)
end
def teardown
@mongo.db('ruby-mongo-test').error
end
def test_database_info
@mongo.drop_database('ruby-mongo-info-test')
@mongo.db('ruby-mongo-info-test').collection('info-test').insert('a' => 1)