Created
January 31, 2013 17:23
-
-
Save bradoyler/4684553 to your computer and use it in GitHub Desktop.
Needed for unit testing. This ensures RavenDB will wait for non-stale results for any query.
This file contains 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
// somewhere in your test’s setup | |
documentStore.RegisterListener(new NoStaleQueriesAllowed()); | |
public class NoStaleQueriesAllowed : IDocumentQueryListener | |
{ | |
public void BeforeQueryExecuted(IDocumentQueryCustomization queryCustomization) | |
{ | |
queryCustomization.WaitForNonStaleResults(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment