use of com.cloudant.client.api.model.DbInfo in project java-cloudant by cloudant.
the class DBServerTest method dbInfo.
@Test
public void dbInfo() {
DbInfo dbInfo = db.info();
assertNotNull(dbInfo);
}
use of com.cloudant.client.api.model.DbInfo in project java-cloudant by cloudant.
the class ChangeNotificationsTest method changes_continuousFeed.
@Test
public void changes_continuousFeed() {
db.save(new Foo());
DbInfo dbInfo = db.info();
String since = dbInfo.getUpdateSeq();
Changes changes = db.changes().includeDocs(true).since(since).heartBeat(30000).continuousChanges();
Response response = db.save(new Foo());
while (changes.hasNext()) {
ChangesResult.Row feed = changes.next();
final JsonObject feedObject = feed.getDoc();
final String docId = feed.getId();
assertEquals(response.getId(), docId);
assertNotNull(feedObject);
changes.stop();
}
}
Aggregations