Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-3574

Set expiration on deleted doc doesn't throw exception

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.1.0
    • 3.1.0
    • Java, Java-Android
    • 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

      Attachments

        Activity

          People

            blake.meike Blake Meike
            lauren.nguyen Lauren Nguyen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty