Example #1
0
        public void CanBeUsed()
        {
            using (var store = GetDocumentStore())
            {
                store.Maintenance.Send(new CreateSampleDataOperation());

                var indexDef = new Raven.Client.Documents.Indexes.IndexDefinition
                {
                    Name = "Test",
                    Maps =
                    {
                        "from s in docs.Employees select new { A = Guid.NewGuid() }"
                    }
                };
                store.Maintenance.Send(new PutIndexesOperation(new[] { indexDef }));

                WaitForIndexing(store);

                var stats = store.Maintenance.Send(new GetIndexErrorsOperation(new[] { "Test" }));
                Assert.Empty(stats[0].Errors);
            }
        }
Example #2
0
        public void CanBeUsed()
        {
            using (var store = GetDocumentStore())
            {
                store.Maintenance.Send(new CreateSampleDataOperation());

                var indexDef = new Raven.Client.Documents.Indexes.IndexDefinition
                {
                    Name = "Test",
                    Maps =
                    {
                        "from s in docs.Employees select new { A = Guid.NewGuid() }"
                    }
                };
                store.Maintenance.Send(new PutIndexesOperation(new[] { indexDef }));

                Indexes.WaitForIndexing(store);

                var stats = Indexes.WaitForIndexingErrors(store, errorsShouldExists: false);
                Assert.Null(stats);
            }
        }