Details
-
Bug
-
Resolution: Fixed
-
Major
-
3.1.0
-
Security Level: Public
-
None
-
JAK 85
-
1
Description
- Steps to Reproduce:
- Save doc in the database
- Delete doc in the database
- Set expiration on the deleted document
@Test
|
public void testSetExpirationOnDeletedDoc() throws CouchbaseLiteException { |
Date dto30 = new Date(System.currentTimeMillis() + 30000L); |
MutableDocument doc1a = new MutableDocument("deleted_doc"); |
doc1a.setInt("answer", 12); |
doc1a.setValue("question", "What is six plus six?"); |
saveDocInBaseTestDb(doc1a);
|
baseTestDb.delete(doc1a);
|
try { |
baseTestDb.setDocumentExpiration("deleted_doc", dto30); |
fail("Expect CouchbaseLiteException"); |
|
}
|
catch (CouchbaseLiteException e) { assertEquals(e.getCode(), CBLError.Code.NOT_FOUND); } |
}
|
|
- Actual Result: No exception thrown
- Expected Result: CouchbaseLiteException should be thrown