Search in sources :

Example 1 with DbPath

use of org.ektorp.DbPath in project apex-malhar by apache.

the class CouchDBTestHelper method setup.

static void setup() {
    StdHttpClient.Builder builder = new StdHttpClient.Builder();
    HttpClient httpClient = builder.build();
    StdCouchDbInstance instance = new StdCouchDbInstance(httpClient);
    DbPath dbPath = new DbPath(TEST_DB);
    if (instance.checkIfDbExists((dbPath))) {
        instance.deleteDatabase(dbPath.getPath());
    }
    connector = instance.createConnector(TEST_DB, true);
}
Also used : StdHttpClient(org.ektorp.http.StdHttpClient) HttpClient(org.ektorp.http.HttpClient) StdHttpClient(org.ektorp.http.StdHttpClient) StdCouchDbInstance(org.ektorp.impl.StdCouchDbInstance) DbPath(org.ektorp.DbPath)

Example 2 with DbPath

use of org.ektorp.DbPath in project apex-malhar by apache.

the class CouchDBTestHelper method teardown.

static void teardown() {
    StdHttpClient.Builder builder = new StdHttpClient.Builder();
    HttpClient httpClient = builder.build();
    StdCouchDbInstance instance = new StdCouchDbInstance(httpClient);
    DbPath dbPath = new DbPath(TEST_DB);
    if (instance.checkIfDbExists((dbPath))) {
        instance.deleteDatabase(dbPath.getPath());
    }
}
Also used : StdHttpClient(org.ektorp.http.StdHttpClient) HttpClient(org.ektorp.http.HttpClient) StdHttpClient(org.ektorp.http.StdHttpClient) StdCouchDbInstance(org.ektorp.impl.StdCouchDbInstance) DbPath(org.ektorp.DbPath)

Aggregations

DbPath (org.ektorp.DbPath)2 HttpClient (org.ektorp.http.HttpClient)2 StdHttpClient (org.ektorp.http.StdHttpClient)2 StdCouchDbInstance (org.ektorp.impl.StdCouchDbInstance)2