public void TestEnsureIndexAfterDropCollection() { if (collection.Exists()) { collection.Drop(); } server.ResetIndexCache(); Assert.IsFalse(collection.IndexExists("x")); collection.EnsureIndex("x"); Assert.IsTrue(collection.IndexExists("x")); collection.Drop(); Assert.IsFalse(collection.IndexExists("x")); collection.EnsureIndex("x"); Assert.IsTrue(collection.IndexExists("x")); }
public void ResetIndexCache() { _mongoServer.ResetIndexCache(); }