Search in sources :

Example 1 with RepositoryException

use of com.qlangtech.tis.manage.common.RepositoryException in project tis by qlangtech.

the class TestGetAppConfigBySnid method testGetResource.

public void testGetResource() {
    try {
        SnapshotDomain domain = HttpConfigFileReader.getResource("http://localhost", 222);
        UploadResource resource = domain.getSolrSchema();
        Assert.assertNotNull(resource);
        Assert.assertNotNull(resource.getContent());
    } catch (RepositoryException e) {
        Assert.assertFalse(e.getMessage(), true);
    }
}
Also used : SnapshotDomain(com.qlangtech.tis.manage.common.SnapshotDomain) UploadResource(com.qlangtech.tis.manage.biz.dal.pojo.UploadResource) RepositoryException(com.qlangtech.tis.manage.common.RepositoryException)

Example 2 with RepositoryException

use of com.qlangtech.tis.manage.common.RepositoryException in project tis by qlangtech.

the class TestGetAppconfig method testGetResource.

public void testGetResource() {
    try {
        SnapshotDomain domain = HttpConfigFileReader.getResource("search4punish", 0, RunEnvironment.DAILY, ConfigFileReader.FILE_SCHEMA);
        System.out.println(domain.getSnapshot());
        UploadResource resource = domain.getSolrSchema();
        Assert.assertNotNull(resource);
        Assert.assertNotNull(resource.getContent());
        System.out.println(new String(resource.getContent()));
        resource = domain.getSolrConfig();
        Assert.assertNotNull(resource);
        Assert.assertNull(resource.getContent());
    } catch (RepositoryException e) {
        Assert.assertFalse(e.getMessage(), true);
    }
}
Also used : SnapshotDomain(com.qlangtech.tis.manage.common.SnapshotDomain) UploadResource(com.qlangtech.tis.manage.biz.dal.pojo.UploadResource) RepositoryException(com.qlangtech.tis.manage.common.RepositoryException)

Aggregations

UploadResource (com.qlangtech.tis.manage.biz.dal.pojo.UploadResource)2 RepositoryException (com.qlangtech.tis.manage.common.RepositoryException)2 SnapshotDomain (com.qlangtech.tis.manage.common.SnapshotDomain)2