Example #1
0
        public void WithRestart()
        {
            var template = new TemplateTest();

            using (var store = Store())
            {
                using (var session = store.OpenSession())
                {
                    session.Store(template);
                    session.SaveChanges();
                }

                using (var session = store.OpenSession())
                {
                    Assert.Equal(1, session.Query <TemplateTests_Search.ReduceResult, TemplateTests_Search>().Count());
                }
            }

            using (var store = Store())
            {
                using (var session = store.OpenSession())
                {
                    Assert.Equal(1, session.Query <TemplateTests_Search.ReduceResult, TemplateTests_Search>().Count());
                }
            }
        }
Example #2
0
        public void WithRestart()
        {
            TemplateTest template = new TemplateTest {
            };

            using (var store = Store())
            {
                using (var session = store.OpenSession())
                {
                    session.Store(template);
                    session.SaveChanges();
                }


                using (var session = store.OpenSession())
                {
                    Assert.Equal(1, session.Query <TemplateTests_Search.ReduceResult, TemplateTests_Search>().Count());
                }
            }

            using (var store = Store())
            {
                RavenTest.WaitForUserToContinueTheTest(store);
                using (var session = store.OpenSession())
                {
                    Assert.Equal(1, session.Query <TemplateTests_Search.ReduceResult, TemplateTests_Search>().Count());
                }
            }
        }