Created
July 11, 2013 13:06
-
-
Save e-tobi/5975288 to your computer and use it in GitHub Desktop.
Failing RavenDB Test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Raven.Client.Embedded; | |
using Raven.Client.Indexes; | |
using Raven.Database.Extensions; | |
using Xunit; | |
namespace Raven.Tests.Bugs.Indexing | |
{ | |
public class RestartingADocumentStore : RavenTest | |
{ | |
public class Foo | |
{ | |
public string Id { get; set; } | |
public string Name { get; set; } | |
} | |
[Fact] | |
public void ShouldNotIndexDocsWhichAreAlreadyIndexed() | |
{ | |
IOExtensions.DeleteDirectory("Data"); | |
using (var store = new EmbeddableDocumentStore()) | |
{ | |
store.Initialize(); | |
new RavenDocumentsByEntityName().Execute(store); | |
using (var s = store.OpenSession()) | |
{ | |
for (int i = 0; i < 100; i++ ) s.Store(new Foo()); | |
s.SaveChanges(); | |
} | |
WaitForIndexing(store); | |
Assert.Empty(store.DocumentDatabase.Statistics.StaleIndexes); | |
} | |
using (var store = new EmbeddableDocumentStore()) | |
{ | |
store.Initialize(); | |
Assert.Empty(store.DocumentDatabase.Statistics.StaleIndexes); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment