public void can_reset_index_with_replication() { using (var store = GetDocumentStore()) { SetupReplication(store, new List <RavenJObject> { new RavenJObject { { "Url", "http://localhost:8080" } } }); var index = new Users_By_Name(); index.Execute(store); store.DatabaseCommands.Put("users/1", null, RavenJObject.FromObject(new User { Name = "Grisha" }), new RavenJObject()); WaitForIndexing(store); var stats = store.DatabaseCommands.GetStatistics(); Assert.Equal(2, stats.Indexes.Length); store.DatabaseCommands.ResetIndex(index.IndexName); WaitForIndexing(store); stats = store.DatabaseCommands.GetStatistics(); Assert.Equal(2, stats.Indexes.Length); } }
public void can_reset_index() { using (var store = GetDocumentStore()) { var index = new Users_By_Name(); index.Execute(store); store.DatabaseCommands.Put("users/1", null, RavenJObject.FromObject(new User { Name = "Grisha" }), new RavenJObject()); WaitForIndexing(store); var stats = store.DatabaseCommands.GetStatistics(); Assert.Equal(2, stats.Indexes.Length); store.DatabaseCommands.ResetIndex(index.IndexName); WaitForIndexing(store); stats = store.DatabaseCommands.GetStatistics(); Assert.Equal(2, stats.Indexes.Length); } }