This repository was archived by the owner on May 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_server.java
More file actions
46 lines (40 loc) · 1.45 KB
/
test_server.java
File metadata and controls
46 lines (40 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import couch.*;
import couch.http.*;
import couch.util.*;
import static couch.util.Util.dump;
import org.json.*;
import java.io.*;
import java.util.*;
import java.net.URL;
class TestServer
{
public static void main(String[] args) throws Exception {
Couch couch = new Couch(null, true);
Client client = new Client(couch);
Server server = new Server(client);
// dump(server.ping());
// dump(server.info());
// dump(server.version());
// dump(server.getActiveTasks());
// dump(server.getAllDatabases().get(0));
// dump(server.getDatabaseUpdates());
// dump(server.getLogs());
// dump(server.getStats());
// dump(server.getStats("couchdb/request_time"));
// dump(server.getUuid());
// dump(server.getUuids(3)[0]);
// dump(server.replicate(Util.paramList("source", "foo", "target", "foo_replicate")));
// dump(server.restart());
// dump(server.getConfig());
// dump(server.getConfig("couchdb"));
// dump(server.getConfig("couchdb", "uuid"));
// dump(server.setConfig("aaa", "foo", "The foo!"));
// dump(server.removeConfig("aaa", "foo"));
// Query q = new Query();
// q.set("foo", 1);
// q.set("bar", true);
// q.set("baz", new String[]{"x","y","z"});
// dump(q.toString());
// dump(Arrays.asList(server.getActiveTasks().getClass().getDeclaredMethods()));
}
}