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
|
def teardown
|
||||||
@admin.profiling_level = :off
|
@admin.profiling_level = :off
|
||||||
@@coll.clear if @@coll
|
@@coll.clear if @@coll
|
||||||
|
@@db.error
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_default_profiling_level
|
def test_default_profiling_level
|
||||||
|
|
|
@ -24,6 +24,7 @@ class ChunkTest < Test::Unit::TestCase
|
||||||
def teardown
|
def teardown
|
||||||
@@chunks.clear
|
@@chunks.clear
|
||||||
@@files.clear
|
@@files.clear
|
||||||
|
@@db.error
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_pos
|
def test_pos
|
||||||
|
|
|
@ -19,6 +19,7 @@ class CursorTest < Test::Unit::TestCase
|
||||||
|
|
||||||
def teardown
|
def teardown
|
||||||
@@coll.clear
|
@@coll.clear
|
||||||
|
@@db.error
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_explain
|
def test_explain
|
||||||
|
|
|
@ -29,6 +29,7 @@ class DBTest < Test::Unit::TestCase
|
||||||
|
|
||||||
def teardown
|
def teardown
|
||||||
@@users.clear if @@users
|
@@users.clear if @@users
|
||||||
|
@@db.error
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_close
|
def test_close
|
||||||
|
|
|
@ -19,6 +19,7 @@ class DBAPITest < Test::Unit::TestCase
|
||||||
|
|
||||||
def teardown
|
def teardown
|
||||||
@@coll.clear
|
@@coll.clear
|
||||||
|
@@db.error
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_clear
|
def test_clear
|
||||||
|
|
|
@ -13,5 +13,6 @@ class DBConnectionTest < Test::Unit::TestCase
|
||||||
db = Mongo.new(host, port).db('ruby-mongo-demo')
|
db = Mongo.new(host, port).db('ruby-mongo-demo')
|
||||||
coll = db.collection('test')
|
coll = db.collection('test')
|
||||||
coll.clear
|
coll.clear
|
||||||
|
db.error
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -22,6 +22,7 @@ class GridStoreTest < Test::Unit::TestCase
|
||||||
def teardown
|
def teardown
|
||||||
@@chunks.clear
|
@@chunks.clear
|
||||||
@@files.clear
|
@@files.clear
|
||||||
|
@@db.error
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_exist
|
def test_exist
|
||||||
|
|
|
@ -13,6 +13,10 @@ class MongoTest < Test::Unit::TestCase
|
||||||
@mongo = Mongo.new(@host, @port)
|
@mongo = Mongo.new(@host, @port)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def teardown
|
||||||
|
@mongo.db('ruby-mongo-test').error
|
||||||
|
end
|
||||||
|
|
||||||
def test_database_info
|
def test_database_info
|
||||||
@mongo.drop_database('ruby-mongo-info-test')
|
@mongo.drop_database('ruby-mongo-info-test')
|
||||||
@mongo.db('ruby-mongo-info-test').collection('info-test').insert('a' => 1)
|
@mongo.db('ruby-mongo-info-test').collection('info-test').insert('a' => 1)
|
||||||
|
|
Loading…
Reference in New Issue