Ejemplo n.º 1
0
        public void GetStatusForNamedCore() {
            var coreName = "core-new";
            var solrCoreAdmin = new SolrCoreAdmin(new SolrConnection(solrUrl), GetHeaderParser(), GetStatusResponseParser());

            var result = solrCoreAdmin.Status(coreName);
            Assert.IsNotEmpty(result.Name);
            Assert.AreEqual(coreName, result.Name);
        }
Ejemplo n.º 2
0
        public void CreateSwapCore()
        {
            var coreName = "core-swap";
            var solrCoreAdmin = new SolrCoreAdmin( new SolrConnection( solrUrl ), GetHeaderParser(), GetStatusResponseParser() );

            var createResponseHeader = solrCoreAdmin.Create(coreName, instanceDir);
            Assert.AreEqual(createResponseHeader.Status, 0);
            var results = solrCoreAdmin.Status(coreName);
            Assert.IsNotEmpty(results);
            Assert.IsNotEmpty(results[0].Name);
            Assert.AreEqual(coreName, results[0].Name);
        }
Ejemplo n.º 3
0
        public void Create() {
            var coreName = "core-new";
            var solrCoreAdmin = new SolrCoreAdmin( new SolrConnection( solrUrl ), GetHeaderParser(), GetStatusResponseParser() );

            try {
                var createResponseHeader = solrCoreAdmin.Create(coreName, null, null, null, null);
            } catch (ArgumentException) {
                // Should get an Exception here because instance directory was not specified.
                var createResponseHeader = solrCoreAdmin.Create(coreName, instanceDir);
                Assert.AreEqual(createResponseHeader.Status, 0);
            }

            var result = solrCoreAdmin.Status(coreName);
            Assert.IsNotNull(result);
            Assert.IsNotEmpty(result.Name);
            Assert.AreEqual(coreName, result.Name);
        }
Ejemplo n.º 4
0
        public void GetStatusForAllCores()
        {
            var solrCoreAdmin = new SolrCoreAdmin(new SolrConnection(solrUrl));

            var results = solrCoreAdmin.Status();
            Assert.IsNotEmpty(results);
        }
Ejemplo n.º 5
0
        public void GetStatusForNamedCore()
        {
            var coreName = "core-new";
            var solrCoreAdmin = new SolrCoreAdmin(new SolrConnection(solrUrl));

            var results = solrCoreAdmin.Status(coreName);
            Assert.IsNotEmpty(results[0].Name);
            Assert.AreEqual(coreName, results[0].Name);
        }
Ejemplo n.º 6
0
        public void GetStatusForAllCores() {
            var solrCoreAdmin = new SolrCoreAdmin(new SolrConnection(solrUrl), GetHeaderParser(), GetStatusResponseParser());

            var results = solrCoreAdmin.Status();
            Assert.IsNotEmpty(results);
        }