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:
parent
1840c23364
commit
8bc4bb9962
|
@ -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
|
||||
|
|
|
@ -24,6 +24,7 @@ class ChunkTest < Test::Unit::TestCase
|
|||
def teardown
|
||||
@@chunks.clear
|
||||
@@files.clear
|
||||
@@db.error
|
||||
end
|
||||
|
||||
def test_pos
|
||||
|
|
|
@ -19,6 +19,7 @@ class CursorTest < Test::Unit::TestCase
|
|||
|
||||
def teardown
|
||||
@@coll.clear
|
||||
@@db.error
|
||||
end
|
||||
|
||||
def test_explain
|
||||
|
|
|
@ -29,6 +29,7 @@ class DBTest < Test::Unit::TestCase
|
|||
|
||||
def teardown
|
||||
@@users.clear if @@users
|
||||
@@db.error
|
||||
end
|
||||
|
||||
def test_close
|
||||
|
|
|
@ -19,6 +19,7 @@ class DBAPITest < Test::Unit::TestCase
|
|||
|
||||
def teardown
|
||||
@@coll.clear
|
||||
@@db.error
|
||||
end
|
||||
|
||||
def test_clear
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -22,6 +22,7 @@ class GridStoreTest < Test::Unit::TestCase
|
|||
def teardown
|
||||
@@chunks.clear
|
||||
@@files.clear
|
||||
@@db.error
|
||||
end
|
||||
|
||||
def test_exist
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue